nextcloud-mail-sync: manage CronJob via Flux
This commit is contained in:
parent
b06dcb2263
commit
a76d944433
69
services/nextcloud-mail-sync/cronjob.yaml
Normal file
69
services/nextcloud-mail-sync/cronjob.yaml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
# services/nextcloud-mail-sync/cronjob.yaml
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-mail-sync
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
schedule: "0 5 * * *"
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
successfulJobsHistoryLimit: 3
|
||||||
|
failedJobsHistoryLimit: 1
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
containers:
|
||||||
|
- name: mail-sync
|
||||||
|
image: nextcloud:29-apache
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- /sync/sync.sh
|
||||||
|
env:
|
||||||
|
- name: KC_BASE
|
||||||
|
value: https://sso.bstein.dev
|
||||||
|
- name: KC_REALM
|
||||||
|
value: atlas
|
||||||
|
- name: KC_ADMIN_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: nextcloud-keycloak-admin
|
||||||
|
key: username
|
||||||
|
- name: KC_ADMIN_PASS
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: nextcloud-keycloak-admin
|
||||||
|
key: password
|
||||||
|
- name: MAILU_DOMAIN
|
||||||
|
value: bstein.dev
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: nextcloud-app
|
||||||
|
mountPath: /var/www/html
|
||||||
|
- name: nextcloud-user-data
|
||||||
|
mountPath: /data/userdata
|
||||||
|
- name: sync-script
|
||||||
|
mountPath: /sync/sync.sh
|
||||||
|
subPath: sync.sh
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-app
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nextcloud-app
|
||||||
|
- name: nextcloud-user-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nextcloud-user-data
|
||||||
|
- name: sync-script
|
||||||
|
configMap:
|
||||||
|
name: nextcloud-mail-sync-script
|
||||||
|
defaultMode: 0755
|
||||||
@ -2,6 +2,8 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: nextcloud
|
namespace: nextcloud
|
||||||
|
resources:
|
||||||
|
- cronjob.yaml
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: nextcloud-mail-sync-script
|
- name: nextcloud-mail-sync-script
|
||||||
files:
|
files:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user