-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
⚠ (go/v3-alpha) Adding support for scaffolding with a versioned ComponentConfig #1790
⚠ (go/v3-alpha) Adding support for scaffolding with a versioned ComponentConfig #1790
Conversation
1ec2d75
to
53e280c
Compare
Prow is not detecting it as a WIP so I will manually hold it, feel free to remove it when its done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several comments:
pkg/plugin/v3/scaffolds/internal/templates/config/kdefault/auth_proxy_patch.go
Outdated
Show resolved
Hide resolved
pkg/plugin/v3/scaffolds/internal/templates/config/manager/config.go
Outdated
Show resolved
Hide resolved
pkg/plugin/v3/scaffolds/internal/templates/config/manager/kustomization.go
Outdated
Show resolved
Hide resolved
28c55cf
to
23e49e0
Compare
pkg/plugin/v3/scaffolds/internal/templates/config/kdefault/kustomization.go
Outdated
Show resolved
Hide resolved
pkg/plugin/v3/scaffolds/internal/templates/config/kdefault/manager_auth_proxy_patch.go
Outdated
Show resolved
Hide resolved
pkg/plugin/v3/scaffolds/internal/templates/config/manager/config.go
Outdated
Show resolved
Hide resolved
ac37786
to
63e5efd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of changes in the testdata
folder that I don't think that are expected, could you check them?
Yea, the tests are failing cause of the 0.7.0 which I think we need to get the declarative addons package updated so all the files are generated properly. |
63e5efd
to
433bc92
Compare
BTW Thanks @Adirio for all the reviews on this and the response time is incredibly fast 👏 at this point we're blocked on kubernetes-sigs/kubebuilder-declarative-pattern#127 |
@christopherhein #1804 bumps controller-runtime to v0.7.0-alpha.6 |
Thanks @estroz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR needs a rebase and make generate
7f852e3
to
defa6a4
Compare
defa6a4
to
b81fd49
Compare
Signed-off-by: Chris Hein <[email protected]>
Signed-off-by: Chris Hein <[email protected]>
b81fd49
to
55b8fd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, christopherhein, estroz 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 |
🎉 thanks @Adirio @estroz @camilamacedo86 really appreciate all the help getting this through. |
Kudos to everyone, amazing to see this land 🎉 👏 🥇 !! |
This adds the ability to scaffold a
kubebuilder
v3 plugin project with a versioned config file (componentconfig) this was first implemented in Controller Runtime by allowing.AndFrom[OrDie]()
to thectrl.Manager
examples can be found https://github.com/kubernetes-sigs/controller-runtime/blob/master/examples/configfile/builtin/main.go#L47-L49 with a config like https://github.com/kubernetes-sigs/controller-runtime/blob/master/examples/configfile/builtin/config.yaml I've first implemented this as a flag oninit --componentconfig
which is a boolean type. As developers use this the idea is they can implement custom configs with these standard configs embedded https://github.com/kubernetes-sigs/controller-runtime/blob/master/examples/configfile/custom/main.go#L49-L59 these files are decoded and made available making it easy to extend your controller config without relying on CLI flags.For the
kubebuilder
implementation this scaffolds the config file and manager patch for volumes and configureskustomize
to create a configmap for this config file.I'm submitting this cause I'd like to get feedback before I go and refactor some of the fields to Mixins and Injection. As well this is blocked by #1746 for a stable
controller-runtime
0.7.0 release and #1756 for v3 e2e tests.Fixes #722
Signed-off-by: Chris Hein [email protected]