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

Pin Kubernetes container image hashes #2719

Merged
merged 6 commits into from
Dec 18, 2023
Merged

Pin Kubernetes container image hashes #2719

merged 6 commits into from
Dec 18, 2023

Conversation

burgerdev
Copy link
Contributor

@burgerdev burgerdev commented Dec 14, 2023

Context

The container images pulled by kubeadm should be verified by Constellation. This PR pins the images for kube-apiserver, kube-scheduler and kube-controller-manager.

Proposed change(s)

  • Add patches that pin image hashes to versions.go.
  • Configure the bootstrapper to pass patches to kubeadm.
  • Configure the operator to pass patches to the upgrade-agent.
  • Configure the upgrade-agent to pass patches to kubeadm.

In an upgrade from 2.13 to 2.14, the upgrade-agent won't immediately pin the image because it does not understand the proto field with the additional components and does not pass on the patches. However, the VM will eventually get replaced, and the new upgrade-agent and bootstrapper will now be able to pin the image correctly.

Additional info

Checklist

@burgerdev burgerdev added the feature This introduces new functionality label Dec 14, 2023
@burgerdev burgerdev added this to the v2.14.0 milestone Dec 14, 2023
Copy link

netlify bot commented Dec 14, 2023

Deploy Preview for constellation-docs ready!

Name Link
🔨 Latest commit d9a6db5
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/6580247591f0860008dad13f
😎 Deploy Preview https://deploy-preview-2719--constellation-docs.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 site configuration.

Copy link
Contributor

@malt3 malt3 left a comment

Choose a reason for hiding this comment

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

Code LGTM. Also tested the behavior in a real cluster.

Copy link
Member

@3u13r 3u13r left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

Coverage report

Package Old New Trend
bootstrapper/internal/kubernetes/k8sapi 13.40% 13.40% 🚧
internal/constants [no test files] [no test files] 🚧
internal/versions 8.20% 9.70% ↗️
internal/versions/components 32.40% 44.30% ↗️
internal/versions/hash-generator 0.00% 0.00% 🚧
terraform-provider-constellation [no test files] [no test files] 🚧
upgrade-agent/internal/server 14.90% 25.90% ↗️
upgrade-agent/upgradeproto [no test files] [no test files] 🚧

@burgerdev burgerdev merged commit 615e731 into main Dec 18, 2023
11 checks passed
@burgerdev burgerdev deleted the burgerdev/data-urls branch December 18, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This introduces new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants