controller-tools
controller-tools copied to clipboard
Unclear on k8s.io/code-generator utils vs controller-gen tool
I am a newcomer to the ecosystem and I cannot tell when to use
https://github.com/kubernetes/code-generator/blob/master/generate-groups.sh, https://github.com/kubernetes/code-generator/blob/master/hack/update-codegen.sh or https://github.com/kubernetes-sigs/controller-tools/tree/master/cmd/controller-gen
For example controller-gen can do deepcopy generation, and so can https://github.com/kubernetes/code-generator/tree/master/cmd/deepcopy-gen.
Similarly, controller-gen can do OpenAPI v3 schema generation, and so can https://github.com/kubernetes/code-generator/blob/master/cmd/openapi-gen/main.go
Is controller-gen a one-stop shop?
I hope this piece of feedback is somewhat useful.
Note that the usual entrypoint is to use the overarching Kubebuilder project which uses controller-gen “under the hood”, and when doing this you do not need to call controller-gen directly as the provided Makefile takes care of this for you.
However, if you want to use controller-gen by itself then yes, it can be used as a one-stop shop, without any other of the tools you mentioned. I haven’t used anything from the code-generator project myself, so cannot comment on that.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.