Skip to content

Commit

Permalink
Mount profiles.json to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
harryttd committed Aug 23, 2023
1 parent 6e410ca commit 1a8e87b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions charts/tezos-faucet/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ metadata:
name: faucet-backend-config
namespace: {{ .Release.Namespace }}
data:
profiles.json: {{ .Values.profiles | mustToPrettyJson | quote }}

AUTHORIZED_HOST: "{{ .Values.authorizedHost }}"
DISABLE_CHALLENGES: "{{ .Values.disableChallenges }}"
ENABLE_CAPTCHA: "{{ .Values.enableCaptcha }}"
Expand Down
21 changes: 18 additions & 3 deletions charts/tezos-faucet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,18 @@ spec:
name: faucet-backend-config
- secretRef:
name: faucet-backend-secret
{{- if .Values.enableUI }}
env:
# profiles.json gets set via the configmap. We store it there for easy
# access to mount as a file instead of in a new configmap. We don't
# need it to be an env var so we make it empty here.
- name: profiles.json
value: ""
volumeMounts:
- name: faucet-backend-config
mountPath: /app/dist/profiles.json
subPath: profiles.json
readOnly: true
{{- if .Values.enableUI }}
- image: {{ .Values.images.tezosFaucet }}
name: faucet
securityContext:
Expand All @@ -53,12 +64,16 @@ spec:
mountPath: /app/public/config.json
subPath: config.json
readOnly: true
{{- end }}
volumes:
- name: faucet-backend-config
configMap:
name: faucet-backend-config
{{- if .Values.enableUI }}
- name: faucet-config
configMap:
name: faucet-config

{{- end }}
{{- end }}

{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down

0 comments on commit 1a8e87b

Please sign in to comment.