Adds karrot app.
This commit is contained in:
88
karrot/versions/1/deployment-worker.yaml
Normal file
88
karrot/versions/1/deployment-worker.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: karrot-worker
|
||||
namespace: {{ .namespace }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
component: worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: worker
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: karrot-worker
|
||||
image: codeberg.org/karrot/karrot-backend:v17.4.1
|
||||
command: ["/entrypoint.sh", "worker"]
|
||||
env:
|
||||
- name: MODE
|
||||
value: prod
|
||||
- name: BASE_URL
|
||||
value: https://{{ .domain }}
|
||||
- name: SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: karrot-secrets
|
||||
key: secretKey
|
||||
- name: DATABASE_NAME
|
||||
value: {{ .db.name }}
|
||||
- name: DATABASE_USER
|
||||
value: {{ .db.user }}
|
||||
- name: DATABASE_HOST
|
||||
value: {{ .db.host }}
|
||||
- name: DATABASE_PORT
|
||||
value: "{{ .db.port }}"
|
||||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: karrot-secrets
|
||||
key: dbPassword
|
||||
- name: REDIS_HOST
|
||||
value: {{ .redis.host }}
|
||||
- name: EMAIL_BACKEND
|
||||
value: smtp
|
||||
- name: EMAIL_FROM
|
||||
value: {{ .smtp.from }}
|
||||
- name: SMTP_HOST
|
||||
value: {{ .smtp.host }}
|
||||
- name: SMTP_PORT
|
||||
value: "{{ .smtp.port }}"
|
||||
- name: SMTP_USER
|
||||
value: {{ .smtp.user }}
|
||||
- name: SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: karrot-secrets
|
||||
key: smtp.password
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
ephemeral-storage: 512Mi
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 128Mi
|
||||
volumeMounts:
|
||||
- name: karrot-uploads
|
||||
mountPath: /app/uploads
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: [ALL]
|
||||
readOnlyRootFilesystem: false
|
||||
volumes:
|
||||
- name: karrot-uploads
|
||||
persistentVolumeClaim:
|
||||
claimName: karrot-uploads
|
||||
restartPolicy: Always
|
||||
Reference in New Issue
Block a user