diff --git a/helm/codeapi/templates/egress-gateway-deployment.yaml b/helm/codeapi/templates/egress-gateway-deployment.yaml index 49c865f0..941844ce 100644 --- a/helm/codeapi/templates/egress-gateway-deployment.yaml +++ b/helm/codeapi/templates/egress-gateway-deployment.yaml @@ -24,6 +24,12 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- if or .Values.egressGrant.ledgerRequired .Values.hardenedSandboxMode }} + initContainers: + - name: wait-for-redis + image: busybox:1.36.1 + command: ['sh', '-c', 'until nc -z {{ include "codeapi.redis.host" . }} {{ include "codeapi.redis.port" . }}; do echo waiting for redis; sleep 2; done'] + {{- end }} containers: - name: egress-gateway image: "{{ .Values.egressGateway.image.repository }}:{{ .Values.egressGateway.image.tag }}"