Skip to content

Commit

Permalink
data-api: support adding secrets to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Andraz Vrhovec committed Dec 16, 2020
1 parent 00bd97d commit eb875e7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/data-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.9.0
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 3 additions & 1 deletion charts/data-api/templates/configmap.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.configmap.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -7,4 +8,5 @@ metadata:
data:
{{- range $key, $val := .Values.configmap.data }}
{{$key}}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- end }}
16 changes: 7 additions & 9 deletions charts/data-api/templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
maxUnavailable: 1
template:
metadata:
{{- with .Values.podAnnotations }}
Expand All @@ -41,17 +41,15 @@ spec:
- name: http
containerPort: 5000
protocol: TCP
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
envFrom:
{{- if .Values.configmap.enabled }}
- configMapRef:
name: {{ .Release.Name }}-config
{{- end }}
{{- if .Values.existingSecret }}
- secretRef:
name: {{ .Values.existingSecret }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
3 changes: 3 additions & 0 deletions charts/data-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ tolerations: []
affinity: {}

configmap:
enabled: false
data: []

existingSecret:

0 comments on commit eb875e7

Please sign in to comment.