ansible-role-k8s-diun/templates/diun-Deployment.yml.j2
2022-02-24 00:09:22 +01:00

56 lines
1.5 KiB
Django/Jinja

---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: default
name: diun
spec:
replicas: 1
selector:
matchLabels:
app: diun
template:
metadata:
labels:
app: diun
annotations:
diun.enable: "true"
diun.watch_repo: "true"
spec:
serviceAccountName: diun
containers:
- name: diun
image: crazymax/diun:latest
imagePullPolicy: Always
args: ["serve"]
env:
- name: TZ
value: "Europe/Paris"
- name: LOG_LEVEL
value: "info"
- name: LOG_JSON
value: "false"
- name: DIUN_WATCH_WORKERS
value: "20"
- name: DIUN_WATCH_SCHEDULE
value: "0 */6 * * *"
- name: DIUN_PROVIDERS_KUBERNETES
value: "true"
volumeMounts:
- mountPath: "/data"
name: "data"
- mountPath: "/etc/diun"
name: "config"
restartPolicy: Always
volumes:
# Set up a data directory for diun
# For production usage, you should consider using PV/PVC instead(or simply using storage like NAS)
# For more details, please see https://kubernetes.io/docs/concepts/storage/volumes/
- name: "data"
hostPath:
path: "/data"
type: Directory
- configMap:
defaultMode: 420
name: diun-conf
name: config