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

Support loading controller configuration from a versioned file #5160

Closed
7 tasks
irbekrm opened this issue May 27, 2022 · 18 comments · Fixed by #5337
Closed
7 tasks

Support loading controller configuration from a versioned file #5160

irbekrm opened this issue May 27, 2022 · 18 comments · Fixed by #5337
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@irbekrm
Copy link
Contributor

irbekrm commented May 27, 2022

Support loading controller configuration from a versioned file by adding a new API type containing the existing controller configuration options as fields and allowing a user to optionally pass a configmap containing this API object (as well as continuing to support the current flag-based configuration mechanism (but not both at the same time)).

For context see documentation for a mechanism that allows upstream Kubernetes components to support loading config from versioned files

In cert-manager we would also like to allow for component (webhook, controller, cainjector configuration to be loaded from versioned files).
This should help with cases such as #4489

In #4546 we already implemented support for loading webhook configuration from a versioned file by adding a new WebhookConfiguration API type that can be provided to cert-manger webhook in configmap- this issue is for implementing the same change for cert-manager controller

Rough outline of steps required (there will likely be a need to do some additional things/do some things differently):

  • Add a new ControllerConfiguration type to the v1alpha1.config.cert-manager.io API group + related code to add the new type to the schema, this should be very similar to fb81666
  • Populate the new type with fields corresponding to the current controller options. Implement existing defaulting, but using defaulting functions registered for the type (see how it's done for the webhook - a defaulting function gets registered using autogenerated defaulting code with defaulter-gen. This change was done for webhook in afa8e5a (that also contains some other changes)
  • Refactor controller command and running and initialization of the controller to use values (including defaults) from ControllerConfiguration. This change will likely be similar to afa8e5a
  • Add a fuzz function for ControllerConfiguration type to config fuzzer tests similar to how it was done in 415ca56
  • Add a test to check correct precedence of controller flags vs config values like it was done in e21c6e6
  • Add a unittest for configfile loading like in 71a69cc
  • Add support for configmap with the new API type to helm chart similar to how it was done for webhook in 553e1e0

/kind feature

@jetstack-bot jetstack-bot added the kind/feature Categorizes issue or PR as related to a new feature. label May 27, 2022
@irbekrm irbekrm added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label May 31, 2022
@irbekrm
Copy link
Contributor Author

irbekrm commented May 31, 2022

I am marking this issue as 'help wanted'- contributions very welcome!

I think it could be interesting for anyone wanting to understand the concerns around configuring/initializing components that are meant to be deployed on Kubernetes (specifically controllers and webhooks), work done towards building a better mechanism for that upstream
as well as adding a new type to an external Kubernetes API and writing tests for it.

This is not really a beginner issue- ideally the person picking it up will have had some experience/understanding of Go CLIs and a bit of experience/exposure to Kubernetes controllers.

@AcidLeroy
Copy link
Contributor

@irbekrm I'll start taking a look, thanks for proposing this!

@AcidLeroy
Copy link
Contributor

@irbekrm
Copy link
Contributor Author

irbekrm commented Jun 2, 2022

Hey @AcidLeroy , I don't have access to my laptop right now (bank holidays here in the UK) but I think you need to join Kubernetes dev group to access that https://groups.google.com/a/kubernetes.io/g/dev

Let me know if you still cannot access

@AcidLeroy
Copy link
Contributor

Thank you, @irbekrm, that was the secret to viewing the doc. I appreciate it!

@AcidLeroy
Copy link
Contributor

@irbekrm is it possible to assign this issue to me?

@irbekrm
Copy link
Contributor Author

irbekrm commented Jun 10, 2022

Hey @AcidLeroy , yes of course, thanks for showing interest in this, it would be a really valuable addition!

/assign @AcidLeroy

@jetstack-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 8, 2022
@jetstack-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 8, 2022
@jetstack-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

@jetstack-bot
Copy link
Contributor

@jetstack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

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.

@irbekrm
Copy link
Contributor Author

irbekrm commented Mar 9, 2023

/reopen
/remove-lifecycle rotten

@jetstack-bot jetstack-bot reopened this Mar 9, 2023
@jetstack-bot
Copy link
Contributor

@irbekrm: Reopened this issue.

In response to this:

/reopen
/remove-lifecycle rotten

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.

@jetstack-bot jetstack-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 9, 2023
@irbekrm
Copy link
Contributor Author

irbekrm commented Mar 9, 2023

WIP PR #5337

@irbekrm
Copy link
Contributor Author

irbekrm commented Mar 9, 2023

@jetstack-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 7, 2023
@jetstack-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 7, 2023
@jetstack-bot jetstack-bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jul 7, 2023
@AcidLeroy
Copy link
Contributor

AcidLeroy commented Jul 19, 2023

/remove-lifecycle rotten
/remove-lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants