From 9739a0ca8bd54149b90c69229e2ab776e8b0ca8e Mon Sep 17 00:00:00 2001 From: Rahul Ganesh Date: Fri, 24 Jan 2025 17:22:14 -0800 Subject: [PATCH] Add Hook ISO image to eksa bundles Signed-off-by: Rahul Ganesh --- .../anywhere.eks.amazonaws.com_bundles.yaml | 89 ++++++++++++++++++- config/manifest/eksa-components.yaml | 81 ++++++++++++++++- pkg/providers/tinkerbell/stack/stack_test.go | 5 ++ release/api/v1alpha1/bundle_types.go | 1 + release/api/v1alpha1/zz_generated.deepcopy.go | 1 + .../cli/pkg/assets/config/bundle_release.go | 11 +++ release/cli/pkg/bundles/tinkerbell.go | 4 + .../testdata/main-bundle-release.yaml | 70 +++++++++++++++ .../anywhere.eks.amazonaws.com_bundles.yaml | 89 ++++++++++++++++++- ...ywhere.eks.amazonaws.com_eksareleases.yaml | 2 +- .../anywhere.eks.amazonaws.com_releases.yaml | 2 +- 11 files changed, 350 insertions(+), 5 deletions(-) diff --git a/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml b/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml index 636f13115f6f..b16b85878f05 100644 --- a/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml +++ b/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml @@ -2582,6 +2582,92 @@ spec: - amd - arm type: object + iso: + description: HookArch defines the Tinkerbell hook + architecture-specific artifacts. + properties: + amd: + description: Archive represents an archive asset + (e.g. tarball) along with its OS/architecture + metadata, and checksums for file integrity. + properties: + arch: + description: Architectures of the asset + items: + type: string + type: array + description: + type: string + name: + description: The asset name + type: string + os: + description: Operating system of the asset + enum: + - linux + - darwin + - windows + type: string + osName: + description: Name of the OS like ubuntu, + bottlerocket + type: string + sha256: + description: The sha256 of the asset, only + applies for 'file' store + type: string + sha512: + description: The sha512 of the asset, only + applies for 'file' store + type: string + uri: + description: The URI where the asset is + located + type: string + type: object + arm: + description: Archive represents an archive asset + (e.g. tarball) along with its OS/architecture + metadata, and checksums for file integrity. + properties: + arch: + description: Architectures of the asset + items: + type: string + type: array + description: + type: string + name: + description: The asset name + type: string + os: + description: Operating system of the asset + enum: + - linux + - darwin + - windows + type: string + osName: + description: Name of the OS like ubuntu, + bottlerocket + type: string + sha256: + description: The sha256 of the asset, only + applies for 'file' store + type: string + sha512: + description: The sha512 of the asset, only + applies for 'file' store + type: string + uri: + description: The URI where the asset is + located + type: string + type: object + required: + - amd + - arm + type: object kernel: properties: arch: @@ -2695,6 +2781,7 @@ spec: - bootkit - docker - initramfs + - iso - kernel - vmlinuz type: object @@ -3314,4 +3401,4 @@ status: kind: "" plural: "" conditions: [] - storedVersions: [] + storedVersions: [] \ No newline at end of file diff --git a/config/manifest/eksa-components.yaml b/config/manifest/eksa-components.yaml index 0606745ab7c1..8a5255a3b98e 100644 --- a/config/manifest/eksa-components.yaml +++ b/config/manifest/eksa-components.yaml @@ -2751,6 +2751,84 @@ spec: - amd - arm type: object + iso: + properties: + amd: + properties: + arch: + description: Architectures of the asset + items: + type: string + type: array + description: + type: string + name: + description: The asset name + type: string + os: + description: Operating system of the asset + enum: + - linux + - darwin + - windows + type: string + osName: + description: Name of the OS like ubuntu, + bottlerocket + type: string + sha256: + description: The sha256 of the asset, only + applies for 'file' store + type: string + sha512: + description: The sha512 of the asset, only + applies for 'file' store + type: string + uri: + description: The URI where the asset is + located + type: string + type: object + arm: + properties: + arch: + description: Architectures of the asset + items: + type: string + type: array + description: + type: string + name: + description: The asset name + type: string + os: + description: Operating system of the asset + enum: + - linux + - darwin + - windows + type: string + osName: + description: Name of the OS like ubuntu, + bottlerocket + type: string + sha256: + description: The sha256 of the asset, only + applies for 'file' store + type: string + sha512: + description: The sha512 of the asset, only + applies for 'file' store + type: string + uri: + description: The URI where the asset is + located + type: string + type: object + required: + - amd + - arm + type: object kernel: properties: arch: @@ -2864,6 +2942,7 @@ spec: - bootkit - docker - initramfs + - iso - kernel - vmlinuz type: object @@ -8900,4 +8979,4 @@ webhooks: - UPDATE resources: - vspheremachineconfigs - sideEffects: None + sideEffects: None \ No newline at end of file diff --git a/pkg/providers/tinkerbell/stack/stack_test.go b/pkg/providers/tinkerbell/stack/stack_test.go index d023b4622c5b..5b7ea501de0d 100644 --- a/pkg/providers/tinkerbell/stack/stack_test.go +++ b/pkg/providers/tinkerbell/stack/stack_test.go @@ -57,6 +57,11 @@ func getTinkBundle() releasev1alpha1.TinkerbellBundle { URI: "https://anywhere-assests.eks.amazonaws.com/tinkerbell/hook/initramfs-x86-64", }, }, + ISO: releasev1alpha1.HookArch{ + Amd: releasev1alpha1.Archive{ + URI: "https://anywhere-assests.eks.amazonaws.com/tinkerbell/hook/hook-x86_64-efi-initrd.iso", + }, + }, }, Rufio: releasev1alpha1.Image{ URI: "public.ecr.aws/eks-anywhere/rufio:latest", diff --git a/release/api/v1alpha1/bundle_types.go b/release/api/v1alpha1/bundle_types.go index 90cb96f028de..4722a0bc266f 100644 --- a/release/api/v1alpha1/bundle_types.go +++ b/release/api/v1alpha1/bundle_types.go @@ -342,6 +342,7 @@ type HookBundle struct { Kernel Image `json:"kernel"` Initramfs HookArch `json:"initramfs"` Vmlinuz HookArch `json:"vmlinuz"` + ISO HookArch `json:"iso"` } // HookArch defines the Tinkerbell hook architecture-specific artifacts. diff --git a/release/api/v1alpha1/zz_generated.deepcopy.go b/release/api/v1alpha1/zz_generated.deepcopy.go index 78103c716628..fc1efaef705f 100644 --- a/release/api/v1alpha1/zz_generated.deepcopy.go +++ b/release/api/v1alpha1/zz_generated.deepcopy.go @@ -597,6 +597,7 @@ func (in *HookBundle) DeepCopyInto(out *HookBundle) { in.Kernel.DeepCopyInto(&out.Kernel) in.Initramfs.DeepCopyInto(&out.Initramfs) in.Vmlinuz.DeepCopyInto(&out.Vmlinuz) + in.ISO.DeepCopyInto(&out.ISO) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HookBundle. diff --git a/release/cli/pkg/assets/config/bundle_release.go b/release/cli/pkg/assets/config/bundle_release.go index ca244499631a..0679aef1aeb7 100644 --- a/release/cli/pkg/assets/config/bundle_release.go +++ b/release/cli/pkg/assets/config/bundle_release.go @@ -564,6 +564,17 @@ var bundleReleaseAssetsConfigMap = []assettypes.AssetConfig{ Format: "kernel", ArchiveS3PathGetter: archives.KernelArtifactPathGetter, }, + { + Name: "hook-aarch64-efi-initrd.iso", + Format: "iso", + ArchitectureOverride: "arm64", + ArchiveS3PathGetter: archives.KernelArtifactPathGetter, + }, + { + Name: "hook-x86_64-efi-initrd.iso", + Format: "iso", + ArchiveS3PathGetter: archives.KernelArtifactPathGetter, + }, { Name: "vmlinuz-aarch64", Format: "kernel", diff --git a/release/cli/pkg/bundles/tinkerbell.go b/release/cli/pkg/bundles/tinkerbell.go index 0c802e741bb7..3685a231b328 100644 --- a/release/cli/pkg/bundles/tinkerbell.go +++ b/release/cli/pkg/bundles/tinkerbell.go @@ -150,6 +150,10 @@ func GetTinkerbellBundle(r *releasetypes.ReleaseConfig, imageDigests releasetype Arm: bundleArchiveArtifacts["initramfs-aarch64"], Amd: bundleArchiveArtifacts["initramfs-x86_64"], }, + ISO: anywherev1alpha1.HookArch{ + Arm: bundleArchiveArtifacts["hook-aarch64-efi-initrd.iso"], + Amd: bundleArchiveArtifacts["hook-x86_64-efi-initrd.iso"], + }, Vmlinuz: anywherev1alpha1.HookArch{ Arm: bundleArchiveArtifacts["vmlinuz-aarch64"], Amd: bundleArchiveArtifacts["vmlinuz-x86_64"], diff --git a/release/cli/pkg/operations/testdata/main-bundle-release.yaml b/release/cli/pkg/operations/testdata/main-bundle-release.yaml index 0fd66fde14ba..70251582cd6e 100644 --- a/release/cli/pkg/operations/testdata/main-bundle-release.yaml +++ b/release/cli/pkg/operations/testdata/main-bundle-release.yaml @@ -669,6 +669,17 @@ spec: component name: initramfs-aarch64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/initramfs-aarch64 + iso: + amd: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-x86_64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-x86_64-efi-initrd.iso + arm: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-aarch64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-aarch64-efi-initrd.iso kernel: arch: - amd64 @@ -1485,6 +1496,17 @@ spec: component name: initramfs-aarch64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/initramfs-aarch64 + iso: + amd: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-x86_64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-x86_64-efi-initrd.iso + arm: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-aarch64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-aarch64-efi-initrd.iso kernel: arch: - amd64 @@ -1494,17 +1516,20 @@ spec: name: hook-kernel os: linux uri: public.ecr.aws/release-container-registry/tinkerbell/hook-kernel:v0.10.0-eks-a-v0.0.0-dev-build.1 + uri: public.ecr.aws/release-container-registry/tinkerbell/hook-kernel:v0.10.0-eks-a-v0.0.0-dev-build.1 vmlinuz: amd: description: Tinkerbell operating system installation environment (osie) component name: vmlinuz-x86_64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/vmlinuz-x86_64 + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/vmlinuz-x86_64 arm: description: Tinkerbell operating system installation environment (osie) component name: vmlinuz-aarch64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/vmlinuz-aarch64 + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/vmlinuz-aarch64 rufio: arch: - amd64 @@ -2301,6 +2326,17 @@ spec: component name: initramfs-aarch64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/initramfs-aarch64 + iso: + amd: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-x86_64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-x86_64-efi-initrd.iso + arm: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-aarch64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-aarch64-efi-initrd.iso kernel: arch: - amd64 @@ -3117,6 +3153,17 @@ spec: component name: initramfs-aarch64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/initramfs-aarch64 + iso: + amd: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-x86_64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-x86_64-efi-initrd.iso + arm: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-aarch64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-aarch64-efi-initrd.iso kernel: arch: - amd64 @@ -3933,6 +3980,17 @@ spec: component name: initramfs-aarch64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/initramfs-aarch64 + iso: + amd: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-x86_64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-x86_64-efi-initrd.iso + arm: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-aarch64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-aarch64-efi-initrd.iso kernel: arch: - amd64 @@ -4749,6 +4807,17 @@ spec: component name: initramfs-aarch64 uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/initramfs-aarch64 + iso: + amd: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-x86_64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-x86_64-efi-initrd.iso + arm: + description: Tinkerbell operating system installation environment (osie) + component + name: hook-aarch64-efi-initrd.iso + uri: https://release-bucket/artifacts/v0.0.0-dev-build.0/hook/v0.10.0/hook-aarch64-efi-initrd.iso kernel: arch: - amd64 @@ -4758,6 +4827,7 @@ spec: name: hook-kernel os: linux uri: public.ecr.aws/release-container-registry/tinkerbell/hook-kernel:v0.10.0-eks-a-v0.0.0-dev-build.1 + uri: public.ecr.aws/release-container-registry/tinkerbell/hook-kernel:v0.10.0-eks-a-v0.0.0-dev-build.1 vmlinuz: amd: description: Tinkerbell operating system installation environment (osie) 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 636f13115f6f..b16b85878f05 100644 --- a/release/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml +++ b/release/config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml @@ -2582,6 +2582,92 @@ spec: - amd - arm type: object + iso: + description: HookArch defines the Tinkerbell hook + architecture-specific artifacts. + properties: + amd: + description: Archive represents an archive asset + (e.g. tarball) along with its OS/architecture + metadata, and checksums for file integrity. + properties: + arch: + description: Architectures of the asset + items: + type: string + type: array + description: + type: string + name: + description: The asset name + type: string + os: + description: Operating system of the asset + enum: + - linux + - darwin + - windows + type: string + osName: + description: Name of the OS like ubuntu, + bottlerocket + type: string + sha256: + description: The sha256 of the asset, only + applies for 'file' store + type: string + sha512: + description: The sha512 of the asset, only + applies for 'file' store + type: string + uri: + description: The URI where the asset is + located + type: string + type: object + arm: + description: Archive represents an archive asset + (e.g. tarball) along with its OS/architecture + metadata, and checksums for file integrity. + properties: + arch: + description: Architectures of the asset + items: + type: string + type: array + description: + type: string + name: + description: The asset name + type: string + os: + description: Operating system of the asset + enum: + - linux + - darwin + - windows + type: string + osName: + description: Name of the OS like ubuntu, + bottlerocket + type: string + sha256: + description: The sha256 of the asset, only + applies for 'file' store + type: string + sha512: + description: The sha512 of the asset, only + applies for 'file' store + type: string + uri: + description: The URI where the asset is + located + type: string + type: object + required: + - amd + - arm + type: object kernel: properties: arch: @@ -2695,6 +2781,7 @@ spec: - bootkit - docker - initramfs + - iso - kernel - vmlinuz type: object @@ -3314,4 +3401,4 @@ status: kind: "" plural: "" conditions: [] - storedVersions: [] + storedVersions: [] \ No newline at end of file diff --git a/release/config/crd/bases/anywhere.eks.amazonaws.com_eksareleases.yaml b/release/config/crd/bases/anywhere.eks.amazonaws.com_eksareleases.yaml index 23b5f0c75aa0..17e78bef36a4 100644 --- a/release/config/crd/bases/anywhere.eks.amazonaws.com_eksareleases.yaml +++ b/release/config/crd/bases/anywhere.eks.amazonaws.com_eksareleases.yaml @@ -84,4 +84,4 @@ status: kind: "" plural: "" conditions: [] - storedVersions: [] + storedVersions: [] \ No newline at end of file diff --git a/release/config/crd/bases/anywhere.eks.amazonaws.com_releases.yaml b/release/config/crd/bases/anywhere.eks.amazonaws.com_releases.yaml index 0c0c15c6f4c0..7eb48ba4bbfd 100644 --- a/release/config/crd/bases/anywhere.eks.amazonaws.com_releases.yaml +++ b/release/config/crd/bases/anywhere.eks.amazonaws.com_releases.yaml @@ -329,4 +329,4 @@ status: kind: "" plural: "" conditions: [] - storedVersions: [] + storedVersions: [] \ No newline at end of file