first copy

This commit is contained in:
2026-01-03 23:40:57 +00:00
parent f9334c6cee
commit 93cb475388
7 changed files with 541 additions and 19 deletions

7
templates/configmap.yaml Normal file
View File

@@ -0,0 +1,7 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: discord-mautrix-cm
data:
config.yaml: |-
{{- toYaml .Values.app.config | nindent 4 }}

View File

@@ -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
View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: discord-mautrix-data
spec:
accessModes:
- ReadWriteOncePod
resources:
requests:
storage: 100Mi

View File

@@ -8,7 +8,6 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector: