Improve Helm Chart

- use official v0.3.13 docker images hosted on GitHub
- load configs for Element-Call (public/config.json), nginx and SSL
  certs through ConfigMaps / PersistentVolumeClaims
This commit is contained in:
Johannes Meixner 2023-07-10 17:21:02 +02:00
commit 1bbf689821
7 changed files with 91 additions and 4 deletions

View file

@ -1,3 +1,4 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
@ -6,3 +7,31 @@ metadata:
data:
{{ .Values.config.fileName }}: |
{{ .Values.config.data | toPrettyJson | quote }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
namespace: default
data:
default.conf: {{ .Files.Get "files/nginx.conf" | quote }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ssl-cert
namespace: default
data:
element-call.crt: {{ .Files.Get "certs/element-call.crt" | quote }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ssl-key
namespace: default
data:
element-call.key: {{ .Files.Get "certs/element-call.key" | quote }}

View file

@ -37,6 +37,9 @@ spec:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
- name: https
containerPort: {{ .Values.service.port_https }}
protocol: TCP
livenessProbe:
httpGet:
path: /
@ -51,10 +54,25 @@ spec:
- name: config-volume
mountPath: "{{ .Values.config.path }}"
subPath: "{{ .Values.config.fileName }}"
- name: nginx-volume
mountPath: "{{ .Values.nginx_config.path }}"
- name: ssl-cert-volume
mountPath: "/etc/ssl/certs/"
- name: ssl-key-volume
mountPath: "/etc/ssl/private/"
volumes:
- name: config-volume
configMap:
name: app-config
- name: nginx-volume
configMap:
name: nginx-config
- name: ssl-cert-volume
configMap:
name: ssl-cert
- name: ssl-key-volume
configMap:
name: ssl-key
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View file

@ -11,5 +11,9 @@ spec:
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.port_https }}
targetPort: {{ .Values.service.port_https }}
protocol: TCP
name: element-https
selector:
{{- include "element-call.selectorLabels" . | nindent 4 }}