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: patch ImageRepository in ClusterConfiguration if it is not set for v1.25 #6917

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

chrischdi
Copy link
Member

@chrischdi chrischdi commented Jul 13, 2022

What this PR does / why we need it:

Patches the ImageRepository variable in kcp.spec.kubeadmConfig.clusterConfiguration to registry.k8s.io if it was not set explicitly to a value in ClusterConfiguration, when upgrading to v1.25.

Also does the same for coredns and kube-proxy.

For more details and discussion see #6596

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 #6596

@chrischdi
Copy link
Member Author

/test help

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

@chrischdi: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-cluster-api-build-main
  • /test pull-cluster-api-e2e-main
  • /test pull-cluster-api-test-main
  • /test pull-cluster-api-test-mink8s-main
  • /test pull-cluster-api-verify-main

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-apidiff-main
  • /test pull-cluster-api-e2e-full-main
  • /test pull-cluster-api-e2e-informing-ipv6-main
  • /test pull-cluster-api-e2e-informing-main
  • /test pull-cluster-api-e2e-workload-upgrade-1-21-1-22-main
  • /test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-apidiff-main
  • pull-cluster-api-build-main
  • pull-cluster-api-e2e-informing-ipv6-main
  • pull-cluster-api-e2e-informing-main
  • pull-cluster-api-e2e-main
  • pull-cluster-api-test-main
  • pull-cluster-api-test-mink8s-main
  • pull-cluster-api-verify-main

In response to this:

/test help

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 13, 2022
@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 14, 2022
@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main

@chrischdi
Copy link
Member Author

/test pull-cluster-api-apidiff-main
/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-informing-ipv6-main
/test pull-cluster-api-e2e-informing-main
/test pull-cluster-api-e2e-workload-upgrade-1-21-1-22-main
/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main

@chrischdi
Copy link
Member Author

Issue seems currently not to be the registry anymore:

KCP got upgraded but first MachineDeployment Machine failed with kube-proxy:

Jul 14 15:06:44.894592 k8s-upgrade-and-conformance-zqzlwl-md-0-sfns7-f747cccf5-7q59q kubelet[357]: E0714 15:06:44.894530     357 pod_workers.go:951] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"kube-proxy\" with ImagePullBackOff: \"Back-off pulling image \\\"k8s.gcr.io/kube-proxy:v1.25.0-alpha.2.259_19a22f763770d1\\\"\"" pod="kube-system/kube-proxy-6bs6x" podUID=92247180-cc6d-4702-964c-0b4d1296583f

Have to take a look why it still wants to use k8s.gcr.io for kube-proxy :-)

@chrischdi
Copy link
Member Author

chrischdi commented Jul 14, 2022

Issue seems currently not to be the registry anymore:

KCP got upgraded but first MachineDeployment Machine failed with kube-proxy:

Jul 14 15:06:44.894592 k8s-upgrade-and-conformance-zqzlwl-md-0-sfns7-f747cccf5-7q59q kubelet[357]: E0714 15:06:44.894530     357 pod_workers.go:951] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"kube-proxy\" with ImagePullBackOff: \"Back-off pulling image \\\"k8s.gcr.io/kube-proxy:v1.25.0-alpha.2.259_19a22f763770d1\\\"\"" pod="kube-system/kube-proxy-6bs6x" podUID=92247180-cc6d-4702-964c-0b4d1296583f

Have to take a look why it still wants to use k8s.gcr.io for kube-proxy :-)

TLDR: we have to do a similar change at

newImageName, err = containerutil.ModifyImageRepository(newImageName, kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.ImageRepository)

(I will take a look if I find more occurencies, e.g. check coredns, ...)

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main
/test pull-cluster-api-e2e-full-main

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main
/test pull-cluster-api-e2e-full-main

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main
/test pull-cluster-api-e2e-full-main

@chrischdi
Copy link
Member Author

pull-cluster-api-e2e-workload-upgrade-1-24-latest-main is now green acccording local testing.

/retitle 🐛 kcp: patch ImageRepository in ClusterConfiguration if it is not set for v1.25

@k8s-ci-robot k8s-ci-robot changed the title 🐛 [WIP] kcp: patch ImageRepository in ClusterConfiguration if it is not set for v1.25 🐛 kcp: patch ImageRepository in ClusterConfiguration if it is not set for v1.25 Jul 15, 2022
@chrischdi
Copy link
Member Author

/retitle [wip] 🐛 kcp: patch ImageRepository in ClusterConfiguration if it is not set for v1.25

@k8s-ci-robot k8s-ci-robot changed the title 🐛 kcp: patch ImageRepository in ClusterConfiguration if it is not set for v1.25 [wip] 🐛 kcp: patch ImageRepository in ClusterConfiguration if it is not set for v1.25 Jul 15, 2022
@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 Jul 15, 2022
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
@sbueringer for a last pass

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 19, 2022
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed 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. labels Jul 19, 2022
@chrischdi
Copy link
Member Author

/test pull-cluster-api-apidiff-main
/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-informing-ipv6-main
/test pull-cluster-api-e2e-informing-main
/test pull-cluster-api-e2e-workload-upgrade-1-21-1-22-main
/test pull-cluster-api-e2e-workload-upgrade-1-24-latest-main

@sbueringer PTAL 😀

@sbueringer
Copy link
Member

Thank you very much for adding the additional tests.

I think that's really useful as it just gives us a bit more confidence that with all the logic we now have it still behaves as expected.

/lgtm

@fabriziopandini PTAL

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 19, 2022
@fabriziopandini
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 Jul 19, 2022
@sbueringer
Copy link
Member

@fabriziopandini Cherry-pick into release-1.2? At this point I would assume our goal is to eventually support v1.25 in v1.2.x if possible. This would mean we have to cherry-pick all relevant v1.25 PRs for the time being.

@k8s-infra-cherrypick-robot

@chrischdi: new pull request created: #6957

In response to this:

/cherry-pick release-1.2

otherwise there will be no upgrade working for v1.24 -> v1.25 in v1.2

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/test-infra repository.

@chrischdi
Copy link
Member Author

@fabriziopandini : we should also either:

@fabriziopandini
Copy link
Member

@chrischdi release 1-1 is technically out of support and thus we should encourage users to move to 1.2, so I'm for removing the test.

Also, side question, as far as you remember, have we updated the support matrix pages with 1.25 being supported starting from the next patch release?

@chrischdi
Copy link
Member Author

@chrischdi release 1-1 is technically out of support and thus we should encourage users to move to 1.2, so I'm for removing the test.

Also, side question, as far as you remember, have we updated the support matrix pages with 1.25 being supported starting from the next patch release?

We have not added 1.25 to the matrix page yet.
I think we have to wait until v1.25 is released and we added capi-e2e-release-1-2-1-24-1-25 for v1.2.

Both (version matrix and adding the periodics) is already tracked in:

@chrischdi
Copy link
Member Author

@sbueringer
Copy link
Member

sbueringer commented Aug 16, 2022

+1 We should only claim v1.25 support once we have green tests for v1.25.0
Also +1 to only supporting v1.25 in v1.2 & main

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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CAPI capi-e2e-main-1-24-latest failing consistently since June 1st
6 participants