controller-tools icon indicating copy to clipboard operation
controller-tools copied to clipboard

Unclear on k8s.io/code-generator utils vs controller-gen tool

Open ahmetb opened this issue 3 years ago • 2 comments
trafficstars

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.

ahmetb avatar Apr 19 '22 20:04 ahmetb

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.

Porges avatar May 05 '22 22:05 Porges

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Aug 03 '22 23:08 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Sep 02 '22 23:09 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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 avatar Oct 02 '22 23:10 k8s-triage-robot

@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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

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.

k8s-ci-robot avatar Oct 02 '22 23:10 k8s-ci-robot