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

Fix APT/RPM PGP key expiration issue for old kubernetes versiosn #3524

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

mohamed-rafraf
Copy link
Member

@mohamed-rafraf mohamed-rafraf commented Jan 8, 2025

What this PR does / why we need it:
This PR addresses the issue of expired GPG keys for Kubernetes apt/rpm repositories by dynamically fetching the GPG key corresponding to the latest stable Kubernetes version.

According to this comment https://github.com/kubernetes/release/issues/3818#issuecomment-2455160940
We can use the gpg key from the latest kubernetes repository.

Which issue(s) this PR fixes:

Fixes #3460

What type of PR is this?

/kind bug

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

Use the GPG key from the latest Kubernetes package repository to fix failures to install older versions of Kubernetes packages

Documentation:

NONE

@kubermatic-bot kubermatic-bot added docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 8, 2025
@mohamed-rafraf
Copy link
Member Author

/assign

Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

You also need to update fixtures by running ./hack/update-fixtures.sh

@@ -44,13 +44,14 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf

{{ if .CONFIGURE_REPOSITORIES }}
LATEST_STABLE=$(curl -s https://cdn.dl.k8s.io/release/stable.txt | sed 's/\.[0-9]*$//')
Copy link
Member

Choose a reason for hiding this comment

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

Let's not use cdn.dl.k8s.io directly, but instead use just dl.k8s.io, to be on the safe side.

@kubermatic-bot kubermatic-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 8, 2025
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on this one!
/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2025
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5a4f622b9db564a32bb14ddf6febc5c87b9a15af

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xmudrii

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

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2025
@xmudrii
Copy link
Member

xmudrii commented Jan 8, 2025

/release-note-edit

Use the GPG key from the latest Kubernetes package repository to fix failures to install older versions of Kubernetes packages

@xmudrii
Copy link
Member

xmudrii commented Jan 8, 2025

/cherrypick release/v1.8

@xmudrii
Copy link
Member

xmudrii commented Jan 8, 2025

/cherrypick release/v1.9

@kubermatic-bot
Copy link
Contributor

@xmudrii: once the present PR merges, I will cherry-pick it on top of release/v1.8 in a new PR and assign it to you.

In response to this:

/cherrypick release/v1.8

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.

@kubermatic-bot
Copy link
Contributor

@xmudrii: once the present PR merges, I will cherry-pick it on top of release/v1.9 in a new PR and assign it to you.

In response to this:

/cherrypick release/v1.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.

@kubermatic-bot kubermatic-bot merged commit 201d04c into kubermatic:main Jan 8, 2025
13 checks passed
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.10 milestone Jan 8, 2025
@kubermatic-bot
Copy link
Contributor

@xmudrii: new pull request created: #3525

In response to this:

/cherrypick release/v1.8

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.

@kubermatic-bot
Copy link
Contributor

@xmudrii: new pull request created: #3526

In response to this:

/cherrypick release/v1.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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Issue upgrading Kubernetes cluster from 1.26 to 1.27 due to expired APT keys
3 participants