From cc3f57f53c54f3e49fc01596aceb77d0b38c8108 Mon Sep 17 00:00:00 2001 From: XPA Date: Sat, 27 Apr 2024 12:07:47 +0900 Subject: [PATCH] fix: add secret-placer --- kubernetes/mattermost/mattermost.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/kubernetes/mattermost/mattermost.yml b/kubernetes/mattermost/mattermost.yml index 2a7ec27..9b95e5e 100644 --- a/kubernetes/mattermost/mattermost.yml +++ b/kubernetes/mattermost/mattermost.yml @@ -25,6 +25,18 @@ spec: serviceAccountName: mattermost-primary readinessGates: - conditionType: bleve-ready + initContainers: + - name: secret-placer + image: busybox + command: ["/bin/sh","-c"] + args: + - cp /secret/config.json /config/config.json + && chown 2000:2000 /config/config.json + volumeMounts: + - name: config + mountPath: /config + - name: secret + mountPath: /secret containers: - name: mattermost image: mattermost/mattermost-team-edition:release-9.1 @@ -82,8 +94,10 @@ spec: mountPath: /mattermost/bleve/ volumes: - name: config - secret: - secretName: gcp-secret-config + emptyDir: {} - name: bleve emptyDir: sizeLimit: 2Gi + - name: secret + secret: + secretName: gcp-secret-config