Skip to content

✨ 🌱 Make configSecret configurable per component #780

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbjorklin
Copy link
Contributor

@rbjorklin rbjorklin commented Apr 8, 2025

What this PR does / why we need it:
This builds on the extensibility introduced in #638.

  • This makes the connection between the configSecret and the component/provider using said config clearer.
  • Reduces duplication of the configSecret logic across templates by moving it into a helper.

This has been implemented in such a way that it is backwards compatible and will default to the existing behaviour. If you want to use the new behaviour you would have to do something like this:

core:
  cluster-api:
    version: v1.9.6
    configSecret:
      name: my-custom-core-config
      namespace: capi-system

infrastructure:
  azure:
    namespace: capz-system
    version: v1.19.1
    configSecret:
      name: azure-variables
      namespace: capz-system

while also removing the configSecret key at the root level of the values.yaml file.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 8, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign damdo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 8, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @rbjorklin. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 8, 2025
@k8s-ci-robot k8s-ci-robot requested review from damdo and justinsb April 8, 2025 21:37
Copy link

netlify bot commented Apr 8, 2025

Deploy Preview for kubernetes-sigs-cluster-api-operator ready!

Name Link
🔨 Latest commit 23e7903
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-operator/deploys/67f5a05efc0f91000850b7be
😎 Deploy Preview https://deploy-preview-780--kubernetes-sigs-cluster-api-operator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dmvolod
Copy link
Member

dmvolod commented Apr 8, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 8, 2025
This makes it so that each component can be configured individually.
By making the configuration component specific it is more clear
which component is actually using it.

This also breaks out a common section into a helper which reduces
duplication.
@rbjorklin rbjorklin force-pushed the make-config-secret-configurable-per-component branch from cc90a8d to 23e7903 Compare April 8, 2025 22:17
@sathieu
Copy link

sathieu commented Apr 24, 2025

@rbjorklin Thanks for this. Following the same idea, can you add fetchConfig, manager.featureGates, additionalDeployments, manifestPatches, and additionalManifests configurable per provider?

@rbjorklin
Copy link
Contributor Author

@rbjorklin Thanks for this. Following the same idea, can you add fetchConfig, manager.featureGates, additionalDeployments, manifestPatches, and additionalManifests configurable per provider?

manifestPatches and additionalManifests were already implemented in the referenced PR #638. I'll see if I can get the others added though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants