StatCan / aaw-kubeflow-controller

Kubeflow controller which sets PodDefaults + Vault policies for each Profile detected
Other
1 stars 0 forks source link

Upstream the client code for Kubeflow CRDs #20

Open blairdrummond opened 3 years ago

blairdrummond commented 3 years ago

As per chats the other day, we should upstream this code this code. Would be good for Kubeflow anyway and would simplify our dependencies

CC @zachomedia @DavidSpek

davidspek commented 3 years ago

Thanks for the ping Blair. Can you give a short description of what the code does?

zachomedia commented 3 years ago

@DavidSpek The part that actually should be upstreamed is https://github.com/StatCan/kubeflow-controller/tree/master/pkg/generated, which is generated from the Kubeflow CRDs. It let's us write Go code that interacts with the CRDs for our own custom controllers.

davidspek commented 3 years ago

So for example, it watches for created profiles.kubeflow.org resources so you can create custom resources in each namespaces easily, and that code is just the watcher/listener part of that?

blairdrummond commented 3 years ago

Yep kinda like here https://github.com/StatCan/kubeflow-controller/blob/1d0bfdc8ebde94854efbfd102332e27df2f4791e/controller.go#L153-L154

zachomedia commented 3 years ago

@DavidSpek Yeah, that's correct, we use it to monitor for new profiles and/or notebooks and create some custom resources that are specific to our environment (e.g., image pull secrets, RBAC config, network policies, etc.). It was also used in our custom Jupyter Web App (https://github.com/StatCan/jupyter-apis).

I had to copy the CRDs out of Kubeflow in order to run the code generator against them to generate the clientset, infromers and listers (so that's why there is a pkg/apis folder here with them).