++postgres update +change permissions

This commit is contained in:
Nico Schottelius 2021-10-09 22:46:36 +09:00
parent ad6695f9eb
commit 689346f1b8

View file

@ -15,7 +15,7 @@ spec:
spec: spec:
containers: containers:
- name: postgres - name: postgres
image: postgres:13 image: postgres:14
ports: ports:
- containerPort: 5432 - containerPort: 5432
envFrom: envFrom:
@ -69,6 +69,42 @@ spec:
volumeMounts: volumeMounts:
- name: etcletsencrypt - name: etcletsencrypt
mountPath: "/etc/letsencrypt" mountPath: "/etc/letsencrypt"
- name: change-permissions
image: busybox
command:
- sh
- -c
- chown 1000:0000 /opt/zammad
volumeMounts:
- name: zammad-data
mountPath: "/opt/zammad"
- name: zammad-init
image: zammad/zammad-docker-compose:zammad-{{ .Chart.AppVersion }}
command:
- /docker-entrypoint.sh
- zammad-init
env:
- name: POSTGRESQL_HOST
value: {{ .Release.Name }}-postgres
- name: POSTGRESQL_USER
valueFrom:
secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_USER
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_PASSWORD
- name: POSTGRESQL_DB
valueFrom:
secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_DB
volumeMounts:
- name: zammad-data
mountPath: "/opt/zammad"
containers: containers:
- name: nginx - name: nginx
image: nginx:1.21-alpine image: nginx:1.21-alpine
@ -105,7 +141,15 @@ spec:
ports: ports:
- containerPort: 11211 - containerPort: 11211
- name: elasticsearch - name: elasticsearch
image: zammad/zammad-docker-docker-compose:zammad-elasticsearch-{{ .Chart.AppVersion }} image: zammad/zammad-docker-compose:zammad-elasticsearch-{{ .Chart.AppVersion }}
env:
- name: discovery.type
value: "single-node"
# Required, because elasticsearch is using chroot()
securityContext:
capabilities:
add: ["SYS_CHROOT"]
#image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0 #image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0
# resources: # resources:
# requests: # requests:
@ -128,7 +172,7 @@ spec:
ports: ports:
- containerPort: 6379 - containerPort: 6379
- name: zammad - name: zammad
image: zammad/zammad-docker-docker-compose:zammad-{{ .Chart.AppVersion }} image: zammad/zammad-docker-compose:zammad-{{ .Chart.AppVersion }}
# Wait for 10 minutes to get ready # Wait for 10 minutes to get ready
# startupProbe: # startupProbe:
# httpGet: # httpGet:
@ -153,39 +197,41 @@ spec:
- containerPort: 8080 - containerPort: 8080
name: rails name: rails
env: env:
- name: POSTGRES_DB - name: POSTGRESQL_HOST
value: {{ .Release.Name }}-postgres
- name: POSTGRESQL_USER
valueFrom:
secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_USER
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_PASSWORD
- name: POSTGRESQL_DB
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_DB key: POSTGRES_DB
- name: ZAMMAD_TRUSTED_DOMAINS - name: REDIS_URL
value: "{{ tpl .Values.fqdn . }}" value: "redis://localhost:6379"
- name: ZAMMAD_ADMIN_USER - name: MEMCACHE_SERVERS
valueFrom: value: "localhost:11211"
secretKeyRef: - name: ELASTICSEARCH_HOST
name: {{ tpl .Values.identifier . }}-zammad value: "localhost"
key: USERNAME # - name: ZAMMAD_TRUSTED_DOMAINS
# value: "{{ tpl .Values.fqdn . }}"
# - name: ZAMMAD_ADMIN_USER
# valueFrom:
# secretKeyRef:
# name: {{ tpl .Values.identifier . }}-zammad
# key: USERNAME
# - name: ZAMMAD_ADMIN_PASSWORD # - name: ZAMMAD_ADMIN_PASSWORD
# valueFrom: # valueFrom:
# secretKeyRef: # secretKeyRef:
# name: {{ tpl .Values.identifier . }}-zammad # name: {{ tpl .Values.identifier . }}-zammad
# key: PASSWORD # key: PASSWORD
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_PASSWORD
- name: POSTGRES_HOST
value: {{ .Release.Name }}-postgres
- name: REDIS_URL
value: "redis://localhost:6379"
- name: MEMCACHE_SERVERS
value: "localhost:11211"
volumeMounts: volumeMounts:
- name: zammad-data - name: zammad-data
mountPath: "/opt/zammad" mountPath: "/opt/zammad"