Skip to content

Commit

Permalink
Merge pull request #31 from bokristoffersson/environment-configmap
Browse files Browse the repository at this point in the history
Store environment variables in a configmap
  • Loading branch information
anestos authored Dec 10, 2021
2 parents 7a01f86 + a17e40e commit 710ad2c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion idsvr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ Parameter | Description | Default
`curity.config.uiEnabled`| Flag to enable/disable the service for Admin UI and Admin REST API |`false`
`curity.config.password`| The administrator password. Required if `curity.config.environmentVariableSecret` and `curity.config.configurationSecret` is not set | `null`
`curity.config.encryptionKey`| The configuration encryption key |`null`
`curity.config.environmentVariableSecret`| The data from this Secret will be mounted as environment variables |`null`
`curity.config.environmentVariableSecret`| The data from this Secret will be mounted as environment variables |`null`
`curity.config.environmentVariableConfigMap`| The data from this ConfigMap will be mounted as environment variables |`null`
`curity.config.configurationSecret`| The Secret containing configuration which is mounted as a volume |`null`
`curity.config.configurationSecretItemName`| The `curity.config.configurationSecret`'s item name, required if the Secret is set. |`null`
`curity.config.configurationConfigMap`| The ConfigMap containing configuration which is mounted as a volume |`null`
Expand Down
8 changes: 7 additions & 1 deletion idsvr/templates/deployment-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@ spec:
- name: {{ $env.name }}
value: {{ $env.value | quote }}
{{- end }}
{{- if .Values.curity.config.environmentVariableSecret }}
{{- if ( or .Values.curity.config.environmentVariableSecret .Values.curity.config.environmentVariableConfigMap ) }}
envFrom:
{{- if .Values.curity.config.environmentVariableConfigMap }}
- configMapRef:
name: {{ .Values.curity.config.environmentVariableConfigMap | quote }}
{{- end }}
{{- if .Values.curity.config.environmentVariableSecret }}
- secretRef:
name: {{ .Values.curity.config.environmentVariableSecret | quote }}
{{- end }}
{{- end }}
ports:
- name: config-port
containerPort: {{ .Values.curity.admin.service.port }}
Expand Down
8 changes: 7 additions & 1 deletion idsvr/templates/deployment-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ spec:
- name: {{ $env.name }}
value: {{ $env.value | quote }}
{{- end }}
{{- if .Values.curity.config.environmentVariableSecret }}
{{- if ( or .Values.curity.config.environmentVariableSecret .Values.curity.config.environmentVariableConfigMap ) }}
envFrom:
{{- if .Values.curity.config.environmentVariableConfigMap }}
- configMapRef:
name: {{ .Values.curity.config.environmentVariableConfigMap | quote }}
{{- end }}
{{- if .Values.curity.config.environmentVariableSecret }}
- secretRef:
name: {{ .Values.curity.config.environmentVariableSecret | quote }}
{{- end }}
{{- end }}
ports:
- name: http-port
containerPort: {{ .Values.curity.runtime.deployment.port }}
Expand Down
1 change: 1 addition & 0 deletions idsvr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ curity:
password:
encryptionKey:
environmentVariableSecret:
environmentVariableConfigMap:
configurationConfigMap:
configurationConfigMapItemName:
configurationSecret:
Expand Down

0 comments on commit 710ad2c

Please sign in to comment.