-
Notifications
You must be signed in to change notification settings - Fork 244
feat: install Kubernetes to Flatcar from sysexts on MAR #7680
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
base: main
Are you sure you want to change the base?
Changes from all commits
0306d0c
3642583
2fddd42
fbe78db
2c6b56f
904153b
c91d847
99d3007
d82f62b
17b84a6
0f704dd
5ad0d86
e1454ee
44b6428
b96f8d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,7 +64,8 @@ | |
| }, | ||
| { | ||
| "matchPackageNames": [ | ||
| "oss/v2/**" | ||
| "oss/v2/**", | ||
| "!oss/v2/kubernetes/*-sysext" | ||
| ], | ||
| "versioning": "regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<prerelease>\\d+)$", | ||
| "ignoreUnstable": false | ||
|
|
@@ -479,6 +480,16 @@ | |
| ], | ||
| "extractVersion": "^(?P<version>.*?)-[^-]*-[^-]*$" | ||
| }, | ||
| { | ||
| "matchDatasources": [ | ||
| "docker" | ||
| ], | ||
| "matchPackageNames": [ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. who would be the owner of such packages ? I'm not sure if they would have automatic assigned in the PR
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably Chewi + Jeremi as primary owners, and maybe us as secondary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure that we need to be owners. These sysexts are published in tandem with their .deb and .rpm counterparts from the very same Dalec YAML definition. Adding sysext support is usually just a case of adding one line. |
||
| "oss/v2/kubernetes/*-sysext" | ||
| ], | ||
| "matchCurrentVersion": "/-azlinux3$/", | ||
| "extractVersion": "^(?P<version>.+-azlinux3)-" | ||
| }, | ||
| { | ||
| "matchPackageNames": [ | ||
| "aks/aks-gpu-cuda" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1086,6 +1086,16 @@ | |
| ] | ||
| } | ||
| }, | ||
| "flatcar": { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when should we expect udpated/patched version of containerd ? from base images only ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Jeremi took this decision a while back. Bear in mind that Flatcar releases every few weeks. |
||
| "current": { | ||
| "versionsV2": [ | ||
| { | ||
| "renovateTag": "<DO_NOT_UPDATE>", | ||
| "latestVersion": "<SKIP>" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "windows": { | ||
| "ws2019": { | ||
| "versionsV2": [ | ||
|
|
@@ -1324,6 +1334,48 @@ | |
| } | ||
| ] | ||
| } | ||
| }, | ||
| "flatcar": { | ||
| "current": { | ||
| "versionsV2": [ | ||
| { | ||
| "k8sVersion": "1.28", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubelet-sysext", | ||
| "latestVersion": "v1.28.101-4-azlinux3" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are those called azlinux3 ? can they also be used by azurelinux3 ? or maybe osguard ? I'm guessing they are built by azl3 team ? instead of upstream team ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may recall my Dalec sysext work. 😄 We were told we have to use the binaries already published to PMC for these components. Why? Honestly, I still haven't had a clear answer on that, I'm just following orders. But yes, these can be used with OS Guard. Using them with a mutable distro like Azure Linux (or Ubuntu with compatible sysexts) is possible, but you have to effectively ban subsequent writes to /usr. Mutable mode for sysexts is also a thing, but I'm not very familiar with it yet. Thilo can tell you more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To clarify, these are built by the upstream team. They are called |
||
| }, | ||
| { | ||
| "k8sVersion": "1.29", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubelet-sysext", | ||
| "latestVersion": "v1.29.100-2-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.30", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubelet-sysext", | ||
| "latestVersion": "v1.30.100-2-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.31", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubelet-sysext", | ||
| "latestVersion": "v1.31.14-1-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.32", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubelet-sysext", | ||
| "latestVersion": "v1.32.9-4-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.33", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubelet-sysext", | ||
| "latestVersion": "v1.33.7-1-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.34", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubelet-sysext", | ||
| "latestVersion": "v1.34.3-1-azlinux3" | ||
| } | ||
| ], | ||
| "downloadURL": "mcr.microsoft.com/oss/v2/kubernetes/kubelet-sysext:${version}-${SYSTEMD_ARCH}" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so we check for azlinux3 for the versions when we overwrite the systemd arch when we donwload ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I don't understand the question. |
||
| } | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -1375,6 +1427,48 @@ | |
| } | ||
| ] | ||
| } | ||
| }, | ||
| "flatcar": { | ||
| "current": { | ||
| "versionsV2": [ | ||
| { | ||
| "k8sVersion": "1.28", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubectl-sysext", | ||
| "latestVersion": "v1.28.101-6-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.29", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubectl-sysext", | ||
| "latestVersion": "v1.29.100-3-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.30", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubectl-sysext", | ||
| "latestVersion": "v1.30.100-3-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.31", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubectl-sysext", | ||
| "latestVersion": "v1.31.14-1-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.32", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubectl-sysext", | ||
| "latestVersion": "v1.32.9-5-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.33", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubectl-sysext", | ||
| "latestVersion": "v1.33.7-1-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.34", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/kubectl-sysext", | ||
| "latestVersion": "v1.34.3-1-azlinux3" | ||
| } | ||
| ], | ||
| "downloadURL": "mcr.microsoft.com/oss/v2/kubernetes/kubectl-sysext:${version}-${SYSTEMD_ARCH}" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -1485,34 +1579,7 @@ | |
| }, | ||
| "flatcar": { | ||
| "current": { | ||
| "versionsV2": [ | ||
| { | ||
| "k8sVersion": "1.30", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/binaries/kubernetes/azure-acr-credential-provider", | ||
| "latestVersion": "v1.30.15" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.31", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/binaries/kubernetes/azure-acr-credential-provider", | ||
| "latestVersion": "v1.31.12" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.32", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/binaries/kubernetes/azure-acr-credential-provider", | ||
| "latestVersion": "v1.32.11" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.33", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/binaries/kubernetes/azure-acr-credential-provider", | ||
| "latestVersion": "v1.33.6" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.34", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/binaries/kubernetes/azure-acr-credential-provider", | ||
| "latestVersion": "v1.34.3" | ||
| } | ||
| ], | ||
| "downloadURL": "mcr.microsoft.com/oss/binaries/kubernetes/azure-acr-credential-provider:${version}-linux-${CPU_ARCH}" | ||
| "versionsV2": [] | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -1605,6 +1672,28 @@ | |
| } | ||
| ] | ||
| } | ||
| }, | ||
| "flatcar": { | ||
| "current": { | ||
| "versionsV2": [ | ||
| { | ||
| "k8sVersion": "1.32", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/azure-acr-credential-provider-sysext", | ||
| "latestVersion": "v1.32.11-1-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.33", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/azure-acr-credential-provider-sysext", | ||
| "latestVersion": "v1.33.6-1-azlinux3" | ||
| }, | ||
| { | ||
| "k8sVersion": "1.34", | ||
| "renovateTag": "OCI_registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/azure-acr-credential-provider-sysext", | ||
| "latestVersion": "v1.34.3-1-azlinux3" | ||
| } | ||
| ], | ||
| "downloadURL": "mcr.microsoft.com/oss/v2/kubernetes/azure-acr-credential-provider-sysext:${version}-${SYSTEMD_ARCH}" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -340,6 +340,8 @@ ExecStartPost=/sbin/iptables -P FORWARD ACCEPT | |
| EOF | ||
|
|
||
| mkdir -p /etc/containerd | ||
| # Remove in case this is an existing symlink | ||
| rm -f /etc/containerd/config.toml | ||
| if [ "${GPU_NODE}" = "true" ]; then | ||
| # Check VM tag directly to determine if GPU drivers should be skipped | ||
| export -f should_skip_nvidia_drivers | ||
|
|
@@ -550,27 +552,19 @@ EOF | |
| } | ||
|
|
||
| configureKubeletAndKubectl() { | ||
| # Install kubelet and kubectl binaries from URL for Custom Kube binary and Private Kube binary | ||
| if [ -n "${CUSTOM_KUBE_BINARY_DOWNLOAD_URL}" ] || [ -n "${PRIVATE_KUBE_BINARY_DOWNLOAD_URL}" ]; then | ||
| # Install kubelet and kubectl binaries from URL: | ||
| # 1. For Custom Kube binary or Private Kube binary. | ||
| # 2. If k8s version < 1.34.0, skip_bypass_k8s_version_check != true, and not Flatcar (which falls back to URL later). | ||
| # 3. For Azure Linux v2 due to lack of PMC packages (if not network isolated). | ||
| if [ -n "${CUSTOM_KUBE_BINARY_DOWNLOAD_URL}" ] || [ -n "${PRIVATE_KUBE_BINARY_DOWNLOAD_URL}" ] || | ||
| { ! isFlatcar && [ "${SHOULD_ENFORCE_KUBE_PMC_INSTALL}" != true ] && ! semverCompare "${KUBERNETES_VERSION:-0.0.0}" 1.34.0; } || | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess with this logic
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that was the case before either? |
||
| { isMarinerOrAzureLinux && [ "${OS_VERSION}" = 2.0 ] && [ -z "${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER}" ]; } | ||
| then | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlFromURL" installKubeletKubectlFromURL | ||
| # only install kube pkgs from pmc if k8s version >= 1.34.0 or skip_bypass_k8s_version_check is true | ||
| elif [ "${SHOULD_ENFORCE_KUBE_PMC_INSTALL}" != "true" ] && ! semverCompare ${KUBERNETES_VERSION:-"0.0.0"} "1.34.0"; then | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlFromURL" installKubeletKubectlFromURL | ||
| else | ||
| if [ -n "${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER}" ] ; then | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlFromBootstrapProfileRegistry" "installKubeletKubectlFromBootstrapProfileRegistry ${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER} ${KUBERNETES_VERSION}" | ||
| elif isMarinerOrAzureLinux "$OS"; then | ||
| if [ "$OS_VERSION" = "2.0" ]; then | ||
| # we do not publish packages to PMC for azurelinux V2 | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlFromURL" installKubeletKubectlFromURL | ||
| else | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlPkgFromPMC" "installKubeletKubectlPkgFromPMC ${KUBERNETES_VERSION}" | ||
| fi | ||
| elif [ "${OS}" = "${UBUNTU_OS_NAME}" ]; then | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlPkgFromPMC" "installKubeletKubectlPkgFromPMC ${KUBERNETES_VERSION}" | ||
| elif [ "${OS}" = "${FLATCAR_OS_NAME}" ]; then | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlFromURL" installKubeletKubectlFromURL | ||
| fi | ||
| elif [ -n "${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER}" ]; then | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlFromBootstrapProfileRegistry" "installKubeletKubectlFromBootstrapProfileRegistry ${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER} ${KUBERNETES_VERSION}" | ||
| elif isMarinerOrAzureLinux || isFlatcar || isUbuntu; then | ||
| logs_to_events "AKS.CSE.configureKubeletAndKubectl.installKubeletKubectlFromPkg" "installKubeletKubectlFromPkg ${KUBERNETES_VERSION}" | ||
| fi | ||
| } | ||
|
|
||
|
|
@@ -765,23 +759,18 @@ EOF | |
| if [[ $KUBELET_FLAGS == *"image-credential-provider-config"* && $KUBELET_FLAGS == *"image-credential-provider-bin-dir"* ]]; then | ||
| echo "Configure credential provider for both image-credential-provider-config and image-credential-provider-bin-dir flags are specified in KUBELET_FLAGS" | ||
| logs_to_events "AKS.CSE.ensureKubelet.configCredentialProvider" configCredentialProvider | ||
| if { [ "${SHOULD_ENFORCE_KUBE_PMC_INSTALL}" != "true" ] && ! semverCompare ${KUBERNETES_VERSION:-"0.0.0"} "1.34.0"; }; then | ||
| # Install credential provider from URL: | ||
| # 1. If k8s version < 1.34.0, skip_bypass_k8s_version_check != true, and not Flatcar (which falls back to URL later). | ||
| # 2. For Azure Linux v2 due to lack of PMC packages (if not network isolated). | ||
| if { ! isFlatcar && [ "${SHOULD_ENFORCE_KUBE_PMC_INSTALL}" != true ] && ! semverCompare "${KUBERNETES_VERSION:-0.0.0}" 1.34.0; } || | ||
| { isMarinerOrAzureLinux && [ "${OS_VERSION}" = 2.0 ] && [ -z "${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER}" ]; } | ||
| then | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromUrl" installCredentialProviderFromUrl | ||
| elif [ -n "${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER}" ]; then | ||
| # For network isolated clusters, try distro packages first and fallback to binary installation | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromBootstrapProfileRegistry" installCredentialProviderPackageFromBootstrapProfileRegistry ${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER} ${KUBERNETES_VERSION} | ||
| else | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why the else here while the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's just how it was written before. 🤷♂️ I didn't want to change the behaviour. |
||
| if [ -n "${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER}" ] ; then | ||
| # For network isolated clusters, try distro packages first and fallback to binary installation | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromBootstrapProfileRegistry" installCredentialProviderPackageFromBootstrapProfileRegistry ${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER} ${KUBERNETES_VERSION} | ||
| elif isMarinerOrAzureLinux "$OS"; then | ||
| if [ "$OS_VERSION" = "2.0" ]; then # PMC package installation not supported for AzureLinux V2, only V3 | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromUrl" installCredentialProviderFromUrl | ||
| else | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromPMC" "installCredentialProviderFromPMC ${KUBERNETES_VERSION}" | ||
| fi | ||
| elif isFlatcar "$OS"; then # Flatcar cannot use PMC. It will use sysext soon. | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromUrl" installCredentialProviderFromUrl | ||
| else | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromPMC" "installCredentialProviderFromPMC ${KUBERNETES_VERSION}" | ||
| fi | ||
| logs_to_events "AKS.CSE.ensureKubelet.installCredentialProviderFromPkg" "installCredentialProviderFromPkg ${KUBERNETES_VERSION}" | ||
| fi | ||
| fi | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.