Skip to content

Commit 97298c2

Browse files
authored
Don't init data store with metal-api instances. (#10)
1 parent 30f67b8 commit 97298c2

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

charts/metal-control-plane/templates/metal-api.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ spec:
7474
value: {{ .Values.zap_encoding }}
7575
- name: ZAP_LEVEL
7676
value: {{ .Values.zap_level }}
77+
- name: METAL_API_INIT_DATA_STORE
78+
value: "false"
7779
- name: METAL_API_DB_ADDR
7880
value: {{ .Values.metal_api.db_address }}
7981
- name: METAL_API_DB_PASSWORD
@@ -310,16 +312,22 @@ spec:
310312
mountPath: /masterdata
311313
initContainers:
312314
- name: wait-for-api
313-
image: gempesaw/curl-jq
315+
image: {{ .Values.images.metalctl.image }}:{{ .Values.images.metalctl.tag }}
316+
imagePullPolicy: {{ .Values.images.metalctl.imagePullPolicy }}
314317
env:
315-
- name: API_BASE_URL
316-
value: metal-api:{{ .Values.ports.metal_api }}{{ .Values.metal_api.base_path }}
318+
- name: METALCTL_URL
319+
value: http://metal-api:{{ .Values.ports.metal_api }}{{ .Values.metal_api.base_path }}
320+
- name: METALCTL_HMAC
321+
valueFrom:
322+
secretKeyRef:
323+
name: metal-api
324+
key: admin_key
317325
command:
318326
- sh
319327
- -c
320328
- |
321-
set -eu
322-
until curl --output /dev/null --fail -s $API_BASE_URL/v1/health; do echo waiting for $API_BASE_URL; sleep 2; done
329+
set -exu
330+
until /metalctl health; do echo "." && sleep 2; done
323331
volumes:
324332
- name: masterdata
325333
configMap:

0 commit comments

Comments
 (0)