2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-01-19 09:57:50 -05:00
|
|
|
/*
|
|
|
|
Package versions defines the supported versions of Constellation components.
|
|
|
|
|
|
|
|
Binaries and container image versions are pinned by their hashes, the generate tool can be found in the hash-generator subpackage.
|
|
|
|
*/
|
2022-07-21 08:41:07 -04:00
|
|
|
package versions
|
|
|
|
|
2022-10-06 06:58:56 -04:00
|
|
|
import (
|
|
|
|
"fmt"
|
2023-01-31 06:12:19 -05:00
|
|
|
"sort"
|
2022-10-06 06:58:56 -04:00
|
|
|
"strings"
|
2022-11-14 13:09:49 -05:00
|
|
|
|
2023-02-09 11:38:02 -05:00
|
|
|
"github.com/edgelesssys/constellation/v2/internal/compatibility"
|
2022-11-14 13:09:49 -05:00
|
|
|
"github.com/edgelesssys/constellation/v2/internal/constants"
|
2023-01-06 06:04:36 -05:00
|
|
|
"github.com/edgelesssys/constellation/v2/internal/versions/components"
|
2023-01-31 06:12:19 -05:00
|
|
|
"golang.org/x/mod/semver"
|
2022-10-06 06:58:56 -04:00
|
|
|
)
|
2022-07-22 09:05:04 -04:00
|
|
|
|
2023-01-31 06:12:19 -05:00
|
|
|
// SupportedK8sVersions returns a list (sorted) of supported Kubernetes versions.
|
|
|
|
func SupportedK8sVersions() []string {
|
|
|
|
validVersions := make([]string, len(VersionConfigs))
|
|
|
|
i := 0
|
|
|
|
for _, conf := range VersionConfigs {
|
2023-02-09 11:38:02 -05:00
|
|
|
validVersions[i] = compatibility.EnsurePrefixV(conf.ClusterVersion)
|
2023-01-31 06:12:19 -05:00
|
|
|
i++
|
|
|
|
}
|
|
|
|
validVersionsSorted := semver.ByVersion(validVersions)
|
|
|
|
sort.Sort(validVersionsSorted)
|
|
|
|
|
|
|
|
return validVersionsSorted
|
|
|
|
}
|
|
|
|
|
2022-07-22 09:05:04 -04:00
|
|
|
// ValidK8sVersion represents any of the three currently supported k8s versions.
|
|
|
|
type ValidK8sVersion string
|
|
|
|
|
|
|
|
// NewValidK8sVersion validates the given string and produces a new ValidK8sVersion object.
|
|
|
|
func NewValidK8sVersion(k8sVersion string) (ValidK8sVersion, error) {
|
|
|
|
if IsSupportedK8sVersion(k8sVersion) {
|
|
|
|
return ValidK8sVersion(k8sVersion), nil
|
|
|
|
}
|
|
|
|
return "", fmt.Errorf("invalid k8sVersion supplied: %s", k8sVersion)
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSupportedK8sVersion checks if a given Kubernetes version is supported by Constellation.
|
|
|
|
func IsSupportedK8sVersion(version string) bool {
|
2023-02-22 03:52:47 -05:00
|
|
|
for _, valid := range SupportedK8sVersions() {
|
|
|
|
if valid == version {
|
|
|
|
return true
|
|
|
|
}
|
2022-07-22 09:05:04 -04:00
|
|
|
}
|
2023-02-22 03:52:47 -05:00
|
|
|
return false
|
2022-07-22 09:05:04 -04:00
|
|
|
}
|
|
|
|
|
2022-09-02 08:05:44 -04:00
|
|
|
// IsPreviewK8sVersion checks if a given Kubernetes version is still in preview and not fully supported.
|
2023-03-20 06:03:36 -04:00
|
|
|
func IsPreviewK8sVersion(_ ValidK8sVersion) bool {
|
2022-10-06 04:43:46 -04:00
|
|
|
return false
|
2022-09-02 08:05:44 -04:00
|
|
|
}
|
|
|
|
|
2022-07-21 08:41:07 -04:00
|
|
|
const (
|
2022-11-09 09:57:54 -05:00
|
|
|
//
|
2022-07-21 08:41:07 -04:00
|
|
|
// Constellation images.
|
|
|
|
// These images are built in a way that they support all versions currently listed in VersionConfigs.
|
2022-11-09 09:57:54 -05:00
|
|
|
//
|
|
|
|
|
|
|
|
// KonnectivityAgentImage agent image for konnectivity service.
|
2023-03-20 11:35:26 -04:00
|
|
|
KonnectivityAgentImage = "registry.k8s.io/kas-network-proxy/proxy-agent:v0.1.2@sha256:cd3046d253d26ffb5907c625e0d0c2be05c5693c90e12116980851739fc0ead8" // renovate:container
|
2022-11-09 09:57:54 -05:00
|
|
|
// KonnectivityServerImage server image for konnectivity service.
|
2023-03-20 11:35:26 -04:00
|
|
|
KonnectivityServerImage = "registry.k8s.io/kas-network-proxy/proxy-server:v0.1.2@sha256:79933c3779bc30e33bb7509dff913e70f6ba78ad441f4827f0f3e840ce5f3ddb" // renovate:container
|
2022-11-09 09:57:54 -05:00
|
|
|
// JoinImage image of Constellation join service.
|
2023-03-29 05:31:26 -04:00
|
|
|
JoinImage = "ghcr.io/edgelesssys/constellation/join-service:v2.7.0-pre.0.20230327112339-ac010f85f74f@sha256:7665a67f3c097a882763d6036a4ffdafe152a43862448e7103fb4a9679fe5946" // renovate:container
|
2023-01-16 09:04:07 -05:00
|
|
|
// KeyServiceImage image of Constellation KMS server.
|
2023-03-29 05:31:26 -04:00
|
|
|
KeyServiceImage = "ghcr.io/edgelesssys/constellation/key-service:v2.7.0-pre.0.20230323170849-e7fc541a5760@sha256:d2e87b4bccf8b07f9c4778d40ffb78c0c99c58156d628052598ee6ba154e6215" // renovate:container
|
2022-11-09 09:57:54 -05:00
|
|
|
// VerificationImage image of Constellation verification service.
|
2023-03-29 05:31:26 -04:00
|
|
|
VerificationImage = "ghcr.io/edgelesssys/constellation/verification-service:v2.7.0-pre.0.20230327112339-ac010f85f74f@sha256:6dbb75fa643d044a65abff7857151e727c1967440e2bc46312191200e982733b" // renovate:container
|
2022-11-09 09:57:54 -05:00
|
|
|
// GcpGuestImage image for GCP guest agent.
|
2022-10-07 11:50:59 -04:00
|
|
|
// Check for new versions at https://github.com/GoogleCloudPlatform/guest-agent/releases and update in /.github/workflows/build-gcp-guest-agent.yml.
|
2023-03-13 05:35:57 -04:00
|
|
|
GcpGuestImage = "ghcr.io/edgelesssys/gcp-guest-agent:20230221.0@sha256:8be328a5d8d601170b82481d413cf326b20c5219c016633f1651e35d95f1d6f1" // renovate:container
|
2022-11-21 04:35:40 -05:00
|
|
|
// ConstellationOperatorImage is the image for the constellation node operator.
|
2023-03-29 05:31:26 -04:00
|
|
|
ConstellationOperatorImage = "ghcr.io/edgelesssys/constellation/node-operator:v2.7.0-pre.0.20230324160839-da4e2521a9cd@sha256:ea1c351907e9ce989e63bd636a0b1fd090f8d496d80f471d859d49999f7439b4" // renovate:container
|
2022-11-21 04:35:40 -05:00
|
|
|
// NodeMaintenanceOperatorImage is the image for the node maintenance operator.
|
2023-01-12 10:01:03 -05:00
|
|
|
NodeMaintenanceOperatorImage = "quay.io/medik8s/node-maintenance-operator:v0.14.0@sha256:2dffb6ffdbbe997d317799fc709baf030d678bde0be0264931ff6b3e94fd89ab" // renovate:container
|
2022-07-22 09:05:04 -04:00
|
|
|
|
2022-11-09 09:57:54 -05:00
|
|
|
// QEMUMetadataImage image of QEMU metadata api service.
|
2023-03-29 05:31:26 -04:00
|
|
|
QEMUMetadataImage = "ghcr.io/edgelesssys/constellation/qemu-metadata-api:v2.7.0-pre.0.20230323135738-c057fac31544@sha256:dfbc53f08669402d40290b073b45e0b8ba43cea5ced8ea58ecf4b43615c96c6b" // renovate:container
|
2022-11-09 09:57:54 -05:00
|
|
|
// LibvirtImage image that provides libvirt.
|
2023-03-22 13:30:59 -04:00
|
|
|
LibvirtImage = "ghcr.io/edgelesssys/constellation/libvirt:v2.7.0-pre.0.20230322165747-0a190c2bf672@sha256:3004f83bc7f62cf7c5f44406a4a81c4a59da2db499e91cef1f2490adc3a6261c" // renovate:container
|
2022-10-07 03:38:43 -04:00
|
|
|
|
2022-11-17 09:25:25 -05:00
|
|
|
// LogstashImage is the container image of logstash, used for log collection by debugd.
|
2023-03-22 13:30:59 -04:00
|
|
|
LogstashImage = "ghcr.io/edgelesssys/constellation/logstash-debugd:v2.7.0-pre.0.20230322165747-0a190c2bf672@sha256:544928006827a07183a7f0d8329ed9031103ab43e03842cae8b6062edf9d49dd" // renovate:container
|
2022-11-17 09:25:25 -05:00
|
|
|
// FilebeatImage is the container image of filebeat, used for log collection by debugd.
|
2023-03-22 13:30:59 -04:00
|
|
|
FilebeatImage = "ghcr.io/edgelesssys/constellation/filebeat-debugd:v2.7.0-pre.0.20230322165747-0a190c2bf672@sha256:233c485841dbb043a1fe313d38fc9764ab416e9d7cb30f2fffc3b416c89b312a" // renovate:container
|
2022-11-17 09:25:25 -05:00
|
|
|
|
2022-07-22 09:05:04 -04:00
|
|
|
// currently supported versions.
|
2022-10-05 09:02:46 -04:00
|
|
|
//nolint:revive
|
2023-03-22 09:27:07 -04:00
|
|
|
V1_24 ValidK8sVersion = "v1.24.12" // renovate:kubernetes-release
|
2022-10-05 09:02:46 -04:00
|
|
|
//nolint:revive
|
2023-03-22 09:27:07 -04:00
|
|
|
V1_25 ValidK8sVersion = "v1.25.8" // renovate:kubernetes-release
|
2022-12-09 10:30:21 -05:00
|
|
|
//nolint:revive
|
2023-03-22 09:27:07 -04:00
|
|
|
V1_26 ValidK8sVersion = "v1.26.3" // renovate:kubernetes-release
|
2022-10-05 09:02:46 -04:00
|
|
|
|
2022-11-09 09:57:54 -05:00
|
|
|
// Default k8s version deployed by Constellation.
|
2022-12-09 10:30:21 -05:00
|
|
|
Default ValidK8sVersion = V1_25
|
2022-07-21 08:41:07 -04:00
|
|
|
)
|
|
|
|
|
2022-11-10 09:20:10 -05:00
|
|
|
// Regenerate the hashes by running go generate.
|
|
|
|
// To add another Kubernetes version, add a new entry to the VersionConfigs map below and fill the Hash field with an empty string.
|
2023-03-29 07:58:37 -04:00
|
|
|
//go:generate hash-generator
|
2022-11-10 09:20:10 -05:00
|
|
|
|
2022-11-09 09:57:54 -05:00
|
|
|
// VersionConfigs holds download URLs for all required kubernetes components for every supported version.
|
2022-10-05 09:02:46 -04:00
|
|
|
var VersionConfigs = map[ValidK8sVersion]KubernetesVersion{
|
2022-07-26 11:08:57 -04:00
|
|
|
V1_24: {
|
2023-03-22 09:27:07 -04:00
|
|
|
ClusterVersion: "v1.24.12", // renovate:kubernetes-release
|
2023-01-06 06:04:36 -05:00
|
|
|
KubernetesComponents: components.Components{
|
2022-11-14 13:09:49 -05:00
|
|
|
{
|
2023-01-23 08:56:28 -05:00
|
|
|
URL: "https://github.com/containernetworking/plugins/releases/download/v1.2.0/cni-plugins-linux-amd64-v1.2.0.tgz", // renovate:cni-plugins-release
|
|
|
|
Hash: "sha256:f3a841324845ca6bf0d4091b4fc7f97e18a623172158b72fc3fdcdb9d42d2d37",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.CniPluginsDir,
|
|
|
|
Extract: true,
|
|
|
|
},
|
|
|
|
{
|
2022-12-14 09:39:17 -05:00
|
|
|
URL: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.26.0/crictl-v1.26.0-linux-amd64.tar.gz", // renovate:crictl-release
|
|
|
|
Hash: "sha256:cda5e2143bf19f6b548110ffba0fe3565e03e8743fadd625fee3d62fc4134eed",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.BinDir,
|
|
|
|
Extract: true,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.24.12/bin/linux/amd64/kubelet", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:3105c4165cd4efea154046cac27ca087b10098c1793148fe2797b631e2897a2e",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.KubeletPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.24.12/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:a6daad39597a9d3d4c49a44ce2b77bb45290855085cbfe2e1b20afd84f40d143",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.KubeadmPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.24.12/bin/linux/amd64/kubectl", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:25875551d4242339bcc8cef0c18f0a0f631ea621f6fab1190a5aaab466634e7c",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.KubectlPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
2022-11-10 09:20:10 -05:00
|
|
|
},
|
2022-10-24 10:13:26 -04:00
|
|
|
// CloudControllerManagerImageAWS is the CCM image used on AWS.
|
2023-01-05 10:35:19 -05:00
|
|
|
CloudControllerManagerImageAWS: "registry.k8s.io/provider-aws/cloud-controller-manager:v1.24.4@sha256:56f1e111977989a403ae2bb53a2b4d1565d1ce132016efe47cfbe45b635ec9cd", // renovate:container
|
2022-07-26 11:08:57 -04:00
|
|
|
// CloudControllerManagerImageAzure is the CCM image used on Azure.
|
2023-03-22 05:23:44 -04:00
|
|
|
CloudControllerManagerImageAzure: "mcr.microsoft.com/oss/kubernetes/azure-cloud-controller-manager:v1.24.17@sha256:dc5a74fe39722890adecb56efd0a70f62540c0d86aa91a2f65ff87565aaf3309", // renovate:container
|
2022-07-26 11:08:57 -04:00
|
|
|
// CloudNodeManagerImageAzure is the cloud-node-manager image used on Azure.
|
2023-03-22 05:23:44 -04:00
|
|
|
CloudNodeManagerImageAzure: "mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.24.17@sha256:e670919ed7943ec87d61f4adf7aae449be841b98cf262e2a0f7d724326a2bf47", // renovate:container
|
2023-03-17 04:44:30 -04:00
|
|
|
// CloudControllerManagerImageGCP is the CCM image used on GCP.
|
|
|
|
// TODO: use newer "cloud-provider-gcp" from https://github.com/kubernetes/cloud-provider-gcp when newer releases are available.
|
|
|
|
CloudControllerManagerImageGCP: "ghcr.io/edgelesssys/cloud-provider-gcp:v24.0.0@sha256:80e2910509ccb4d99b2e08182c2101fbed64f0663194adae08fc1cf878ecc58b", // renovate:container
|
|
|
|
// CloudControllerManagerImageOpenStack is the CCM image used on OpenStack.
|
|
|
|
CloudControllerManagerImageOpenStack: "docker.io/k8scloudprovider/openstack-cloud-controller-manager:v1.24.6", // renovate:container
|
2022-07-26 11:08:57 -04:00
|
|
|
// External service image. Depends on k8s version.
|
2022-12-12 05:35:12 -05:00
|
|
|
ClusterAutoscalerImage: "registry.k8s.io/autoscaling/cluster-autoscaler:v1.24.0@sha256:5bd22353ae7f30c9abfaa08189281367ef47ea1b3d09eb13eb26bd13de241e72", // renovate:container
|
2022-07-26 11:08:57 -04:00
|
|
|
},
|
2022-09-02 08:05:44 -04:00
|
|
|
V1_25: {
|
2023-03-22 09:27:07 -04:00
|
|
|
ClusterVersion: "v1.25.8", // renovate:kubernetes-release
|
2023-01-06 06:04:36 -05:00
|
|
|
KubernetesComponents: components.Components{
|
2022-11-14 13:09:49 -05:00
|
|
|
{
|
2023-01-23 08:56:28 -05:00
|
|
|
URL: "https://github.com/containernetworking/plugins/releases/download/v1.2.0/cni-plugins-linux-amd64-v1.2.0.tgz", // renovate:cni-plugins-release
|
|
|
|
Hash: "sha256:f3a841324845ca6bf0d4091b4fc7f97e18a623172158b72fc3fdcdb9d42d2d37",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.CniPluginsDir,
|
|
|
|
Extract: true,
|
|
|
|
},
|
|
|
|
{
|
2022-12-14 09:39:17 -05:00
|
|
|
URL: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.26.0/crictl-v1.26.0-linux-amd64.tar.gz", // renovate:crictl-release
|
|
|
|
Hash: "sha256:cda5e2143bf19f6b548110ffba0fe3565e03e8743fadd625fee3d62fc4134eed",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.BinDir,
|
|
|
|
Extract: true,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.25.8/bin/linux/amd64/kubelet", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:3aa821165da6f1bb9fdb82a91b294b7f4abfc4fdfb21a94fa1e09a9785876516",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.KubeletPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.25.8/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:2ae844776ac48273d868f92a7ed9d54b4a6e9b0e4d05874d77b7c0f4bfa60379",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.KubeadmPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.25.8/bin/linux/amd64/kubectl", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:80e70448455f3d19c3cb49bd6ff6fc913677f4f240d368fa2b9f0d400c8cd16e",
|
2022-11-14 13:09:49 -05:00
|
|
|
InstallPath: constants.KubectlPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
2022-11-10 09:20:10 -05:00
|
|
|
},
|
2022-10-24 10:13:26 -04:00
|
|
|
// CloudControllerManagerImageAWS is the CCM image used on AWS.
|
2023-01-27 05:30:43 -05:00
|
|
|
CloudControllerManagerImageAWS: "registry.k8s.io/provider-aws/cloud-controller-manager:v1.25.3@sha256:47eb1c1e6a3bd6d0fb44ac4992885b6218f1448ea339de778d8b703df463c06f", // renovate:container
|
2022-12-09 10:30:21 -05:00
|
|
|
// CloudControllerManagerImageAzure is the CCM image used on Azure.
|
|
|
|
// Check for newer versions at https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/README.md.
|
2023-03-22 05:23:44 -04:00
|
|
|
CloudControllerManagerImageAzure: "mcr.microsoft.com/oss/kubernetes/azure-cloud-controller-manager:v1.25.11@sha256:f287ec68bda1aea9dbb85fea23a133bf384137c23f464ad411fc6b6f25477a93", // renovate:container
|
2022-12-09 10:30:21 -05:00
|
|
|
// CloudNodeManagerImageAzure is the cloud-node-manager image used on Azure.
|
|
|
|
// Check for newer versions at https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/README.md.
|
2023-03-22 05:23:44 -04:00
|
|
|
CloudNodeManagerImageAzure: "mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.25.11@sha256:ad54f4e9a357e5b0c2d23e139889da1eb3b1b24194a7ea0d1e1061f27e35b05f", // renovate:container
|
2023-03-17 04:44:30 -04:00
|
|
|
// CloudControllerManagerImageGCP is the CCM image used on GCP.
|
|
|
|
// TODO: use newer "cloud-provider-gcp" from https://github.com/kubernetes/cloud-provider-gcp when newer releases are available.
|
|
|
|
CloudControllerManagerImageGCP: "ghcr.io/edgelesssys/cloud-provider-gcp:v25.2.0@sha256:86fa9d31ed0b3d0d8806f13d6e7debd3471028b2cb7cca3a876d8a31612a7ba5", // renovate:container
|
|
|
|
// CloudControllerManagerImageOpenStack is the CCM image used on OpenStack.
|
|
|
|
CloudControllerManagerImageOpenStack: "docker.io/k8scloudprovider/openstack-cloud-controller-manager:v1.25.5", // renovate:container
|
2022-12-09 10:30:21 -05:00
|
|
|
// External service image. Depends on k8s version.
|
|
|
|
// Check for new versions at https://github.com/kubernetes/autoscaler/releases.
|
2022-12-12 05:35:12 -05:00
|
|
|
ClusterAutoscalerImage: "registry.k8s.io/autoscaling/cluster-autoscaler:v1.25.0@sha256:f509ffab618dbd07d129b69ec56963aac7f61aaa792851206b54a2f0bbe046df", // renovate:container
|
2022-12-09 10:30:21 -05:00
|
|
|
},
|
|
|
|
V1_26: {
|
2023-03-22 09:27:07 -04:00
|
|
|
ClusterVersion: "v1.26.3", // renovate:kubernetes-release
|
2023-01-06 06:04:36 -05:00
|
|
|
KubernetesComponents: components.Components{
|
2022-12-09 10:30:21 -05:00
|
|
|
{
|
2023-01-23 08:56:28 -05:00
|
|
|
URL: "https://github.com/containernetworking/plugins/releases/download/v1.2.0/cni-plugins-linux-amd64-v1.2.0.tgz", // renovate:cni-plugins-release
|
|
|
|
Hash: "sha256:f3a841324845ca6bf0d4091b4fc7f97e18a623172158b72fc3fdcdb9d42d2d37",
|
2022-12-09 10:30:21 -05:00
|
|
|
InstallPath: constants.CniPluginsDir,
|
|
|
|
Extract: true,
|
|
|
|
},
|
|
|
|
{
|
2022-12-14 09:39:17 -05:00
|
|
|
URL: "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.26.0/crictl-v1.26.0-linux-amd64.tar.gz", // renovate:crictl-release
|
|
|
|
Hash: "sha256:cda5e2143bf19f6b548110ffba0fe3565e03e8743fadd625fee3d62fc4134eed",
|
2022-12-09 10:30:21 -05:00
|
|
|
InstallPath: constants.BinDir,
|
|
|
|
Extract: true,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.26.3/bin/linux/amd64/kubelet", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:992d6298bd494b65f54c838419773c4976aca72dfb36271c613537efae7ab7d2",
|
2022-12-09 10:30:21 -05:00
|
|
|
InstallPath: constants.KubeletPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.26.3/bin/linux/amd64/kubeadm", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:87a1bf6603e252a8fa46be44382ea218cb8e4f066874d149dc589d0f3a405fed",
|
2022-12-09 10:30:21 -05:00
|
|
|
InstallPath: constants.KubeadmPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
|
|
|
{
|
2023-03-22 09:27:07 -04:00
|
|
|
URL: "https://storage.googleapis.com/kubernetes-release/release/v1.26.3/bin/linux/amd64/kubectl", // renovate:kubernetes-release
|
|
|
|
Hash: "sha256:026c8412d373064ab0359ed0d1a25c975e9ce803a093d76c8b30c5996ad73e75",
|
2022-12-09 10:30:21 -05:00
|
|
|
InstallPath: constants.KubectlPath,
|
|
|
|
Extract: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// CloudControllerManagerImageAWS is the CCM image used on AWS.
|
2023-03-13 06:12:50 -04:00
|
|
|
CloudControllerManagerImageAWS: "registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.1@sha256:2a43d2d5611ba920c49e23127cfd474fb7932fcade1671dddbef757921fcdb40", // renovate:container
|
2022-09-02 08:05:44 -04:00
|
|
|
// CloudControllerManagerImageAzure is the CCM image used on Azure.
|
2022-10-06 05:18:23 -04:00
|
|
|
// Check for newer versions at https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/README.md.
|
2023-03-22 05:23:44 -04:00
|
|
|
CloudControllerManagerImageAzure: "mcr.microsoft.com/oss/kubernetes/azure-cloud-controller-manager:v1.26.7@sha256:c23ce2231f91c7af3bb4204a7b9c04ae12e63e32581bd41d26a382f959363633", // renovate:container
|
2022-09-02 08:05:44 -04:00
|
|
|
// CloudNodeManagerImageAzure is the cloud-node-manager image used on Azure.
|
2022-10-06 05:18:23 -04:00
|
|
|
// Check for newer versions at https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/README.md.
|
2023-03-22 05:23:44 -04:00
|
|
|
CloudNodeManagerImageAzure: "mcr.microsoft.com/oss/kubernetes/azure-cloud-node-manager:v1.26.7@sha256:258f2bf85fdeee7a6ffbeb618109da7dd50925c40c3b8a74f358f0c46a03019b", // renovate:container
|
2023-03-17 04:44:30 -04:00
|
|
|
// CloudControllerManagerImageGCP is the CCM image used on GCP.
|
|
|
|
// TODO: use newer "cloud-provider-gcp" from https://github.com/kubernetes/cloud-provider-gcp when newer releases are available.
|
|
|
|
CloudControllerManagerImageGCP: "ghcr.io/edgelesssys/cloud-provider-gcp:v26.0.1@sha256:db2b15a20ad690784a6015bfad55c4dff15826be8cf9f6ac77d70abd11b1f70c", // renovate:container
|
|
|
|
// CloudControllerManagerImageOpenStack is the CCM image used on OpenStack.
|
|
|
|
CloudControllerManagerImageOpenStack: "docker.io/k8scloudprovider/openstack-cloud-controller-manager:v1.26.2", // renovate:container
|
2022-09-02 08:05:44 -04:00
|
|
|
// External service image. Depends on k8s version.
|
2022-10-06 05:18:23 -04:00
|
|
|
// Check for new versions at https://github.com/kubernetes/autoscaler/releases.
|
2023-01-06 10:47:31 -05:00
|
|
|
ClusterAutoscalerImage: "registry.k8s.io/autoscaling/cluster-autoscaler:v1.26.1@sha256:c0b4ef409e23a79b28e2e9710d7317dbddeab141f4021895ebe90422eba1055c", // renovate:container
|
2022-09-02 08:05:44 -04:00
|
|
|
},
|
2022-07-21 08:41:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// KubernetesVersion bundles download URLs to all version-releated binaries necessary for installing/deploying a particular Kubernetes version.
|
|
|
|
type KubernetesVersion struct {
|
2023-03-17 04:44:30 -04:00
|
|
|
ClusterVersion string
|
|
|
|
KubernetesComponents components.Components
|
|
|
|
CloudControllerManagerImageAWS string // k8s version dependency.
|
|
|
|
CloudControllerManagerImageAzure string // k8s version dependency.
|
|
|
|
CloudControllerManagerImageGCP string // Using self-built image until resolved: https://github.com/kubernetes/cloud-provider-gcp/issues/289
|
|
|
|
CloudControllerManagerImageOpenStack string // k8s version dependency.
|
|
|
|
CloudNodeManagerImageAzure string // k8s version dependency. Same version as above.
|
|
|
|
ClusterAutoscalerImage string // Matches k8s versioning scheme.
|
2022-11-14 13:09:49 -05:00
|
|
|
}
|
|
|
|
|
2022-10-06 06:58:56 -04:00
|
|
|
// versionFromDockerImage returns the version tag from the image name, e.g. "v1.22.2" from "foocr.io/org/repo:v1.22.2@sha256:3009fj0...".
|
|
|
|
func versionFromDockerImage(imageName string) string {
|
|
|
|
beforeAt, _, _ := strings.Cut(imageName, "@")
|
|
|
|
_, version, ok := strings.Cut(beforeAt, ":")
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Errorf("failed to extract version from image name, no ':' found in %s", imageName))
|
|
|
|
}
|
|
|
|
return version
|
|
|
|
}
|