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

🌱 KCP: cache secrets between LookupOrGenerate and ensureCertificatesOwnerRef #8926

Merged

Conversation

sbueringer
Copy link
Member

Signed-off-by: Stefan Büringer buringerst@vmware.com

What this PR does / why we need it:

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 27, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 27, 2023
@sbueringer sbueringer force-pushed the pr-kcp-cache-secrets-ownerref branch from 56ae244 to 36a1f46 Compare June 27, 2023 13:00
@sbueringer
Copy link
Member Author

/assign @fabriziopandini @killianmuldoon @ykakarap

/hold
for
/test pull-cluster-api-e2e-full-main

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 27, 2023
@sbueringer sbueringer mentioned this pull request Jun 27, 2023
27 tasks
@@ -93,6 +93,9 @@ func TestGetWorkloadCluster(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Name: "my-cluster-etcd",
Namespace: ns.Name,
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is pretty much unrelated to the rest of the PR. Just some test cleanup of some issues that I found while evalutating an alternative solution to the current PR (same for suite_test.go)

@killianmuldoon
Copy link
Contributor

/area provider/control-plane-kubeadm

@k8s-ci-robot k8s-ci-robot added the area/provider/control-plane-kubeadm Issues or PRs related to KCP label Jun 27, 2023
Copy link
Member

@fabriziopandini fabriziopandini 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 27, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1b5bb4c8fa439f9a0648fe4427726efbb389a8d1

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

One nit. If I understand right the Get on Secret is always uncached because Secrets aren't cached in KCP - so this change instead stores the secret somewhere we have ready access to it.

…erRef

Signed-off-by: Stefan Büringer buringerst@vmware.com
@sbueringer sbueringer force-pushed the pr-kcp-cache-secrets-ownerref branch from 36a1f46 to d22e7ce Compare June 27, 2023 18:23
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 27, 2023
@sbueringer
Copy link
Member Author

sbueringer commented Jun 27, 2023

One nit. If I understand right the Get on Secret is always uncached because Secrets aren't cached in KCP - so this change instead stores the secret somewhere we have ready access to it.

Yes exactly. That's the idea. Just a small optimization because actually caching the secrets is not that trivial (because currently there is no way to identify which secrets exactly to cache and we don't want to cache all).

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: b26bf0459362b80665f037ea3da73e07ab9dbcf5

@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 28, 2023
@killianmuldoon
Copy link
Contributor

killianmuldoon commented Jun 28, 2023

/hold

In case someone else wants to take a look.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

feel free to un-hold anytime

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, killianmuldoon

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:
  • OWNERS [fabriziopandini,killianmuldoon]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sbueringer
Copy link
Member Author

Thx for the reviews!

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 28, 2023
@k8s-ci-robot k8s-ci-robot merged commit f33ba30 into kubernetes-sigs:main Jun 28, 2023
10 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jun 28, 2023
@sbueringer sbueringer deleted the pr-kcp-cache-secrets-ownerref branch June 28, 2023 10:47
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. area/provider/control-plane-kubeadm Issues or PRs related to KCP 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/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.

None yet

5 participants