diun.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: diun
  6. ---
  7. apiVersion: v1
  8. kind: ServiceAccount
  9. metadata:
  10. namespace: diun
  11. name: diun
  12. ---
  13. apiVersion: rbac.authorization.k8s.io/v1
  14. kind: ClusterRole
  15. metadata:
  16. name: diun
  17. rules:
  18. - apiGroups:
  19. - ""
  20. resources:
  21. - pods
  22. verbs:
  23. - get
  24. - watch
  25. - list
  26. ---
  27. apiVersion: rbac.authorization.k8s.io/v1
  28. kind: ClusterRoleBinding
  29. metadata:
  30. name: diun
  31. roleRef:
  32. apiGroup: rbac.authorization.k8s.io
  33. kind: ClusterRole
  34. name: diun
  35. subjects:
  36. - kind: ServiceAccount
  37. name: diun
  38. namespace: diun
  39. ---
  40. apiVersion: apps/v1
  41. kind: Deployment
  42. metadata:
  43. namespace: diun
  44. name: diun
  45. spec:
  46. strategy:
  47. type: Recreate
  48. replicas: 1
  49. selector:
  50. matchLabels:
  51. app: diun
  52. template:
  53. metadata:
  54. labels:
  55. app: diun
  56. spec:
  57. serviceAccountName: diun
  58. containers:
  59. - name: diun
  60. image: crazymax/diun:latest
  61. imagePullPolicy: Always
  62. args: ["serve"]
  63. env:
  64. - name: TZ
  65. value: "America/New_York"
  66. - name: LOG_LEVEL
  67. value: "info"
  68. - name: LOG_JSON
  69. value: "false"
  70. - name: DIUN_WATCH_WORKERS
  71. value: "20"
  72. - name: DIUN_WATCH_SCHEDULE
  73. value: "0 */6 * * *"
  74. - name: DIUN_WATCH_JITTER
  75. value: "30s"
  76. - name: DIUN_PROVIDERS_KUBERNETES
  77. value: "true"
  78. - name: DIUN_PROVIDERS_KUBERNETES_WATCHBYDEFAULT
  79. value: "true"
  80. - name: DIUN_NOTIF_NTFY_ENDPOINT
  81. value: "https://ntfy.jibby.org"
  82. - name: DIUN_NOTIF_NTFY_TOKEN
  83. valueFrom:
  84. secretKeyRef:
  85. name: diun
  86. key: ntfy-token
  87. optional: false
  88. - name: DIUN_NOTIF_NTFY_TOPIC
  89. value: "diun"
  90. volumeMounts:
  91. - mountPath: "/data"
  92. name: "data"
  93. restartPolicy: Always
  94. volumes:
  95. - name: data
  96. persistentVolumeClaim:
  97. claimName: diun-pvc