Skip to content

Commit

Permalink
Add optional existing configmap (#305)
Browse files Browse the repository at this point in the history
Signed-off-by: David Young <davidy@funkypenguin.co.nz>
  • Loading branch information
funkypenguin authored Jul 7, 2021
1 parent 91587a4 commit 0ac0af6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if not .Values.existingConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -10,3 +11,4 @@ metadata:
data:
application.yaml: |
{{ toYaml .Values.applicationYaml | indent 4 }}
{{ end }}
5 changes: 4 additions & 1 deletion helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ spec:
volumes:
- name: config-volume
configMap:
{{- if .Values.existingConfigMap }}
name: {{ .Values.existingConfigMap }}
{{- else }}
name: {{ template "helm.fullname" . }}-config

{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
Expand Down
5 changes: 5 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ ingress:
path: /auth
tls: []

# rather than constructing applicationYaml below, it may be desirable to simply mount
# an existing configmap into the deployment as application.yaml. Specify the name
# of this existing configmap below to ignore applicationYaml:
existingConfigMap: null

## Uncomment and complete the following section to set the configuration
# applicationYaml:
# domain: https://xxxxx.xx.auth0.com/
Expand Down

0 comments on commit 0ac0af6

Please sign in to comment.