|
| 1 | +pr: none |
| 2 | +trigger: none |
| 3 | + |
| 4 | +schedules: |
| 5 | +- cron: '0 0 * * *' |
| 6 | + displayName: Daily midnight Cilium with Hubble |
| 7 | + branches: |
| 8 | + include: |
| 9 | + - master |
| 10 | + |
| 11 | +variables: |
| 12 | + clustername: ciliumhubble-$(Build.SourceBranchName)-$(Build.BuildId) |
| 13 | + cilium_version: v1.14.4 |
| 14 | + |
| 15 | +stages: |
| 16 | + - stage: createCluster |
| 17 | + pool: |
| 18 | + name: $(BUILD_POOL_NAME_DEFAULT) |
| 19 | + displayName: "create cluster" |
| 20 | + jobs: |
| 21 | + - template: ../templates/create-cluster.yaml |
| 22 | + parameters: |
| 23 | + name: cilium_overlay_hubble |
| 24 | + displayName: Cilium on AKS Overlay with Hubble Enabled |
| 25 | + clusterType: overlay-byocni-nokubeproxy-up |
| 26 | + clusterName: $(clustername) |
| 27 | + vmSize: Standard_B2ms |
| 28 | + k8sVersion: "" |
| 29 | + region: $(REGION_AKS_CLUSTER_TEST) |
| 30 | + - stage: setupCluster |
| 31 | + pool: |
| 32 | + name: $(BUILD_POOL_NAME_DEFAULT) |
| 33 | + jobs: |
| 34 | + - job: "ciliuminstall" |
| 35 | + steps: |
| 36 | + - bash: | |
| 37 | + go version |
| 38 | + go env |
| 39 | + mkdir -p '$(GOBIN)' |
| 40 | + mkdir -p '$(GOPATH)/pkg' |
| 41 | + mkdir -p '$(modulePath)' |
| 42 | + echo '##vso[task.prependpath]$(GOBIN)' |
| 43 | + echo '##vso[task.prependpath]$(GOROOT)/bin' |
| 44 | + name: "GoEnv" |
| 45 | + displayName: "Set up the Go environment" |
| 46 | +
|
| 47 | + - task: KubectlInstaller@0 |
| 48 | + inputs: |
| 49 | + kubectlVersion: latest |
| 50 | + |
| 51 | + - task: AzureCLI@1 |
| 52 | + inputs: |
| 53 | + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) |
| 54 | + scriptLocation: "inlineScript" |
| 55 | + scriptType: "bash" |
| 56 | + addSpnToEnvironment: true |
| 57 | + inlineScript: | |
| 58 | + set -e |
| 59 | + make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=$(clustername) |
| 60 | + name: "setupkubeconf" |
| 61 | + displayName: "Set up kubeconfig" |
| 62 | + |
| 63 | + - script: | |
| 64 | + CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt) |
| 65 | + CLI_ARCH=amd64 |
| 66 | + if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi |
| 67 | + curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum} |
| 68 | + sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum |
| 69 | + sudo tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin |
| 70 | + rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum} |
| 71 | + name: "installCiliumCLI" |
| 72 | + displayName: "Install Cilium CLI" |
| 73 | +
|
| 74 | + - task: AzureCLI@1 |
| 75 | + inputs: |
| 76 | + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) |
| 77 | + scriptLocation: "inlineScript" |
| 78 | + scriptType: "bash" |
| 79 | + addSpnToEnvironment: true |
| 80 | + inlineScript: | |
| 81 | + kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/cilium-config/cilium-config-hubble.yaml |
| 82 | + kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/cilium-agent/files |
| 83 | + kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/cilium-operator/files |
| 84 | + envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/$(cilium_version)/cilium-agent/templates/daemonset.tpl | kubectl apply -f - |
| 85 | + envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/$(cilium_version)/cilium-operator/templates/deployment.tpl | kubectl apply -f - |
| 86 | + # Use different file directories for nightly and current cilium version |
| 87 | + name: "installCilium" |
| 88 | + displayName: "Install Cilium on AKS Overlay" |
| 89 | + |
| 90 | + - script: | |
| 91 | + echo "Start Azilium E2E Tests on Overlay Cluster" |
| 92 | + if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ] |
| 93 | + then |
| 94 | + CNS=$(CNS_VERSION) IPAM=$(AZURE_IPAM_VERSION) && echo "Running nightly" |
| 95 | + else |
| 96 | + CNS=$(make cns-version) IPAM=$(make azure-ipam-version) |
| 97 | + fi |
| 98 | + sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=${IPAM} CNS_VERSION=${CNS} INSTALL_CNS=true INSTALL_OVERLAY=true |
| 99 | + retryCountOnTaskFailure: 3 |
| 100 | + name: "aziliumTest" |
| 101 | + displayName: "Install Azure-CNS and Run Azilium E2E on AKS Overlay" |
| 102 | + enabled: true |
| 103 | +
|
| 104 | + - script: | |
| 105 | + cilium status --wait --wait-duration 5m |
| 106 | + name: waitforhealthy |
| 107 | + displayName: "Wait for healthy cilium pods" |
| 108 | +
|
| 109 | + - script: | |
| 110 | + kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=5m |
| 111 | + name: waitforallpodsrunning |
| 112 | + displayName: "Wait for all pods to be running" |
| 113 | + retryCountOnTaskFailure: 3 |
| 114 | +
|
| 115 | + - script: | |
| 116 | + echo "Run Cilium Connectivity Tests" |
| 117 | + cilium status |
| 118 | + cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption' |
| 119 | + retryCountOnTaskFailure: 3 |
| 120 | + name: "ciliumConnectivityTests" |
| 121 | + displayName: "Run Cilium Connectivity Tests" |
| 122 | + enabled: true |
| 123 | +
|
| 124 | + - script: | |
| 125 | + kubectl apply -f test/integration/manifests/cilium/$(cilium_version)/hubble/hubble-peer-svc.yaml |
| 126 | + kubectl get pods -Aowide |
| 127 | + echo "verify Hubble metrics endpoint is usable" |
| 128 | + go test ./test/integration/networkobservability -tags=networkobservability |
| 129 | + retryCountOnTaskFailure: 3 |
| 130 | + name: "HubbleConnectivityTests" |
| 131 | + displayName: "Run Hubble Connectivity Tests" |
| 132 | + |
| 133 | + - stage: deleteCluster |
| 134 | + condition: always() |
| 135 | + dependsOn: |
| 136 | + - createCluster |
| 137 | + - setupCluster |
| 138 | + jobs: |
| 139 | + - job: delete |
| 140 | + steps: |
| 141 | + - template: ../templates/delete-cluster.yaml |
| 142 | + parameters: |
| 143 | + name: cilium_overlay_e2e |
| 144 | + clusterName: $(clustername) |
| 145 | + region: $(REGION_AKS_CLUSTER_TEST) |
0 commit comments