You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ! grep -q "The Kubernetes RBAC policy that the Admin Console is running with does not have access to complete the Preflight Checks. It's recommended that you run these manually before proceeding." output.txt; then
@@ -731,6 +735,74 @@ jobs:
731
735
kubectl get clusterrolebinding
732
736
exit 1
733
737
fi
738
+
739
+
# check that the kotsadm, minio and rqlite pods have the correct labels and annotations
740
+
echo "Checking additional pod labels and annotations"
741
+
# label one
742
+
if ! kubectl get pods -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.labels.testlabel1}' | grep -q testvalue1; then
743
+
echo "kotsadm pod does not have the correct testlabel1 label"
744
+
kubectl get pods -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.labels}'
745
+
exit 1
746
+
fi
747
+
if ! kubectl get pods -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.labels.testlabel1}' | grep -q testvalue1; then
748
+
echo "kotsadm-minio pod does not have the correct testlabel1 label"
749
+
kubectl get pods -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.labels}'
750
+
exit 1
751
+
fi
752
+
if ! kubectl get pods -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.labels.testlabel1}' | grep -q testvalue1; then
753
+
echo "kotsadm-rqlite pod does not have the correct testlabel1 label"
754
+
kubectl get pods -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.labels}'
755
+
exit 1
756
+
fi
757
+
# annotation one
758
+
if ! kubectl get pods -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.annotations.testannotation1}' | grep -q testannotationvalue1; then
759
+
echo "kotsadm pod does not have the correct testannotation1 annotation"
760
+
kubectl get pods -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.annotations}'
761
+
exit 1
762
+
fi
763
+
if ! kubectl get pods -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.annotations.testannotation1}' | grep -q testannotationvalue1; then
764
+
echo "kotsadm-minio pod does not have the correct testannotation1 annotation"
765
+
kubectl get pods -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.annotations}'
766
+
exit 1
767
+
fi
768
+
if ! kubectl get pods -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.annotations.testannotation1}' | grep -q testannotationvalue1; then
769
+
echo "kotsadm-rqlite pod does not have the correct testannotation1 annotation"
770
+
kubectl get pods -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.annotations}'
771
+
exit 1
772
+
fi
773
+
# label two
774
+
if ! kubectl get pod -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.labels.test\.label/two}' | grep -q 'test.value/two'; then
775
+
echo "kotsadm pod does not have the correct test.label/two label"
776
+
kubectl get pod -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.labels}'
777
+
exit 1
778
+
fi
779
+
if ! kubectl get pod -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.labels.test\.label/two}' | grep -q 'test.value/two'; then
780
+
echo "kotsadm-minio pod does not have the correct test.label/two label"
781
+
kubectl get pod -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.labels}'
782
+
exit 1
783
+
fi
784
+
if ! kubectl get pod -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.labels.test\.label/two}' | grep -q 'test.value/two'; then
785
+
echo "kotsadm-rqlite pod does not have the correct test.label/two label"
786
+
kubectl get pod -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.labels}'
787
+
exit 1
788
+
fi
789
+
# annotation two
790
+
if ! kubectl get pod -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.annotations.test\.annotation/two}' | grep -q 'testannotation.value/two'; then
791
+
echo "kotsadm pod does not have the correct test.annotation/two annotation"
792
+
kubectl get pod -n "$APP_SLUG" -l app=kotsadm -o jsonpath='{.items[0].metadata.annotations}'
793
+
exit 1
794
+
fi
795
+
if ! kubectl get pod -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.annotations.test\.annotation/two}' | grep -q 'testannotation.value/two'; then
796
+
echo "kotsadm-minio pod does not have the correct test.annotation/two annotation"
797
+
kubectl get pod -n "$APP_SLUG" -l app=kotsadm-minio -o jsonpath='{.items[0].metadata.annotations}'
798
+
exit 1
799
+
fi
800
+
if ! kubectl get pod -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.annotations.test\.annotation/two}' | grep -q 'testannotation.value/two'; then
801
+
echo "kotsadm-rqlite pod does not have the correct test.annotation/two annotation"
802
+
kubectl get pod -n "$APP_SLUG" -l app=kotsadm-rqlite -o jsonpath='{.items[0].metadata.annotations}'
803
+
exit 1
804
+
fi
805
+
echo "additional pod labels and annotations are present"
0 commit comments