Skip to content

Commit

Permalink
fix: cluster template env vars (#2258)
Browse files Browse the repository at this point in the history
* fix: cluster templates

* cherry-pick: 0c8106a

* chore: addressing comments
  • Loading branch information
jpayne3506 authored Sep 27, 2023
1 parent 982b794 commit f0021b5
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 33 deletions.
8 changes: 4 additions & 4 deletions .pipelines/cni/cilium/cilium-overlay-load-test-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ stages:
- template: ../load-test-templates/pod-deployment-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
scaleup: ${CILIUM_SCALEUP}
scaleup: ${SCALEUP_CILIUM}
os: linux
iterations: ${CILIUM_ITERATIONS}
iterations: ${ITERATIONS_CILIUM}
nodeCount: ${{ parameters.nodeCount }}
- template: ../load-test-templates/validate-state-template.yaml
parameters:
Expand All @@ -95,7 +95,7 @@ stages:
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
nodeCount: ${{ parameters.nodeCount }}
scaleup: ${CILIUM_SCALEUP}
scaleup: ${SCALEUP_CILIUM}
- template: ../load-test-templates/validate-state-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
Expand All @@ -108,7 +108,7 @@ stages:
- template: ../load-test-templates/restart-cns-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
scaleup: ${CILIUM_SCALEUP}
scaleup: ${SCALEUP_CILIUM}
nodeCount: ${{ parameters.nodeCount }}
- job: cni_tests
displayName: "Cilium Test"
Expand Down
11 changes: 9 additions & 2 deletions .pipelines/cni/load-test-templates/create-cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parameters:
clusterName: ""
nodeCount: ""
vmSize: ""
windowsVMSize: ""
vmSizeWin: ""

steps:
- task: AzureCLI@1
Expand All @@ -15,6 +15,13 @@ steps:
inlineScript: |
set -ex
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
make -C ./hack/aks ${{ parameters.clusterType }} AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }} NODE_COUNT=${{ parameters.nodeCount }} VM_SIZE=${{ parameters.vmSize }} WINDOWS_VM_SKU=${{ parameters.windowsVMSize }} WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD}
make -C ./hack/aks ${{ parameters.clusterType }} \
AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) \
CLUSTER=${{ parameters.clusterName }} NODE_COUNT=${{ parameters.nodeCount }} \
VM_SIZE=${{ parameters.vmSize }} VM_SIZE_WIN=${{ parameters.vmSizeWin }} \
WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD}
echo "Cluster successfully created"
name: "CreateAksCluster"
displayName: "Create AKS Cluster"
30 changes: 15 additions & 15 deletions .pipelines/cni/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,51 +106,51 @@ stages:
name: cilium_overlay
clusterType: overlay-byocni-nokubeproxy-up
clusterName: "cilium-overlay"
nodeCount: ${CILIUM_NODE_COUNT}
vmSize: ${CILIUM_VM_SKU}
nodeCount: ${NODE_COUNT_CILIUM}
vmSize: ${VM_SIZE_CILIUM}

- template: singletenancy/cniv1-template.yaml
parameters:
name: win22_cniv1
clusterType: windows-cniv1-up
clusterName: win22-cniv1
nodeCount: ${WINDOWS_NODE_COUNT}
vmSize: ${WINDOWS_LINUX_VM_SKU}
windowsVMSize: ${WINDOWS_VM_SKU}
nodeCount: ${NODE_COUNT_WIN}
vmSize: ${VM_SIZE_WINCLUSTER_SYSTEMPOOL}
vmSizeWin: ${VM_SIZE_WIN}
os: windows
os_version: 'ltsc2022'
arch: amd64
scaleup: ${WINDOWS_SCALEUP}
iterations: ${WINDOWS_ITERATIONS}
scaleup: ${SCALEUP_WIN}
iterations: ${ITERATIONS_WIN}

- template: singletenancy/cniv1-template.yaml
parameters:
name: linux_cniv1
clusterType: linux-cniv1-up
clusterName: linux-cniv1
nodeCount: ${LINUX_NODE_COUNT}
vmSize: ${LINUX_VM_SKU}
nodeCount: ${NODE_COUNT_LINUX}
vmSize: ${VM_SIZE}
os: linux
arch: amd64
scaleup: ${LINUX_SCALEUP}
iterations: ${LINUX_ITERATIONS}
scaleup: ${SCALEUP_LINUX}
iterations: ${ITERATIONS_LINUX}

- template: singletenancy/linux-cniv2-template.yaml
parameters:
name: linux_podsubnet
clusterType: swift-byocni-up
clusterName: linux-cniv2-podsubnet
nodeCount: ${LINUX_NODE_COUNT}
vmSize: ${LINUX_VM_SKU}
nodeCount: ${NODE_COUNT_LINUX}
vmSize: ${VM_SIZE}
arch: amd64

- template: singletenancy/linux-cniv2-template.yaml
parameters:
name: linux_overlay
clusterType: overlay-byocni-up
clusterName: linux-cniv2-overlay
nodeCount: ${LINUX_NODE_COUNT}
vmSize: ${LINUX_VM_SKU}
nodeCount: ${NODE_COUNT_LINUX}
vmSize: ${VM_SIZE}
arch: amd64

