Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add kubebuilder alpha config-gen command to explore generating configuration with kustomize functions #1831

Merged
merged 1 commit into from
Mar 13, 2021

Conversation

pwittrock
Copy link
Contributor

@pwittrock pwittrock commented Nov 17, 2020

See the config-gen/README.md for instructions

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 17, 2020
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2020
pkg/cli/alpha/config-gen/types.go Outdated Show resolved Hide resolved
pkg/cli/alpha/config-gen/cmd.go Outdated Show resolved Hide resolved
@pwittrock
Copy link
Contributor Author

Push latest changes.

The go.mod file is a result of running the tests and tidy. If I revert it back to the state before this PR, the test and tidy will put it back in this state.

@pwittrock
Copy link
Contributor Author

pwittrock commented Mar 12, 2021

@Adirio @camilamacedo86

I've worked on cleaning up the API. The PR is broken as it stands, but I want to get the API stable before going back and re-implementing it.

  • Get rid of components
  • Break top level API into 3 pieces -- crds, controller-manager, webhooks
  • Subdivide top components into major features
  • Make everything optional and a pointer so KubebuilderConfigGen resources can be patched and merged in the future
  • Make certificates a discriminated union with placeholders for certmanager and manual options

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 12, 2021
pkg/cli/alpha.go Outdated Show resolved Hide resolved
Copy link
Contributor

@estroz estroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this PR stands now, considering that it is an alpha command/implementation, LGTM. The license headers need updating to 2021 though.

@pwittrock
Copy link
Contributor Author

Sync'ed up offline with @camilamacedo86 . Plan is to leave with the shared go.mod for now. If this becomes a problem we can move it into a separate module, and lazily go get it at runtime when the command is invoked.

- Add the alpha subcommand
- Add config-gen as an alpha subcommand

config-gen includes controller-gen as a library, and generates configuration for kubebuilder projects.
@pwittrock
Copy link
Contributor Author

PTAL

Copy link
Contributor

@estroz estroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 13, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: estroz, pwittrock

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 9742a11 into kubernetes-sigs:master Mar 13, 2021
@Adirio
Copy link
Contributor

Adirio commented Mar 13, 2021

This PRs updates the copyright year of 3 files (inside pkg/cli/internal/config) that were not touched by it. This change is not a major issue as that package is being removed in #2083.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants