Skip to content

Commit

Permalink
pogues: add configMap to ui & api
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentC35 committed Jan 26, 2024
1 parent f15898b commit 4dde186
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/pogues/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dependencies:
repository: https://charts.bitnami.com/bitnami

type: application
version: 0.3.2
version: 0.3.3
appVersion: "4.0.8"
17 changes: 17 additions & 0 deletions charts/pogues/templates/api/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.api.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "pogues.api.fullname" . }}
labels:
app: {{ template "pogues.api.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{- if .Values.api.env }}
{{- range $key, $value := .Values.api.env }}
{{ $key }}: {{ $value | quote }}
{{- end -}}
{{- end -}}
{{- end -}}
17 changes: 17 additions & 0 deletions charts/pogues/templates/ui/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.ui.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "pogues.ui.fullname" . }}
labels:
app: {{ template "pogues.ui.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{- if .Values.ui.env }}
{{- range $key, $value := .Values.ui.env }}
{{ $key }}: {{ $value | quote }}
{{- end -}}
{{- end -}}
{{- end -}}
14 changes: 8 additions & 6 deletions charts/pogues/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.ui.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -13,10 +14,8 @@ spec:
{{- include "pogues.ui.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.ui.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/config: {{ include (print $.Template.BasePath "/ui/configmap.yaml")
labels:
{{- include "pogues.ui.selectorLabels" . | nindent 8 }}
spec:
Expand All @@ -33,9 +32,11 @@ spec:
{{- toYaml .Values.ui.securityContext | nindent 12 }}
image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
env:
- name: API_URL
value: {{ .Values.ui.env.API_URL | quote}}
{{- if and .Values.ui.enabled .Values.ui.env }}
envFrom:
- configMapRef:
name: {{ template "pogues.ui.fullname" . }}
{{- end }}
ports:
- name: http
containerPort: 80
Expand All @@ -62,3 +63,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

0 comments on commit 4dde186

Please sign in to comment.