first copy
This commit is contained in:
7
templates/configmap.yaml
Normal file
7
templates/configmap.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: discord-mautrix-cm
|
||||
data:
|
||||
config.yaml: |-
|
||||
{{- toYaml .Values.app.config | nindent 4 }}
|
||||
@@ -6,6 +6,8 @@ metadata:
|
||||
{{- include "discord-mautrix.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "discord-mautrix.selectorLabels" . | nindent 6 }}
|
||||
@@ -30,8 +32,26 @@ spec:
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: {{ .Chart.Name }}-copy-config
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: [cp, /config/config.yaml, /data/config.yaml]
|
||||
{{- with .Values.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: {{ .Chart.Name }}-generate-registration
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: [mautrix-discord, -c, /data/config.yaml, -g]
|
||||
{{- with .Values.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
command: [sleep, infinity]
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
|
||||
10
templates/pvc.yaml
Normal file
10
templates/pvc.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: discord-mautrix-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOncePod
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
@@ -8,7 +8,6 @@ spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
|
||||
Reference in New Issue
Block a user