Skip to content

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.
  • Adds the ability to configure fetchConfig.

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels 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
@netlify
Copy link

netlify bot commented Apr 8, 2025

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

Name Link
🔨 Latest commit 4fdac3e
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-operator/deploys/68c1f675e545600008924389
😎 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 project 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
@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.

@bsctl
Copy link

bsctl commented May 25, 2025

@rbjorklin @sathieu what's about to merge these PR #780 and leave open other PRs for the remaining fetchConfig, manager.featureGates, additionalDeployments ?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 27, 2025
@sathieu
Copy link

sathieu commented Jun 3, 2025

@bsctl I've moved to another way of managing providers (here) and I'm no longer interrested in this PR.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 1, 2025
@rbjorklin rbjorklin force-pushed the make-config-secret-configurable-per-component branch from 23e7903 to 7235159 Compare September 9, 2025 23:28
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2025
@rbjorklin
Copy link
Contributor Author

Just rebased and added fetchConfig. Is there a maintainer that could review this?

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 7235159 to 4fdac3e Compare September 10, 2025 22:06
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 10, 2025
@rbjorklin
Copy link
Contributor Author

/retest-required

@rbjorklin
Copy link
Contributor Author

Alright, I think I've got the tests sorted now. This just needs a review.

@furkatgofurov7 furkatgofurov7 removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 17, 2025
Copy link
Contributor

@alexander-demicev alexander-demicev left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexander-demicev

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2025
@alexander-demicev
Copy link
Contributor

@rbjorklin The PR looks good, I approved it. Can I ask you to take a look at this one #832? It might affect your deployment.

@rbjorklin
Copy link
Contributor Author

@rbjorklin The PR looks good, I approved it. Can I ask you to take a look at this one #832? It might affect your deployment.

Thanks for the pointer @alexander-demicev! The author of #832 takes greater picture approach and also adds configSecret in a very similar way to mine. Would be happy to endorse #832 over mine if that PR also gets fetchConfig support.

@furkatgofurov7
Copy link
Member

/lgtm

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

LGTM label has been added.

Git tree hash: dbd6ef4d5f35751242d8d65b79a3d536f5dff005

@furkatgofurov7
Copy link
Member

/retitle ✨ Make configSecret configurable per component

@k8s-ci-robot k8s-ci-robot changed the title ✨ 🌱 Make configSecret configurable per component ✨ Make configSecret configurable per component Sep 25, 2025
@k8s-ci-robot k8s-ci-robot merged commit fd7bae6 into kubernetes-sigs:main Sep 25, 2025
18 checks passed
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants