Skip to content

Commit

Permalink
Update with latest Azl3 Kata change
Browse files Browse the repository at this point in the history
  • Loading branch information
miz060 committed Nov 13, 2024
1 parent c901afb commit 8b9213a
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 154 deletions.
72 changes: 5 additions & 67 deletions .pipelines/.vsts-vhd-builder-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -742,76 +734,22 @@ 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: [ ]
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=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'
Expand Down
19 changes: 0 additions & 19 deletions parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,14 @@ installDeps() {
fi
}

installM2KataDeps() {
if [[ $OS_VERSION != "1.0" ]]; then
echo "<mitchzhu> 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:
#
Expand Down
12 changes: 6 additions & 6 deletions pkg/agent/baker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/bakerapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
48 changes: 12 additions & 36 deletions pkg/agent/datamodel/sig_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ var AvailableContainerdDistros = []Distro{
AKSAzureLinuxV2Gen2FIPS,
AKSAzureLinuxV3Gen2FIPS,
AKSCBLMarinerV2Gen2Kata,
AKSAzureLinuxV2Gen2Kata,
AKSAzureLinuxV3Gen2Kata,
AKSAzureLinuxV3Gen2KataCC,
AKSCBLMarinerV2Gen2TL,
AKSAzureLinuxV2Gen2TL,
AKSCBLMarinerV2KataGen2TL,
Expand Down Expand Up @@ -203,9 +201,7 @@ var AvailableGen2Distros = []Distro{
AKSAzureLinuxV2Gen2FIPS,
AKSAzureLinuxV3Gen2FIPS,
AKSCBLMarinerV2Gen2Kata,
AKSAzureLinuxV2Gen2Kata,
AKSAzureLinuxV3Gen2Kata,
AKSAzureLinuxV3Gen2KataCC,
AKSCBLMarinerV2Gen2TL,
AKSAzureLinuxV2Gen2TL,
AKSCBLMarinerV2KataGen2TL,
Expand All @@ -230,9 +226,7 @@ var AvailableAzureLinuxDistros = []Distro{
AKSAzureLinuxV2Gen2FIPS,
AKSAzureLinuxV3Gen2FIPS,
AKSCBLMarinerV2Gen2Kata,
AKSAzureLinuxV2Gen2Kata,
AKSAzureLinuxV3Gen2Kata,
AKSAzureLinuxV3Gen2KataCC,
AKSCBLMarinerV2Arm64Gen2,
AKSAzureLinuxV2Arm64Gen2,
AKSAzureLinuxV3Arm64Gen2,
Expand All @@ -251,9 +245,7 @@ var AvailableAzureLinuxCgroupV2Distros = []Distro{
AKSAzureLinuxV3FIPS,
AKSAzureLinuxV2Gen2FIPS,
AKSAzureLinuxV3Gen2FIPS,
AKSAzureLinuxV2Gen2Kata,
AKSAzureLinuxV3Gen2Kata,
AKSAzureLinuxV3Gen2KataCC,
AKSAzureLinuxV2Arm64Gen2,
AKSAzureLinuxV3Arm64Gen2,
AKSAzureLinuxV2Gen2TL,
Expand Down Expand Up @@ -711,27 +703,13 @@ var (
Version: LinuxSIGImageVersion,
}

SIGAzureLinuxV2KataImageConfigTemplate = SigImageConfigTemplate{
ResourceGroup: AKSAzureLinuxResourceGroup,
Gallery: AKSAzureLinuxGalleryName,
Definition: "V2katagen2",
Version: LinuxSIGImageVersion,
}

SIGAzureLinuxV3KataImageConfigTemplate = SigImageConfigTemplate{
ResourceGroup: AKSAzureLinuxResourceGroup,
Gallery: AKSAzureLinuxGalleryName,
Definition: "V3katagen2",
Version: LinuxSIGImageVersion,
}

SIGAzureLinuxV3KataCCImageConfigTemplate = SigImageConfigTemplate{
ResourceGroup: AKSAzureLinuxResourceGroup,
Gallery: AKSAzureLinuxGalleryName,
Definition: "V3katagen2",
Version: LinuxSIGImageVersion,
}

SIGCBLMarinerV2Arm64ImageConfigTemplate = SigImageConfigTemplate{
ResourceGroup: AKSCBLMarinerResourceGroup,
Gallery: AKSCBLMarinerGalleryName,
Expand Down Expand Up @@ -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...),
}
}

Expand Down
10 changes: 2 additions & 8 deletions pkg/agent/datamodel/sig_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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]
Expand Down
6 changes: 2 additions & 4 deletions pkg/agent/datamodel/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -254,7 +252,7 @@ var AKSDistrosAvailableOnVHD = []Distro{
AKSAzureLinuxV2Gen2FIPS,
AKSAzureLinuxV3Gen2FIPS,
AKSCBLMarinerV2Gen2Kata,
AKSAzureLinuxV2Gen2Kata,
AKSAzureLinuxV3Gen2Kata,
AKSCBLMarinerV2Gen2TL,
AKSAzureLinuxV2Gen2TL,
AKSCBLMarinerV2KataGen2TL,
Expand Down Expand Up @@ -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
}

/*
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/datamodel/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
13 changes: 2 additions & 11 deletions vhdbuilder/packer/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '"')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8b9213a

Please sign in to comment.