From 8b9213a26eccc73a9d98b673baf654eadab743c9 Mon Sep 17 00:00:00 2001 From: Mitch Zhu Date: Wed, 13 Nov 2024 18:48:27 +0000 Subject: [PATCH] Update with latest Azl3 Kata change --- .pipelines/.vsts-vhd-builder-release.yaml | 72 ++----------------- .../artifacts/mariner/cse_install_mariner.sh | 19 ----- pkg/agent/baker_test.go | 12 ++-- pkg/agent/bakerapi_test.go | 2 +- pkg/agent/datamodel/sig_config.go | 48 ++++--------- pkg/agent/datamodel/sig_config_test.go | 10 +-- pkg/agent/datamodel/types.go | 6 +- pkg/agent/datamodel/types_test.go | 4 +- vhdbuilder/packer/install-dependencies.sh | 13 +--- 9 files changed, 32 insertions(+), 154 deletions(-) diff --git a/.pipelines/.vsts-vhd-builder-release.yaml b/.pipelines/.vsts-vhd-builder-release.yaml index 434683b3f37..0eb74016413 100644 --- a/.pipelines/.vsts-vhd-builder-release.yaml +++ b/.pipelines/.vsts-vhd-builder-release.yaml @@ -84,18 +84,10 @@ parameters: displayName: Build MarinerV2 Gen2 Kata type: boolean default: true - - name: buildAzureLinuxV2gen2kata - displayName: Build AzureLinuxV2 Gen2 Kata - type: boolean - default: true - name: buildAzureLinuxV3gen2kata displayName: Build AzureLinuxV3 Gen2 Kata type: boolean default: true - - name: buildAzureLinuxV3gen2kataCC - displayName: Build AzureLinuxV3 Gen2 Kata CC - type: boolean - default: true - name: buildMarinerV2ARM64 displayName: Build MarinerV2 Gen2 - ARM64 type: boolean @@ -742,34 +734,6 @@ stages: useOverrides: ${{ parameters.useOverrides }} overrideBranch: ${{ parameters.overrideBranch }} artifactName: marinerv2-gen2-kata - - job: buildAzureLinuxV2gen2kata - condition: eq('${{ parameters.buildAzureLinuxV2gen2kata }}', true) - dependsOn: [ ] - timeoutInMinutes: 180 - steps: - - bash: | - echo '##vso[task.setvariable variable=DRY_RUN]${{parameters.dryrun}}' - echo '##vso[task.setvariable variable=OS_SKU]AzureLinux' - echo '##vso[task.setvariable variable=OS_VERSION]V2' - echo '##vso[task.setvariable variable=IMG_PUBLISHER]MicrosoftCBLMariner' - echo '##vso[task.setvariable variable=IMG_OFFER]cbl-mariner' - echo '##vso[task.setvariable variable=IMG_SKU]cbl-mariner-2-kata' - echo '##vso[task.setvariable variable=IMG_VERSION]latest' - echo '##vso[task.setvariable variable=HYPERV_GENERATION]V2' - echo '##vso[task.setvariable variable=AZURE_VM_SIZE]Standard_D16ads_v5' - echo '##vso[task.setvariable variable=FEATURE_FLAGS]kata' - echo '##vso[task.setvariable variable=CONTAINER_RUNTIME]containerd' - echo '##vso[task.setvariable variable=ARCHITECTURE]X86_64' - echo '##vso[task.setvariable variable=ENABLE_FIPS]false' - echo '##vso[task.setvariable variable=ENABLE_TRUSTED_LAUNCH]False' - echo '##vso[task.setvariable variable=SGX_INSTALL]True' - echo '##vso[task.setvariable variable=ENABLE_CGROUPV2]True' - displayName: Setup Build Variables - - template: ./templates/.builder-release-template.yaml - parameters: - useOverrides: ${{ parameters.useOverrides }} - overrideBranch: ${{ parameters.overrideBranch }} - artifactName: azurelinuxv2-gen2-kata - job: buildAzureLinuxV3gen2kata condition: eq('${{ parameters.buildAzureLinuxV3gen2kata }}', true) dependsOn: [ ] @@ -777,41 +741,15 @@ stages: steps: - bash: | echo '##vso[task.setvariable variable=DRY_RUN]${{parameters.dryrun}}' - echo '##vso[task.setvariable variable=OS_SKU]CBLMariner' - echo '##vso[task.setvariable variable=OS_VERSION]V3' - echo '##vso[task.setvariable variable=IMG_PUBLISHER]MicrosoftCBLMariner' - echo '##vso[task.setvariable variable=IMG_OFFER]azure-linux' - echo '##vso[task.setvariable variable=IMG_SKU]azure-linux-gen2' - echo '##vso[task.setvariable variable=IMG_VERSION]latest' - echo '##vso[task.setvariable variable=HYPERV_GENERATION]V2' - echo '##vso[task.setvariable variable=AZURE_VM_SIZE]Standard_D16ads_v5' - echo '##vso[task.setvariable variable=FEATURE_FLAGS]Kata' - echo '##vso[task.setvariable variable=CONTAINER_RUNTIME]containerd' - echo '##vso[task.setvariable variable=ARCHITECTURE]X86_64' - echo '##vso[task.setvariable variable=ENABLE_FIPS]false' - echo '##vso[task.setvariable variable=ENABLE_TRUSTED_LAUNCH]False' - echo '##vso[task.setvariable variable=SGX_INSTALL]True' - echo '##vso[task.setvariable variable=ENABLE_CGROUPV2]True' - displayName: Setup Build Variables - - template: ./templates/.builder-release-template.yaml - parameters: - artifactName: azurelinuxv3-gen2-kata - - job: buildAzureLinuxV3gen2kataCC - condition: eq('${{ parameters.buildAzureLinuxV3gen2kataCC }}', true) - dependsOn: [ ] - timeoutInMinutes: 180 - steps: - - bash: | - echo '##vso[task.setvariable variable=DRY_RUN]${{parameters.dryrun}}' - echo '##vso[task.setvariable variable=OS_SKU]CBLMariner' - echo '##vso[task.setvariable variable=OS_VERSION]V3' + echo '##vso[task.setvariable variable=OS_SKU]AzureLinux' + echo '##vso[task.setvariable variable=OS_VERSION]V3kata' echo '##vso[task.setvariable variable=IMG_PUBLISHER]MicrosoftCBLMariner' - echo '##vso[task.setvariable variable=IMG_OFFER]azure-linux' - echo '##vso[task.setvariable variable=IMG_SKU]azure-linux-gen2' + echo '##vso[task.setvariable variable=IMG_OFFER]azure-linux-3' + echo '##vso[task.setvariable variable=IMG_SKU]azure-linux-3-gen2' echo '##vso[task.setvariable variable=IMG_VERSION]latest' echo '##vso[task.setvariable variable=HYPERV_GENERATION]V2' echo '##vso[task.setvariable variable=AZURE_VM_SIZE]Standard_D16ads_v5' - echo '##vso[task.setvariable variable=FEATURE_FLAGS]KataCC' + echo '##vso[task.setvariable variable=FEATURE_FLAGS]kata' echo '##vso[task.setvariable variable=CONTAINER_RUNTIME]containerd' echo '##vso[task.setvariable variable=ARCHITECTURE]X86_64' echo '##vso[task.setvariable variable=ENABLE_FIPS]false' diff --git a/parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh b/parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh index 90fc5fb00f3..3974604b803 100755 --- a/parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh +++ b/parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh @@ -30,33 +30,14 @@ installDeps() { fi } -installM2KataDeps() { - if [[ $OS_VERSION != "1.0" ]]; then - echo " this is when I install kata-packages-host and disable cgroup telemtry.service" - if ! dnf_install 30 1 600 kata-packages-host; then - exit $ERR_APT_INSTALL_TIMEOUT - fi - fi -} - installKataDeps() { if [[ $OS_VERSION != "1.0" ]]; then - # TODO: name subject to change based on CBL-Mariner-Proprietary work if ! dnf_install 30 1 600 kata-packages-host; then exit $ERR_APT_INSTALL_TIMEOUT fi fi } -installKataCCDeps() { - if [[ $OS_VERSION != "1.0" ]]; then - # TODO: name subject to change based on CBL-Mariner-Proprietary work - if ! dnf_install 30 1 600 kata-packages-host-cc; then - exit $ERR_APT_INSTALL_TIMEOUT - fi - fi -} - downloadGPUDrivers() { # Mariner CUDA rpm name comes in the following format: # diff --git a/pkg/agent/baker_test.go b/pkg/agent/baker_test.go index 0f36b1b7273..be770fbb45d 100644 --- a/pkg/agent/baker_test.go +++ b/pkg/agent/baker_test.go @@ -958,9 +958,9 @@ var _ = Describe("Assert generated customData and cseCmd", func() { } }, nil), - Entry("AzureLinux v2 with kata", "AzureLinuxV2+Kata", "1.28.0", func(config *datamodel.NodeBootstrappingConfiguration) { + Entry("AzureLinux v3 with kata", "AzureLinuxV3+Kata", "1.28.0", func(config *datamodel.NodeBootstrappingConfiguration) { config.OSSKU = "AzureLinux" - config.ContainerService.Properties.AgentPoolProfiles[0].Distro = datamodel.AKSAzureLinuxV2Gen2Kata + config.ContainerService.Properties.AgentPoolProfiles[0].Distro = datamodel.AKSAzureLinuxV3Gen2Kata config.ContainerService.Properties.AgentPoolProfiles[0].KubernetesConfig = &datamodel.KubernetesConfig{ ContainerRuntime: datamodel.Containerd, } @@ -1014,20 +1014,20 @@ var _ = Describe("Assert generated customData and cseCmd", func() { config.DisableUnattendedUpgrades = false }, nil), - Entry("AzureLinux v2 with kata and DisableUnattendedUpgrades=true", "AzureLinuxv2+Kata+DisableUnattendedUpgrades=true", "1.28.0", + Entry("AzureLinux v3 with kata and DisableUnattendedUpgrades=true", "AzureLinuxv3+Kata+DisableUnattendedUpgrades=true", "1.28.0", func(config *datamodel.NodeBootstrappingConfiguration) { config.OSSKU = "AzureLinux" - config.ContainerService.Properties.AgentPoolProfiles[0].Distro = datamodel.AKSAzureLinuxV2Gen2Kata + config.ContainerService.Properties.AgentPoolProfiles[0].Distro = datamodel.AKSAzureLinuxV3Gen2Kata config.ContainerService.Properties.AgentPoolProfiles[0].KubernetesConfig = &datamodel.KubernetesConfig{ ContainerRuntime: datamodel.Containerd, } config.DisableUnattendedUpgrades = true }, nil), - Entry("AzureLinux v2 with kata and DisableUnattendedUpgrades=false", "AzureLinuxv2+Kata+DisableUnattendedUpgrades=false", "1.28.0", + Entry("AzureLinux v3 with kata and DisableUnattendedUpgrades=false", "AzureLinuxv3+Kata+DisableUnattendedUpgrades=false", "1.28.0", func(config *datamodel.NodeBootstrappingConfiguration) { config.OSSKU = "AzureLinux" - config.ContainerService.Properties.AgentPoolProfiles[0].Distro = datamodel.AKSAzureLinuxV2Gen2Kata + config.ContainerService.Properties.AgentPoolProfiles[0].Distro = datamodel.AKSAzureLinuxV3Gen2Kata config.ContainerService.Properties.AgentPoolProfiles[0].KubernetesConfig = &datamodel.KubernetesConfig{ ContainerRuntime: datamodel.Containerd, } diff --git a/pkg/agent/bakerapi_test.go b/pkg/agent/bakerapi_test.go index 34800f9266b..4bedd7d0f0f 100644 --- a/pkg/agent/bakerapi_test.go +++ b/pkg/agent/bakerapi_test.go @@ -327,7 +327,7 @@ var _ = Describe("AgentBaker API implementation tests", func() { datamodel.AKSAzureLinuxV3FIPS, datamodel.AKSAzureLinuxV2Gen2FIPS, datamodel.AKSAzureLinuxV3Gen2FIPS, - datamodel.AKSAzureLinuxV2Gen2Kata, + datamodel.AKSAzureLinuxV3Gen2Kata, datamodel.AKSAzureLinuxV2Arm64Gen2, datamodel.AKSAzureLinuxV3Arm64Gen2, datamodel.AKSAzureLinuxV2Gen2TL, diff --git a/pkg/agent/datamodel/sig_config.go b/pkg/agent/datamodel/sig_config.go index dfbb37ad43b..c7395588262 100644 --- a/pkg/agent/datamodel/sig_config.go +++ b/pkg/agent/datamodel/sig_config.go @@ -147,9 +147,7 @@ var AvailableContainerdDistros = []Distro{ AKSAzureLinuxV2Gen2FIPS, AKSAzureLinuxV3Gen2FIPS, AKSCBLMarinerV2Gen2Kata, - AKSAzureLinuxV2Gen2Kata, AKSAzureLinuxV3Gen2Kata, - AKSAzureLinuxV3Gen2KataCC, AKSCBLMarinerV2Gen2TL, AKSAzureLinuxV2Gen2TL, AKSCBLMarinerV2KataGen2TL, @@ -203,9 +201,7 @@ var AvailableGen2Distros = []Distro{ AKSAzureLinuxV2Gen2FIPS, AKSAzureLinuxV3Gen2FIPS, AKSCBLMarinerV2Gen2Kata, - AKSAzureLinuxV2Gen2Kata, AKSAzureLinuxV3Gen2Kata, - AKSAzureLinuxV3Gen2KataCC, AKSCBLMarinerV2Gen2TL, AKSAzureLinuxV2Gen2TL, AKSCBLMarinerV2KataGen2TL, @@ -230,9 +226,7 @@ var AvailableAzureLinuxDistros = []Distro{ AKSAzureLinuxV2Gen2FIPS, AKSAzureLinuxV3Gen2FIPS, AKSCBLMarinerV2Gen2Kata, - AKSAzureLinuxV2Gen2Kata, AKSAzureLinuxV3Gen2Kata, - AKSAzureLinuxV3Gen2KataCC, AKSCBLMarinerV2Arm64Gen2, AKSAzureLinuxV2Arm64Gen2, AKSAzureLinuxV3Arm64Gen2, @@ -251,9 +245,7 @@ var AvailableAzureLinuxCgroupV2Distros = []Distro{ AKSAzureLinuxV3FIPS, AKSAzureLinuxV2Gen2FIPS, AKSAzureLinuxV3Gen2FIPS, - AKSAzureLinuxV2Gen2Kata, AKSAzureLinuxV3Gen2Kata, - AKSAzureLinuxV3Gen2KataCC, AKSAzureLinuxV2Arm64Gen2, AKSAzureLinuxV3Arm64Gen2, AKSAzureLinuxV2Gen2TL, @@ -711,13 +703,6 @@ var ( Version: LinuxSIGImageVersion, } - SIGAzureLinuxV2KataImageConfigTemplate = SigImageConfigTemplate{ - ResourceGroup: AKSAzureLinuxResourceGroup, - Gallery: AKSAzureLinuxGalleryName, - Definition: "V2katagen2", - Version: LinuxSIGImageVersion, - } - SIGAzureLinuxV3KataImageConfigTemplate = SigImageConfigTemplate{ ResourceGroup: AKSAzureLinuxResourceGroup, Gallery: AKSAzureLinuxGalleryName, @@ -725,13 +710,6 @@ var ( Version: LinuxSIGImageVersion, } - SIGAzureLinuxV3KataCCImageConfigTemplate = SigImageConfigTemplate{ - ResourceGroup: AKSAzureLinuxResourceGroup, - Gallery: AKSAzureLinuxGalleryName, - Definition: "V3katagen2", - Version: LinuxSIGImageVersion, - } - SIGCBLMarinerV2Arm64ImageConfigTemplate = SigImageConfigTemplate{ ResourceGroup: AKSCBLMarinerResourceGroup, Gallery: AKSCBLMarinerGalleryName, @@ -864,20 +842,18 @@ func getSigCBLMarinerImageConfigMapWithOpts(opts ...SigImageConfigOpt) map[Distr func getSigAzureLinuxImageConfigMapWithOpts(opts ...SigImageConfigOpt) map[Distro]SigImageConfig { return map[Distro]SigImageConfig{ - AKSAzureLinuxV2: SIGAzureLinuxV2Gen1ImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV3: SIGAzureLinuxV3Gen1ImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV2Gen2: SIGAzureLinuxV2Gen2ImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV3Gen2: SIGAzureLinuxV3Gen2ImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV2FIPS: SIGAzureLinuxV2Gen1FIPSImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV3FIPS: SIGAzureLinuxV3Gen1FIPSImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV2Gen2FIPS: SIGAzureLinuxV2Gen2FIPSImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV3Gen2FIPS: SIGAzureLinuxV3Gen2FIPSImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV2Gen2Kata: SIGAzureLinuxV2KataImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV3Gen2Kata: SIGAzureLinuxV3KataImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV3Gen2KataCC: SIGAzureLinuxV3KataImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV2Arm64Gen2: SIGAzureLinuxV2Arm64ImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV3Arm64Gen2: SIGAzureLinuxV3Arm64ImageConfigTemplate.WithOptions(opts...), - AKSAzureLinuxV2Gen2TL: SIGAzureLinuxV2TLImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV2: SIGAzureLinuxV2Gen1ImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV3: SIGAzureLinuxV3Gen1ImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV2Gen2: SIGAzureLinuxV2Gen2ImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV3Gen2: SIGAzureLinuxV3Gen2ImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV2FIPS: SIGAzureLinuxV2Gen1FIPSImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV3FIPS: SIGAzureLinuxV3Gen1FIPSImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV2Gen2FIPS: SIGAzureLinuxV2Gen2FIPSImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV3Gen2FIPS: SIGAzureLinuxV3Gen2FIPSImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV3Gen2Kata: SIGAzureLinuxV3KataImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV2Arm64Gen2: SIGAzureLinuxV2Arm64ImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV3Arm64Gen2: SIGAzureLinuxV3Arm64ImageConfigTemplate.WithOptions(opts...), + AKSAzureLinuxV2Gen2TL: SIGAzureLinuxV2TLImageConfigTemplate.WithOptions(opts...), } } diff --git a/pkg/agent/datamodel/sig_config_test.go b/pkg/agent/datamodel/sig_config_test.go index 20528d62d18..b74277c3d6b 100644 --- a/pkg/agent/datamodel/sig_config_test.go +++ b/pkg/agent/datamodel/sig_config_test.go @@ -181,12 +181,6 @@ var _ = Describe("GetSIGAzureCloudSpecConfig", func() { Expect(azurelinuxV3Kata.Definition).To(Equal("V3katagen2")) Expect(azurelinuxV3Kata.Version).To(Equal(LinuxSIGImageVersion)) - azurelinuxV3Kata := sigConfig.SigCBLMarinerImageConfig[AKSAzureLinuxV3Gen2KataCC] - Expect(azurelinuxV3Kata.ResourceGroup).To(Equal("resourcegroup")) - Expect(azurelinuxV3Kata.Gallery).To(Equal("akscblmariner")) - Expect(azurelinuxV3Kata.Definition).To(Equal("V3katagen2")) - Expect(azurelinuxV3Kata.Version).To(Equal(LinuxSIGImageVersion)) - aksUbuntu2204TLGen2Containerd := sigConfig.SigUbuntuImageConfig[AKSUbuntuContainerd2204TLGen2] Expect(aksUbuntu2204TLGen2Containerd.ResourceGroup).To(Equal("resourcegroup")) Expect(aksUbuntu2204TLGen2Containerd.Gallery).To(Equal("aksubuntu")) @@ -273,10 +267,10 @@ var _ = Describe("GetSIGAzureCloudSpecConfig", func() { Expect(azurelinuxV3Gen2FIPS.Definition).To(Equal("V3gen2fips")) Expect(azurelinuxV3Gen2FIPS.Version).To(Equal(LinuxSIGImageVersion)) - azurelinuxV2Gen2Kata := sigConfig.SigAzureLinuxImageConfig[AKSAzureLinuxV2Gen2Kata] + azurelinuxV2Gen2Kata := sigConfig.SigAzureLinuxImageConfig[AKSAzureLinuxV3Gen2Kata] Expect(azurelinuxV2Gen2Kata.ResourceGroup).To(Equal("resourcegroup")) Expect(azurelinuxV2Gen2Kata.Gallery).To(Equal("aksazurelinux")) - Expect(azurelinuxV2Gen2Kata.Definition).To(Equal("V2katagen2")) + Expect(azurelinuxV2Gen2Kata.Definition).To(Equal("V3katagen2")) Expect(azurelinuxV2Gen2Kata.Version).To(Equal(LinuxSIGImageVersion)) aksUbuntuMinimalContainerd2204 := sigConfig.SigUbuntuImageConfig[AKSUbuntuMinimalContainerd2204] diff --git a/pkg/agent/datamodel/types.go b/pkg/agent/datamodel/types.go index b09a42fc9ae..2ef8fe3e20c 100644 --- a/pkg/agent/datamodel/types.go +++ b/pkg/agent/datamodel/types.go @@ -168,9 +168,7 @@ const ( AKSAzureLinuxV2Gen2FIPS Distro = "aks-azurelinux-v2-gen2-fips" AKSAzureLinuxV3Gen2FIPS Distro = "aks-azurelinux-v3-gen2-fips" AKSCBLMarinerV2Gen2Kata Distro = "aks-cblmariner-v2-gen2-kata" - AKSAzureLinuxV2Gen2Kata Distro = "aks-azurelinux-v2-gen2-kata" AKSAzureLinuxV3Gen2Kata Distro = "aks-azurelinux-v3-gen2-kata" - AKSAzureLinuxV3Gen2KataCC Distro = "aks-azurelinux-v3-gen2-kata-cc" AKSCBLMarinerV2Gen2TL Distro = "aks-cblmariner-v2-gen2-tl" AKSAzureLinuxV2Gen2TL Distro = "aks-azurelinux-v2-gen2-tl" AKSCBLMarinerV2KataGen2TL Distro = "aks-cblmariner-v2-kata-gen2-tl" @@ -254,7 +252,7 @@ var AKSDistrosAvailableOnVHD = []Distro{ AKSAzureLinuxV2Gen2FIPS, AKSAzureLinuxV3Gen2FIPS, AKSCBLMarinerV2Gen2Kata, - AKSAzureLinuxV2Gen2Kata, + AKSAzureLinuxV3Gen2Kata, AKSCBLMarinerV2Gen2TL, AKSAzureLinuxV2Gen2TL, AKSCBLMarinerV2KataGen2TL, @@ -328,7 +326,7 @@ func (d Distro) IsAzureLinuxCgroupV2VHDDistro() bool { } func (d Distro) IsKataDistro() bool { - return d == AKSCBLMarinerV2Gen2Kata || d == AKSAzureLinuxV2Gen2Kata || d == AKSCBLMarinerV2KataGen2TL || d == CustomizedImageKata + return d == AKSCBLMarinerV2Gen2Kata || d == AKSAzureLinuxV3Gen2Kata || d == AKSCBLMarinerV2KataGen2TL || d == CustomizedImageKata } /* diff --git a/pkg/agent/datamodel/types_test.go b/pkg/agent/datamodel/types_test.go index e06bfb16e67..1a65d7cadb0 100644 --- a/pkg/agent/datamodel/types_test.go +++ b/pkg/agent/datamodel/types_test.go @@ -1092,9 +1092,9 @@ func TestAgentPoolProfileIsAzureLinuxCgroupV2VHDDistro(t *testing.T) { expected: true, }, { - name: "Azure Linux V2 Gen2 Kata VHD distro", + name: "Azure Linux V3 Gen2 Kata VHD distro", ap: AgentPoolProfile{ - Distro: AKSAzureLinuxV2Gen2Kata, + Distro: AKSAzureLinuxV3Gen2Kata, }, expected: true, }, diff --git a/vhdbuilder/packer/install-dependencies.sh b/vhdbuilder/packer/install-dependencies.sh index a38d5727851..58c1aeb2ee0 100644 --- a/vhdbuilder/packer/install-dependencies.sh +++ b/vhdbuilder/packer/install-dependencies.sh @@ -10,7 +10,7 @@ AZURELINUX_OS_NAME="AZURELINUX" OS=$(sort -r /etc/*-release | gawk 'match($0, /^(ID_LIKE=(coreos)|ID=(.*))$/, a) { print toupper(a[2] a[3]); exit }') IS_KATA="false" # check if 'kata' or 'Kata' present in FEATURE_FLAGS -if grep -Eiq "(^|[^-])\bkata\b($|[^-])" <<< "$FEATURE_FLAGS"; then +if grep -q "kata" <<< "$FEATURE_FLAGS"; then IS_KATA="true" fi OS_VERSION=$(sort -r /etc/*-release | gawk 'match($0, /^(VERSION_ID=(.*))$/, a) { print toupper(a[2] a[3]); exit }' | tr -d '"') @@ -159,18 +159,9 @@ if isMarinerOrAzureLinux "$OS"; then fixCBLMarinerPermissions addMarinerNvidiaRepo overrideNetworkConfig || exit 1 - # 2.0 flow if grep -q "kata" <<< "$FEATURE_FLAGS"; then - installM2KataDeps - enableMarinerKata - fi - # 3.0 GA flow - if grep -q "Kata" <<< "$FEATURE_FLAGS"; then installKataDeps - fi - # 3.0 CC flow - if grep -q "KataCC" <<< "$FEATURE_FLAGS"; then - installKataCCDeps + enableMarinerKata fi disableTimesyncd disableDNFAutomatic