@@ -127,55 +127,42 @@ jobs:
127
127
run : |
128
128
gcloud container clusters get-credentials ${{ env.clusterName }} --zone ${{ env.zone }}
129
129
130
- - name : Create gcloud-free kubeconfig and load it in configmap
131
- run : |
132
- .github/get-kubeconfig.sh
133
- kubectl create configmap cilium-cli-kubeconfig -n kube-system --from-file kubeconfig
130
+ - name : Install Cilium CLI
131
+ uses : ./
132
+ with :
133
+ skip-build : ' true'
134
+ image-tag : ${{ steps.vars.outputs.sha }}
134
135
135
- - name : Load test script in configmap
136
+ - name : Run test
136
137
run : |
137
- kubectl create configmap cilium-cli-test-script -n kube-system --from-file=in-cluster-test-script.sh=.github/in-cluster-test-scripts/gke.sh
138
+ cilium install \
139
+ --version "${{ env.cilium_version }}" \
140
+ --set cluster.name="${{ env.clusterName }}" \
141
+ --set bpf.monitorAggregation=none \
142
+ --set loadBalancer.l7.backend=envoy \
143
+ --set tls.secretsBackend=k8s
138
144
139
- - name : Create cilium-cli job
140
- run : |
141
- helm install .github/cilium-cli-test-job-chart \
142
- --generate-name \
143
- --set tag=${{ steps.vars.outputs.sha }} \
144
- --set cilium_version=${{ env.cilium_version }} \
145
- --set cluster_name=${{ env.clusterName }} \
146
- --set cluster_cidr=${{ steps.cluster.outputs.cluster_cidr }}
147
-
148
- - name : Wait for test job
149
- env :
150
- timeout : 45m
151
- run : |
152
- # Background wait for job to complete or timeout
153
- kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=${{ env.timeout }} &
154
- complete_pid=$!
145
+ # Enable Relay
146
+ cilium hubble enable
155
147
156
- # Background wait for job to fail
157
- (kubectl -n kube-system wait job/cilium-cli --for=condition=failed --timeout=${{ env.timeout }} && exit 1) &
158
- failed_pid=$!
148
+ # Wait for cilium and hubble relay to be ready
149
+ # NB: necessary to work against occassional flakes due to https://github.com/cilium/cilium-cli/issues/918
150
+ cilium status --wait
159
151
160
- # Active wait for whichever background process ends first
161
- wait -n $complete_pid $failed_pid
162
- EXIT_CODE=$?
152
+ # Port forward Relay
153
+ cilium hubble port-forward&
154
+ sleep 10s
155
+ [[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]
163
156
164
- # Retrieve job logs
165
- kubectl logs --timestamps -n kube-system job/cilium-cli
166
- exit ${EXIT_CODE}
167
- shell : bash {0} # Disable default fail-fast behaviour so that all commands run independently
157
+ # Run connectivity test
158
+ cilium connectivity test --all-flows --collect-sysdump-on-failure --external-target google.com.
159
+
160
+ # Run performance test
161
+ cilium connectivity perf --duration 1s
168
162
169
163
- name : Post-test information gathering
170
164
if : ${{ !success() }}
171
165
run : |
172
- echo "=== Install latest stable CLI ==="
173
- curl -sSL --remote-name-all https://github.com/cilium/cilium-cli/releases/latest/download/cilium-linux-amd64.tar.gz{,.sha256sum}
174
- sha256sum --check cilium-linux-amd64.tar.gz.sha256sum
175
- sudo tar xzvfC cilium-linux-amd64.tar.gz /usr/bin
176
- rm cilium-linux-amd64.tar.gz{,.sha256sum}
177
- cilium version
178
-
179
166
echo "=== Retrieve cluster state ==="
180
167
kubectl get pods --all-namespaces -o wide
181
168
cilium status
0 commit comments