apiVersion: apps/v1 kind: Deployment metadata: name: indico namespace: {{ .namespace }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: component: web template: metadata: labels: component: web spec: securityContext: runAsNonRoot: true runAsUser: 999 runAsGroup: 999 fsGroup: 999 seccompProfile: type: RuntimeDefault initContainers: - name: config-init image: getindico/indico:3.3.12 command: ["/bin/sh", "-c"] args: - | sed \ -e "s|SECRET_KEY_PLACEHOLDER|${SECRET_KEY}|g" \ -e "s|REDIS_PASSWORD_PLACEHOLDER|${REDIS_PASSWORD}|g" \ -e "s|SMTP_PASSWORD_PLACEHOLDER|${SMTP_PASSWORD}|g" \ /etc/indico-base/indico.conf.tpl > /opt/indico/etc/indico.conf securityContext: allowPrivilegeEscalation: false capabilities: drop: [ALL] readOnlyRootFilesystem: false env: - name: SECRET_KEY valueFrom: secretKeyRef: name: indico-secrets key: secretKey - name: REDIS_PASSWORD valueFrom: secretKeyRef: name: indico-secrets key: redis.password - name: SMTP_PASSWORD valueFrom: secretKeyRef: name: indico-secrets key: smtp.password volumeMounts: - name: indico-config-base mountPath: /etc/indico-base - name: indico-config mountPath: /opt/indico/etc containers: - name: indico image: getindico/indico:3.3.12 args: ["/opt/indico/run_indico.sh"] ports: - name: http containerPort: 59999 protocol: TCP securityContext: allowPrivilegeEscalation: false capabilities: drop: [ALL] readOnlyRootFilesystem: false resources: requests: memory: 256Mi cpu: 50m limits: memory: 2Gi cpu: "2" env: - name: PGHOST value: "{{ .db.host }}" - name: PGPORT value: "{{ .db.port }}" - name: PGUSER value: "{{ .db.user }}" - name: PGDATABASE value: "{{ .db.name }}" - name: PGPASSWORD valueFrom: secretKeyRef: name: indico-secrets key: dbPassword livenessProbe: tcpSocket: port: 59999 initialDelaySeconds: 120 periodSeconds: 30 failureThreshold: 6 readinessProbe: tcpSocket: port: 59999 initialDelaySeconds: 60 periodSeconds: 15 failureThreshold: 3 volumeMounts: - name: indico-config mountPath: /opt/indico/etc - name: indico-archive mountPath: /opt/indico/archive - name: indico-tmp mountPath: /opt/indico/tmp - name: indico-log mountPath: /opt/indico/log - name: indico-cache mountPath: /opt/indico/cache - name: indico-custom mountPath: /opt/indico/custom - name: indico-static mountPath: /opt/indico/static-shared volumes: - name: indico-config-base configMap: name: indico-config - name: indico-config emptyDir: {} - name: indico-archive persistentVolumeClaim: claimName: indico-archive - name: indico-tmp emptyDir: medium: Memory - name: indico-log emptyDir: {} - name: indico-cache emptyDir: {} - name: indico-custom emptyDir: {} - name: indico-static emptyDir: {}