Skip to content

✨ Use Secret as provider cache #827

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

Merged

Conversation

Danil-Grigorev
Copy link
Member

@Danil-Grigorev Danil-Grigorev commented Jun 3, 2025

What this PR does / why we need it:

This PR implements caching approach based on a Secret resource, capable of re-applying capi-operator managed manifests without performance/memory/network (access to external repositories) overhead. This allows all provider manifests to be templated once, and unless there is a change in the provider spec, referenced credentials/env secret content, the reconcile simply applies provider data on top of existing cluster state.

This operation is much cheaper in terms of memory usage, then current templating pipeline from clusterctl, and it implemented as a phase on top of existing reconcile process, allowing minimal code changes.

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 rancher/highlander#133

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 3, 2025
Copy link

netlify bot commented Jun 3, 2025

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

Name Link
🔨 Latest commit 7dd20b3
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-operator/deploys/685a80b17674120008310277
😎 Deploy Preview https://deploy-preview-827--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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 3, 2025
@Danil-Grigorev Danil-Grigorev changed the title Config map cache hash wip Use Secret as provider cache Jun 3, 2025
@Danil-Grigorev Danil-Grigorev force-pushed the config-map-cache-hash-wip branch from dcf3ae6 to f4cbe27 Compare June 20, 2025 13:42
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 20, 2025
@Danil-Grigorev Danil-Grigorev marked this pull request as ready for review June 23, 2025 11:01
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2025
@k8s-ci-robot k8s-ci-robot requested a review from justinsb June 23, 2025 11:01
@Danil-Grigorev Danil-Grigorev changed the title Use Secret as provider cache [WIP] Use Secret as provider cache Jun 23, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2025
Signed-off-by: Danil-Grigorev <[email protected]>
@Danil-Grigorev Danil-Grigorev changed the title [WIP] Use Secret as provider cache [WIP] ✨ Use Secret as provider cache Jun 24, 2025
@Danil-Grigorev Danil-Grigorev changed the title [WIP] ✨ Use Secret as provider cache ✨ Use Secret as provider cache Jun 24, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 24, 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 Jun 24, 2025
Copy link
Contributor

@Fedosin Fedosin 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 Jun 24, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 40d6e67d080e01ba850278e4e9c9c6451bc5f6a5

@k8s-ci-robot k8s-ci-robot merged commit ad2db37 into kubernetes-sigs:main Jun 24, 2025
19 of 20 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. 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.

Optimize configMap cache usage in repeated reconciles without changes
4 participants