From f18c34afd706f01eaff52d2a9bd5f2e60399993e Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Tue, 19 Sep 2023 12:40:11 -0700 Subject: [PATCH] Source Bottlerocket artifacts from new upload location --- release/pkg/assets/archives/archives.go | 2 +- release/pkg/assets/config/bundle_release.go | 3 ++ release/pkg/assets/types/types.go | 1 + .../test/testdata/main-bundle-release.yaml | 48 +++++++++---------- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/release/pkg/assets/archives/archives.go b/release/pkg/assets/archives/archives.go index 87d631722ceab..7f71793626f73 100644 --- a/release/pkg/assets/archives/archives.go +++ b/release/pkg/assets/archives/archives.go @@ -53,7 +53,7 @@ func EksDistroArtifactPathGetter(rc *releasetypes.ReleaseConfig, archive *assett if rc.DevRelease || rc.ReleaseEnvironment == "development" { sourceS3Key = fmt.Sprintf("%s.%s", archive.OSName, imageExtension) - sourceS3Prefix = fmt.Sprintf("%s/%s/%s/%s/%s", projectPath, eksDReleaseChannel, archive.Format, archive.OSName, latestPath) + sourceS3Prefix = fmt.Sprintf("%s/%s/%s/%s/%s/%s", projectPath, eksDReleaseChannel, archive.Format, archive.OSName, archive.OSVersion, latestPath) } else { sourceS3Key = fmt.Sprintf("%s-%s-eks-d-%s-%s-eks-a-%d-%s.%s", archive.OSName, diff --git a/release/pkg/assets/config/bundle_release.go b/release/pkg/assets/config/bundle_release.go index df6066aaf86e6..553ee31c15049 100644 --- a/release/pkg/assets/config/bundle_release.go +++ b/release/pkg/assets/config/bundle_release.go @@ -599,18 +599,21 @@ var bundleReleaseAssetsConfigMap = []assettypes.AssetConfig{ { Name: "eks-distro", OSName: "bottlerocket", + OSVersion: "1", Format: "ami", ArchiveS3PathGetter: archives.EksDistroArtifactPathGetter, }, { Name: "eks-distro", OSName: "bottlerocket", + OSVersion: "1", Format: "ova", ArchiveS3PathGetter: archives.EksDistroArtifactPathGetter, }, { Name: "eks-distro", OSName: "bottlerocket", + OSVersion: "1", Format: "raw", ArchiveS3PathGetter: archives.EksDistroArtifactPathGetter, }, diff --git a/release/pkg/assets/types/types.go b/release/pkg/assets/types/types.go index ebb6223c05528..9d92e1fa7c038 100644 --- a/release/pkg/assets/types/types.go +++ b/release/pkg/assets/types/types.go @@ -44,6 +44,7 @@ type Archive struct { Name string Format string OSName string + OSVersion string ArchitectureOverride string ArchiveS3PathGetter ArchiveS3PathGenerator } diff --git a/release/pkg/test/testdata/main-bundle-release.yaml b/release/pkg/test/testdata/main-bundle-release.yaml index 9d02e15f8a033..051fd0aa3b4bd 100644 --- a/release/pkg/test/testdata/main-bundle-release.yaml +++ b/release/pkg/test/testdata/main-bundle-release.yaml @@ -37,18 +37,18 @@ spec: arch: - amd64 description: Container image for bottlerocket-admin image - imageDigest: sha256:a1b07272379f62ed857c3dd29e0624773a634eec24716c249e7d2fc8b6ef98ec + imageDigest: sha256:2a81ceb8d2f40c1573d2358398da97c12d516888a702e710ea46d0ef5380e5a3 name: bottlerocket-admin os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.10.2 + uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.0 control: arch: - amd64 description: Container image for bottlerocket-control image - imageDigest: sha256:104b9e8def8f9cb07b77d407f774a1d731ef785dd880007cec68d0003d7f1900 + imageDigest: sha256:551be0f7ec17780e766e2ed9d8162b9a65c9f455d32f32aa095f1c5ba5c32118 name: bottlerocket-control os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.3 + uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.4 kubeadmBootstrap: arch: - amd64 @@ -823,18 +823,18 @@ spec: arch: - amd64 description: Container image for bottlerocket-admin image - imageDigest: sha256:a1b07272379f62ed857c3dd29e0624773a634eec24716c249e7d2fc8b6ef98ec + imageDigest: sha256:2a81ceb8d2f40c1573d2358398da97c12d516888a702e710ea46d0ef5380e5a3 name: bottlerocket-admin os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.10.2 + uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.0 control: arch: - amd64 description: Container image for bottlerocket-control image - imageDigest: sha256:104b9e8def8f9cb07b77d407f774a1d731ef785dd880007cec68d0003d7f1900 + imageDigest: sha256:551be0f7ec17780e766e2ed9d8162b9a65c9f455d32f32aa095f1c5ba5c32118 name: bottlerocket-control os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.3 + uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.4 kubeadmBootstrap: arch: - amd64 @@ -1609,18 +1609,18 @@ spec: arch: - amd64 description: Container image for bottlerocket-admin image - imageDigest: sha256:a1b07272379f62ed857c3dd29e0624773a634eec24716c249e7d2fc8b6ef98ec + imageDigest: sha256:2a81ceb8d2f40c1573d2358398da97c12d516888a702e710ea46d0ef5380e5a3 name: bottlerocket-admin os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.10.2 + uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.0 control: arch: - amd64 description: Container image for bottlerocket-control image - imageDigest: sha256:104b9e8def8f9cb07b77d407f774a1d731ef785dd880007cec68d0003d7f1900 + imageDigest: sha256:551be0f7ec17780e766e2ed9d8162b9a65c9f455d32f32aa095f1c5ba5c32118 name: bottlerocket-control os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.3 + uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.4 kubeadmBootstrap: arch: - amd64 @@ -2368,18 +2368,18 @@ spec: arch: - amd64 description: Container image for bottlerocket-admin image - imageDigest: sha256:a1b07272379f62ed857c3dd29e0624773a634eec24716c249e7d2fc8b6ef98ec + imageDigest: sha256:2a81ceb8d2f40c1573d2358398da97c12d516888a702e710ea46d0ef5380e5a3 name: bottlerocket-admin os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.10.2 + uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.0 control: arch: - amd64 description: Container image for bottlerocket-control image - imageDigest: sha256:104b9e8def8f9cb07b77d407f774a1d731ef785dd880007cec68d0003d7f1900 + imageDigest: sha256:551be0f7ec17780e766e2ed9d8162b9a65c9f455d32f32aa095f1c5ba5c32118 name: bottlerocket-control os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.3 + uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.4 kubeadmBootstrap: arch: - amd64 @@ -3127,18 +3127,18 @@ spec: arch: - amd64 description: Container image for bottlerocket-admin image - imageDigest: sha256:a1b07272379f62ed857c3dd29e0624773a634eec24716c249e7d2fc8b6ef98ec + imageDigest: sha256:2a81ceb8d2f40c1573d2358398da97c12d516888a702e710ea46d0ef5380e5a3 name: bottlerocket-admin os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.10.2 + uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.0 control: arch: - amd64 description: Container image for bottlerocket-control image - imageDigest: sha256:104b9e8def8f9cb07b77d407f774a1d731ef785dd880007cec68d0003d7f1900 + imageDigest: sha256:551be0f7ec17780e766e2ed9d8162b9a65c9f455d32f32aa095f1c5ba5c32118 name: bottlerocket-control os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.3 + uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.4 kubeadmBootstrap: arch: - amd64 @@ -3886,18 +3886,18 @@ spec: arch: - amd64 description: Container image for bottlerocket-admin image - imageDigest: sha256:a1b07272379f62ed857c3dd29e0624773a634eec24716c249e7d2fc8b6ef98ec + imageDigest: sha256:2a81ceb8d2f40c1573d2358398da97c12d516888a702e710ea46d0ef5380e5a3 name: bottlerocket-admin os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.10.2 + uri: public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.0 control: arch: - amd64 description: Container image for bottlerocket-control image - imageDigest: sha256:104b9e8def8f9cb07b77d407f774a1d731ef785dd880007cec68d0003d7f1900 + imageDigest: sha256:551be0f7ec17780e766e2ed9d8162b9a65c9f455d32f32aa095f1c5ba5c32118 name: bottlerocket-control os: linux - uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.3 + uri: public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.4 kubeadmBootstrap: arch: - amd64