From 4783df3af648a714b23fa492809ebe9273f27136 Mon Sep 17 00:00:00 2001 From: Saurabh Parekh Date: Wed, 1 Jan 2025 21:32:14 -0800 Subject: [PATCH] Add end of standard support field to EKS-A bundle (#9115) * Add end of standard support field to EKS-A bundle * Update testdata file with end of standard support dates for kubernetes versions from v1.28 onwards --- config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml | 2 ++ config/manifest/eksa-components.yaml | 3 +++ release/api/v1alpha1/bundle_types.go | 1 + release/cli/pkg/bundles/bundles.go | 4 ++++ release/cli/pkg/filereader/file_reader.go | 9 +++++---- .../cli/pkg/operations/testdata/main-bundle-release.yaml | 4 ++++ .../crd/bases/anywhere.eks.amazonaws.com_bundles.yaml | 2 ++ 7 files changed, 21 insertions(+), 4 deletions(-) diff --git a/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml b/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml index 3618fef2164c..636f13115f6f 100644 --- a/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml +++ b/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml @@ -1384,6 +1384,8 @@ spec: - components - diagnosticCollector type: object + endOfStandardSupport: + type: string etcdadmBootstrap: properties: components: diff --git a/config/manifest/eksa-components.yaml b/config/manifest/eksa-components.yaml index 76a384cc51d0..0606745ab7c1 100644 --- a/config/manifest/eksa-components.yaml +++ b/config/manifest/eksa-components.yaml @@ -1553,6 +1553,8 @@ spec: - components - diagnosticCollector type: object + endOfStandardSupport: + type: string etcdadmBootstrap: properties: components: @@ -3453,6 +3455,7 @@ spec: - docker - eksD - eksa + - endOfStandardSupport - etcdadmBootstrap - etcdadmController - flux diff --git a/release/api/v1alpha1/bundle_types.go b/release/api/v1alpha1/bundle_types.go index 2c148923b104..af2c5a2bac1a 100644 --- a/release/api/v1alpha1/bundle_types.go +++ b/release/api/v1alpha1/bundle_types.go @@ -61,6 +61,7 @@ func init() { type VersionsBundle struct { KubeVersion string `json:"kubeVersion"` + EndOfStandardSupport string `json:"endOfStandardSupport,omitempty"` EksD EksDRelease `json:"eksD"` CertManager CertManagerBundle `json:"certManager"` ClusterAPI CoreClusterAPI `json:"clusterAPI"` diff --git a/release/cli/pkg/bundles/bundles.go b/release/cli/pkg/bundles/bundles.go index 13a4050c4be3..3612c8fec86e 100644 --- a/release/cli/pkg/bundles/bundles.go +++ b/release/cli/pkg/bundles/bundles.go @@ -151,6 +151,7 @@ func GetVersionsBundles(r *releasetypes.ReleaseConfig, imageDigests releasetypes number := strconv.Itoa(release.Number) dev := release.Dev kubeVersion := release.KubeVersion + endOfStandardSupport := release.EndOfStandardSupport shortKubeVersion := strings.Join(strings.SplitN(kubeVersion[1:], ".", 3)[:2], ".") if !slices.Contains(supportedK8sVersions, channel) { @@ -206,6 +207,9 @@ func GetVersionsBundles(r *releasetypes.ReleaseConfig, imageDigests releasetypes Nutanix: nutanixBundle, Upgrader: upgraderBundle, } + if endOfStandardSupport != "" { + versionsBundle.EndOfStandardSupport = endOfStandardSupport + } versionsBundles = append(versionsBundles, versionsBundle) } return versionsBundles, nil diff --git a/release/cli/pkg/filereader/file_reader.go b/release/cli/pkg/filereader/file_reader.go index 4e7c245b05e6..826ca0ffa7e8 100644 --- a/release/cli/pkg/filereader/file_reader.go +++ b/release/cli/pkg/filereader/file_reader.go @@ -37,10 +37,11 @@ import ( ) type EksDLatestRelease struct { - Branch string `json:"branch"` - KubeVersion string `json:"kubeVersion"` - Number int `json:"number"` - Dev bool `json:"dev,omitempty"` + Branch string `json:"branch"` + KubeVersion string `json:"kubeVersion"` + Number int `json:"number"` + Dev bool `json:"dev,omitempty"` + EndOfStandardSupport string `json:"endOfStandardSupport,omitempty"` } type EksDLatestReleases struct { diff --git a/release/cli/pkg/operations/testdata/main-bundle-release.yaml b/release/cli/pkg/operations/testdata/main-bundle-release.yaml index ddc034df63be..fb14a907ad66 100644 --- a/release/cli/pkg/operations/testdata/main-bundle-release.yaml +++ b/release/cli/pkg/operations/testdata/main-bundle-release.yaml @@ -1143,6 +1143,7 @@ spec: os: linux uri: public.ecr.aws/release-container-registry/eks-anywhere-diagnostic-collector:v0.21.3-eks-a-v0.0.0-dev-build.1 version: v0.0.0-dev+build.0+abcdef1 + endOfStandardSupport: "2024-12-31" etcdadmBootstrap: components: uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/etcdadm-bootstrap-provider/manifests/bootstrap-etcdadm-bootstrap/v1.0.15/bootstrap-components.yaml @@ -1958,6 +1959,7 @@ spec: os: linux uri: public.ecr.aws/release-container-registry/eks-anywhere-diagnostic-collector:v0.21.3-eks-a-v0.0.0-dev-build.1 version: v0.0.0-dev+build.0+abcdef1 + endOfStandardSupport: "2025-04-30" etcdadmBootstrap: components: uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/etcdadm-bootstrap-provider/manifests/bootstrap-etcdadm-bootstrap/v1.0.15/bootstrap-components.yaml @@ -2773,6 +2775,7 @@ spec: os: linux uri: public.ecr.aws/release-container-registry/eks-anywhere-diagnostic-collector:v0.21.3-eks-a-v0.0.0-dev-build.1 version: v0.0.0-dev+build.0+abcdef1 + endOfStandardSupport: "2025-08-31" etcdadmBootstrap: components: uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/etcdadm-bootstrap-provider/manifests/bootstrap-etcdadm-bootstrap/v1.0.15/bootstrap-components.yaml @@ -3588,6 +3591,7 @@ spec: os: linux uri: public.ecr.aws/release-container-registry/eks-anywhere-diagnostic-collector:v0.21.3-eks-a-v0.0.0-dev-build.1 version: v0.0.0-dev+build.0+abcdef1 + endOfStandardSupport: "2025-12-31" etcdadmBootstrap: components: uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/etcdadm-bootstrap-provider/manifests/bootstrap-etcdadm-bootstrap/v1.0.15/bootstrap-components.yaml diff --git a/release/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml b/release/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml index 3618fef2164c..636f13115f6f 100644 --- a/release/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml +++ b/release/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml @@ -1384,6 +1384,8 @@ spec: - components - diagnosticCollector type: object + endOfStandardSupport: + type: string etcdadmBootstrap: properties: components: