Adds indico app.
This commit is contained in:
160
indico/versions/3/deployment-worker.yaml
Normal file
160
indico/versions/3/deployment-worker.yaml
Normal file
@@ -0,0 +1,160 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: indico-worker
|
||||
namespace: {{ .namespace }}
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
component: worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: worker
|
||||
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: worker
|
||||
image: getindico/indico:3.3.12
|
||||
args: ["/opt/indico/run_celery.sh"]
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: [ALL]
|
||||
readOnlyRootFilesystem: false
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 50m
|
||||
limits:
|
||||
memory: 2Gi
|
||||
cpu: "1"
|
||||
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
|
||||
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: beat
|
||||
image: getindico/indico:3.3.12
|
||||
args: ["/opt/indico/run_celery.sh", "beat"]
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: [ALL]
|
||||
readOnlyRootFilesystem: false
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 50m
|
||||
limits:
|
||||
memory: 1Gi
|
||||
cpu: 200m
|
||||
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
|
||||
volumeMounts:
|
||||
- name: indico-config
|
||||
mountPath: /opt/indico/etc
|
||||
- name: indico-tmp
|
||||
mountPath: /opt/indico/tmp
|
||||
- name: indico-log
|
||||
mountPath: /opt/indico/log
|
||||
- name: indico-cache
|
||||
mountPath: /opt/indico/cache
|
||||
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: {}
|
||||
Reference in New Issue
Block a user