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

[release-1.7] 🌱 clusterctl: always run crd migration if possible to reduce conversion webhook usage #11513

Conversation

k8s-infra-cherrypick-robot

This is an automated cherry-pick of #10513

/assign cahillsf

… webhook usage

If objects are still stored in the old version, every time an object is requested
the kube-apiserver will call the conversion webhook. Instead of lots of conversion
webhook calls we once do the migration if possible.

Also increases the timeout used for the migrations: Before running CRD migration
clusterctl usually upgrades cert-manager which may lead to updating Certificates and
rolling out new certificates to our controllers. There is a chance that this can take
up to 90s in which conversion, validating or mutatingwebhooks may be unavailable.
Because the migration gets run more aggresively during upgrades this also increases
the relevant timeouts.
@k8s-ci-robot k8s-ci-robot added this to the v1.7 milestone Dec 1, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 1, 2024
@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-area PR is missing an area label size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 1, 2024
@cahillsf
Copy link
Member

cahillsf commented Dec 1, 2024

backporting per #11133 (comment)

@cahillsf
Copy link
Member

cahillsf commented Dec 1, 2024

/test pull-cluster-api-e2e-release-1-7

@cahillsf
Copy link
Member

cahillsf commented Dec 1, 2024

/area clusterctl

@k8s-ci-robot k8s-ci-robot added area/clusterctl Issues or PRs related to clusterctl and removed do-not-merge/needs-area PR is missing an area label labels Dec 1, 2024
@fabriziopandini
Copy link
Member

/lgtm
cc @chrischdi

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

LGTM label has been added.

Git tree hash: 949f7e38831cbf144ad560bfa5cb904cbfcc7f47

@chrischdi
Copy link
Member

/approve

@chrischdi chrischdi added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Dec 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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 Dec 2, 2024
@k8s-ci-robot k8s-ci-robot merged commit b13114e into kubernetes-sigs:release-1.7 Dec 2, 2024
23 checks passed
@cahillsf
Copy link
Member

cahillsf commented Dec 4, 2024

/cherry-pick release-1.9

ah shit, commented on the wrong PR 🙃

@k8s-infra-cherrypick-robot
Copy link
Author

@cahillsf: #11513 failed to apply on top of branch "release-1.9":

Applying: clusterctl: always run crd migration if possible to reduce conversion webhook usage
Using index info to reconstruct a base tree...
M	cmd/clusterctl/client/cluster/crd_migration.go
M	cmd/clusterctl/client/cluster/crd_migration_test.go
Falling back to patching base and 3-way merge...
Auto-merging cmd/clusterctl/client/cluster/crd_migration_test.go
CONFLICT (content): Merge conflict in cmd/clusterctl/client/cluster/crd_migration_test.go
Auto-merging cmd/clusterctl/client/cluster/crd_migration.go
CONFLICT (content): Merge conflict in cmd/clusterctl/client/cluster/crd_migration.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 clusterctl: always run crd migration if possible to reduce conversion webhook usage

In response to this:

/cherry-pick release-1.9

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.

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/clusterctl Issues or PRs related to clusterctl 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. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants