Skip to content

Commit

Permalink
Don't init data store with metal-api instances. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Feb 5, 2021
1 parent 30f67b8 commit 97298c2
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions charts/metal-control-plane/templates/metal-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ spec:
value: {{ .Values.zap_encoding }}
- name: ZAP_LEVEL
value: {{ .Values.zap_level }}
- name: METAL_API_INIT_DATA_STORE
value: "false"
- name: METAL_API_DB_ADDR
value: {{ .Values.metal_api.db_address }}
- name: METAL_API_DB_PASSWORD
Expand Down Expand Up @@ -310,16 +312,22 @@ spec:
mountPath: /masterdata
initContainers:
- name: wait-for-api
image: gempesaw/curl-jq
image: {{ .Values.images.metalctl.image }}:{{ .Values.images.metalctl.tag }}
imagePullPolicy: {{ .Values.images.metalctl.imagePullPolicy }}
env:
- name: API_BASE_URL
value: metal-api:{{ .Values.ports.metal_api }}{{ .Values.metal_api.base_path }}
- name: METALCTL_URL
value: http://metal-api:{{ .Values.ports.metal_api }}{{ .Values.metal_api.base_path }}
- name: METALCTL_HMAC
valueFrom:
secretKeyRef:
name: metal-api
key: admin_key
command:
- sh
- -c
- |
set -eu
until curl --output /dev/null --fail -s $API_BASE_URL/v1/health; do echo waiting for $API_BASE_URL; sleep 2; done
set -exu
until /metalctl health; do echo "." && sleep 2; done
volumes:
- name: masterdata
configMap:
Expand Down

0 comments on commit 97298c2

Please sign in to comment.