- stage: delete_resources
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/cni/singletenancy/cniv1-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
clusterName: ""
nodeCount: ""
vmSize: ""
windowsVMSize: ""
vmSizeWin: ""
os: ""
arch: ""
scaleup: 100
Expand Down Expand Up @@ -40,7 +40,7 @@ stages:
clusterName: ${{ parameters.clusterName }}-$(commitID)
nodeCount: ${{ parameters.nodeCount }}
vmSize: ${{ parameters.vmSize }}
windowsVMSize: ${{ parameters.windowsVMSize }}
vmSizeWin: ${{ parameters.vmSizeWin }}
region: $(LOCATION)

- stage: ${{ parameters.name }}
Expand Down
8 changes: 4 additions & 4 deletions .pipelines/cni/singletenancy/linux-cniv2-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ stages:
- template: ../load-test-templates/pod-deployment-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
scaleup: ${LINUX_SCALEUP}
scaleup: ${SCALEUP_LINUX}
os: ${{ parameters.os }}
iterations: ${LINUX_ITERATIONS}
iterations: ${ITERATIONS_LINUX}
nodeCount: ${{ parameters.nodeCount }}
- template: ../load-test-templates/validate-state-template.yaml
parameters:
Expand All @@ -119,7 +119,7 @@ stages:
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
nodeCount: ${{ parameters.nodeCount }}
scaleup: ${LINUX_SCALEUP}
scaleup: ${SCALEUP_LINUX}
- template: ../load-test-templates/validate-state-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
Expand All @@ -134,7 +134,7 @@ stages:
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
cni: cniv2
scaleup: ${LINUX_SCALEUP}
scaleup: ${SCALEUP_LINUX}
nodeCount: ${{ parameters.nodeCount }}
- job: recover
displayName: "Recover Resources"
Expand Down
3 changes: 0 additions & 3 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ stages:
clusterName: "ciliumpodsubnetcnie2e"
vmSize: Standard_B2ms
k8sVersion: ""
windowsOsSku: ""
dependsOn: "containerize"

# Cilium Overlay E2E tests
Expand All @@ -373,7 +372,6 @@ stages:
clusterName: "ciliumoverlaycnie2e"
vmSize: Standard_B2ms
k8sVersion: ""
windowsOsSku: ""
dependsOn: "containerize"

# Azure Overlay E2E tests
Expand Down Expand Up @@ -420,7 +418,6 @@ stages:
clusterName: "swiftcnie2e"
vmSize: Standard_B2ms
k8sVersion: ""
windowsOsSku: ""
dependsOn: "containerize"

# CNIv1 E2E tests
Expand Down
1 change: 1 addition & 0 deletions .pipelines/singletenancy/aks/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ stages:
clusterType: ${{ parameters.clusterType }}
clusterName: ${{ parameters.clusterName }}-$(commitID)
vmSize: ${{ parameters.vmSize }}
vmSizeWin: ${{ parameters.vmSize }} # Matching linux vmSize
k8sVersion: ${{ parameters.k8sVersion }}
dependsOn: ${{ parameters.dependsOn }}
region: $(REGION_AKS_CLUSTER_TEST)
Expand Down
12 changes: 10 additions & 2 deletions .pipelines/templates/create-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ parameters:
clusterType: ""
clusterName: "" # Recommended to pass in unique identifier
vmSize: ""
vmSizeWin: ""
k8sVersion: ""
windowsOsSku: "Windows2022" # Currently we only support Windows2022
osSkuWin: "Windows2022" # Currently we only support Windows2022
dependsOn: ""
region: ""

Expand All @@ -31,7 +32,14 @@ jobs:
fi
mkdir -p ~/.kube/
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
make -C ./hack/aks ${{ parameters.clusterType }} AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }} K8S_VER=${{ parameters.k8sVersion }} VM_SIZE=${{ parameters.vmSize }} WINDOWS_OS_SKU=${{ parameters.windowsOsSku }} WINDOWS_VM_SKU=${{ parameters.vmSize }} WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD}
make -C ./hack/aks ${{ parameters.clusterType }} \
AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) \
CLUSTER=${{ parameters.clusterName }} K8S_VER=${{ parameters.k8sVersion }} \
VM_SIZE=${{ parameters.vmSize }} VM_SIZE_WIN=${{ parameters.vmSizeWin }} \
OS_SKU_WIN=${{ parameters.osSkuWin }} \
WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD}
echo "Cluster successfully created"
displayName: Cluster - ${{ parameters.clusterType }}
continueOnError: ${{ contains(parameters.clusterType, 'dualstack') }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ ACNCLI_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VE
CNI_DROPGZ_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNI_DROPGZ_VERSION)
CNI_DROPGZ_TEST_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNI_DROPGZ_TEST_VERSION)
CNS_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNS_VERSION)
CNS_WINDOWS_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNS_VERSION)-$(WINDOWS_OS_SKU)
CNS_WINDOWS_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNS_VERSION)-$(OS_SKU_WIN)
NPM_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(NPM_VERSION)


Expand Down

0 comments on commit f0021b5

Please sign in to comment.