Add label prefix e2e test

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2020-12-22 12:57:43 +02:00
parent 6349dbf5c0
commit 0fa4654034
3 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -12,4 +12,4 @@ kubectl apply -k ${REPO_ROOT}/kustomize/kubernetes
kubectl -n flagger-system set image deployment/flagger flagger=test/flagger:latest
kubectl -n flagger-system rollout status deployment/flagger
kubectl -n flagger-system rollout status deployment/flagger-prometheus
kubectl -n flagger-system rollout status deployment/flagger-prometheus
+11
View File
@@ -72,6 +72,17 @@ until ${ok}; do
fi
done
passed=$(kubectl -n test get deploy/podinfo-primary -oyaml 2>&1 | { grep test-label-prefix || true; })
if [ -z "$passed" ]; then
echo -e '\u2716 primary copy labels by prefix test failed'
exit 1
fi
passed=$(kubectl -n test get deploy/podinfo-primary -oyaml 2>&1 | { grep test-annotation-prefix || true; })
if [ -z "$passed" ]; then
echo -e '\u2716 primary copy annotations by prefix test failed'
exit 1
fi
echo '✔ Canary initialization test passed'
echo '>>> Triggering canary deployment'
+4 -1
View File
@@ -4,7 +4,10 @@ metadata:
name: podinfo
namespace: test
labels:
app: podinfo
app.kubernetes.io/name: podinfo
app.kubernetes.io/managed-by: test-label-prefix
annotations:
app.kubernetes.io/instance: test-annotation-prefix
spec:
minReadySeconds: 5
revisionHistoryLimit: 5