...
1apiVersion: apps/v1
2kind: Deployment
3metadata:
4 name: emissary-ingress
5 namespace: emissary
6spec:
7 template:
8 spec:
9 priorityClassName: edge-p2-critical-services
10 initContainers:
11 - name: wait-for-apiext
12 image: us-east1-docker.pkg.dev/ret-edge-pltf-infra/workloads/alpine_kubectl@sha256:a55a7c36a59ff831c38e38647a63e8931b4a82e626bb8585244182d8e3061b9b
13 - name: wait-for-crds
14 image: us-east1-docker.pkg.dev/ret-edge-pltf-infra/workloads/alpine_kubectl@sha256:a55a7c36a59ff831c38e38647a63e8931b4a82e626bb8585244182d8e3061b9b
15 command:
16 - /bin/sh
17 - -c
18 args:
19 - |
20 pallet_name="emissary-crds"
21 group="getambassador.io"
22 timeout=300
23 echo "Waiting for all CRDs with group '$group' to be under '$pallet_name' pallet..."
24 i=0
25 while [ $i -lt $timeout ]; do
26 all_updated=true
27 crds=$(kubectl get crds -o jsonpath="{.items[?(@.spec.group == \"$group\")].metadata.name}")
28 if [ -z "$crds" ]; then
29 echo "No CRDs found in group '$group'."
30 all_updated=false
31 else
32 for crd in $crds; do
33 annotation=$(kubectl get crd "$crd" -o jsonpath="{.metadata.annotations.pallet\.edge\.ncr\.com/name}")
34 if [ "$annotation" != "$pallet_name" ]; then
35 all_updated=false
36 break
37 fi
38 done
39 fi
40 if [ "$all_updated" = true ]; then
41 echo "Complete."
42 exit 0
43 fi
44 sleep 1
45 i=$((i + 1))
46 done
47 echo "Timeout of '$timeout' seconds reached."
48 exit 1
49 imagePullPolicy: IfNotPresent
50 securityContext:
51 runAsUser: 8888
52 containers:
53 - name: ambassador
54 image: bzl://hack/deps:emissary_container_push
55 env:
56 - name: SCOUT_DISABLE
57 value: "1"
58 imagePullSecrets:
59 - name: edge-docker-pull-secret
View as plain text