From 2a2eeb3f28ff4bdc5822d208fe2c1986404289bc Mon Sep 17 00:00:00 2001 From: Saurabh Parekh Date: Thu, 26 Dec 2024 21:52:03 -0800 Subject: [PATCH] Add end of standard support field to EKS-A bundle --- 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 +++++---- .../crd/bases/anywhere.eks.amazonaws.com_bundles.yaml | 2 ++ 6 files changed, 17 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 cb272f12bc16..b58b4a3bb7cc 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 ed025394bbe7..a551f691f41a 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/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: