kubernetes-retired / cluster-registry

[EOL] Cluster Registry API
https://kubernetes.github.io/cluster-registry/
Apache License 2.0
238 stars 88 forks source link

Remove unnecessary code from pkg/inject, and clarify why that package and pkg/controller exist. #237

Closed perotinus closed 6 years ago

perotinus commented 6 years ago

/sig multicluster

Addresses one of the follow-up items in #229.

/assign @font @madhusudancs @pmorie

font commented 6 years ago

Is there no way to disable the creation of the controller generated code? It looks like kubebuilder offers a --controller flag to make generating the controller code optional when creating a resource as in:

kubebuilder create resource --controller=false ...
perotinus commented 6 years ago

@font There is some code in kubebuilder docs that specifically references in a non-switchable way pkg/controller: https://github.com/kubernetes-sigs/kubebuilder/blob/561e4da021cdee17759d74580829ab1e9a6eb6cb/cmd/kubebuilder/docs/gen.go#L25

Filed https://github.com/kubernetes-sigs/kubebuilder/issues/249 to see if kubebuilder want to fix this internally.

font commented 6 years ago

Ah ok, thanks! Yes, kubebuilder should allow the controller to be optional when generating docs.

/lgtm

k8s-ci-robot commented 6 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: font, perotinus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes/cluster-registry/blob/master/OWNERS)~~ [font,perotinus] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment