Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧑‍💻 Add some Init Containers #1319

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions helm/acapy-cloud.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ releases:
podLabels:
admission.datadoghq.com/enabled: "false"
tags.datadoghq.com/env: {{ .Environment.Name }}
sidecar.istio.io/inject: "false"
- nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
tolerations: {{ toYaml .Values.tolerations | nindent 10 }}
set:
Expand Down
14 changes: 14 additions & 0 deletions helm/acapy-cloud/conf/dev/governance-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ initContainers:
value: "{{ .Values.env.NATS_SERVER }}"
- name: NATS_STREAM
value: "{{ .Values.env.NATS_STREAM }}"
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z $(PG_HOST) $(PG_PORT); do echo waiting for postgres; sleep 2; done;']
env:
- name: PG_HOST
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_HOST
- name: PG_PORT
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_PORT

persistence:
enabled: false
Expand Down
14 changes: 14 additions & 0 deletions helm/acapy-cloud/conf/dev/mediator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ readinessProbe:
# memory: 384Mi

initContainers:
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z $(PG_HOST) $(PG_PORT); do echo waiting for postgres; sleep 2; done;']
env:
- name: PG_HOST
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_HOST
- name: PG_PORT
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_PORT
- name: wait-governance-agent
image: curlimages/curl
command:
Expand Down
14 changes: 14 additions & 0 deletions helm/acapy-cloud/conf/dev/multitenant-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ initContainers:
value: "{{ .Values.env.NATS_SERVER }}"
- name: NATS_STREAM
value: "{{ .Values.env.NATS_STREAM }}"
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z $(PG_HOST) $(PG_PORT); do echo waiting for postgres; sleep 2; done;']
env:
- name: PG_HOST
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_HOST
- name: PG_PORT
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_PORT

persistence:
enabled: true
Expand Down
7 changes: 6 additions & 1 deletion helm/acapy-cloud/conf/dev/trust-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ readinessProbe:
autoscaling:
enabled: false

initContainers:
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z cloudapi-pgpool 5432; do echo waiting for pgproxy; sleep 2; done;']

secretData:
POSTGRES_DATABASE_URL: postgresql://trust-registry:trust-registry@cloudapi-postgresql:5432/trust-registry?sslmode=prefer
POSTGRES_DATABASE_URL: postgresql://trust-registry:trust-registry@cloudapi-pgpool:5432/trust-registry?sslmode=prefer

env:
LOG_LEVEL: warning
Expand Down
14 changes: 14 additions & 0 deletions helm/acapy-cloud/conf/local/governance-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ initContainers:
value: "{{ .Values.env.NATS_SERVER }}"
- name: NATS_STREAM
value: "{{ .Values.env.NATS_STREAM }}"
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z $(PG_HOST) $(PG_PORT); do echo waiting for postgres; sleep 2; done;']
env:
- name: PG_HOST
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_HOST
- name: PG_PORT
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_PORT

persistence:
enabled: false
Expand Down
14 changes: 14 additions & 0 deletions helm/acapy-cloud/conf/local/mediator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ readinessProbe:
# memory: 384Mi

initContainers:
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z $(PG_HOST) $(PG_PORT); do echo waiting for postgres; sleep 2; done;']
env:
- name: PG_HOST
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_HOST
- name: PG_PORT
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_PORT
- name: wait-governance-agent
image: curlimages/curl
command:
Expand Down
14 changes: 14 additions & 0 deletions helm/acapy-cloud/conf/local/multitenant-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ initContainers:
value: "{{ .Values.env.NATS_SERVER }}"
- name: NATS_STREAM
value: "{{ .Values.env.NATS_STREAM }}"
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z $(PG_HOST) $(PG_PORT); do echo waiting for postgres; sleep 2; done;']
env:
- name: PG_HOST
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_HOST
- name: PG_PORT
valueFrom:
secretKeyRef:
name: '{{ include "acapy-cloud.fullname" . }}-env'
key: WALLET_DB_PORT

persistence:
enabled: true
Expand Down
7 changes: 6 additions & 1 deletion helm/acapy-cloud/conf/local/trust-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ readinessProbe:
autoscaling:
enabled: false

initContainers:
- name: nc-postgres
image: busybox
command: ['sh', '-c', 'until nc -z cloudapi-pgpool 5432; do echo waiting for pgproxy; sleep 2; done;']

secretData:
POSTGRES_DATABASE_URL: postgresql://trust-registry:trust-registry@cloudapi-postgresql:5432/trust-registry?sslmode=prefer
POSTGRES_DATABASE_URL: postgresql://trust-registry:trust-registry@cloudapi-pgpool:5432/trust-registry?sslmode=prefer

env:
LOG_LEVEL: warning
Expand Down
2 changes: 1 addition & 1 deletion helm/acapy-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ podLabels:
admission.datadoghq.com/enabled: "false" # disabled by default (for now)
podAnnotations:
# gcr.io/datadoghq/dd-lib-python-init
admission.datadoghq.com/python-lib.version: v2.20.0
admission.datadoghq.com/python-lib.version: v2.20.1
ad.datadoghq.com/istio-proxy.logs: '[{ "source": "envoy", "service": "{{ include "acapy-cloud.fullname" . }}" }]'
ad.datadoghq.com/istio-init.logs: '[{ "source": "envoy", "service": "{{ include "acapy-cloud.fullname" . }}" }]'

Expand Down
1 change: 0 additions & 1 deletion tilt/acapy-cloud/Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def setup_nats(namespace):
resource_deps=[
"cloudapi-ns",
"build-nats",
"istio",
],
port_forwards=[
port_forward(8222, name="monitoring"),
Expand Down
Loading