kube-rs / k8s-pb

Playing with Kubernetes protobufs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support selecting API groups to build

kazk opened this issue · comments

Just an idea for Arnavion/k8s-openapi#77. Finding the dependencies between modules should be possible because each package has imports (FileDescriptorProto has dependency field).

package api.core.v1;
import "apimachinery/pkg/api/resource/generated.proto";
import "apimachinery/pkg/apis/meta/v1/generated.proto";
import "apimachinery/pkg/runtime/generated.proto";
import "apimachinery/pkg/runtime/schema/generated.proto";
import "apimachinery/pkg/util/intstr/generated.proto";

We also don't need to worry about multiplying that by version features if we version this using Kubernetes version (#10).

A potential benefit here is that this could move us towards having a simpler dependency flow into kube as well (with a few exceptions)

  • kube-client would only need what kube-core pulls in (discovery mod only needs apimachinery, but marker trait impls should possibly be done elsewhere - like in this repo)
  • kube-core would only need apimachinery (but slight quirk with admission from core)
  • kube-derive avoids it (as before)
  • kube-runtime can require a lot more, as we get more utils