mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Add label prefix e2e test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user