c4k-website/src/main/resources/website/build-cron.yaml

52 lines
1.5 KiB
YAML
Raw Normal View History

2022-11-23 10:14:46 +00:00
apiVersion: batch/v1
kind: CronJob
metadata:
2024-02-27 10:32:32 +01:00
name: build-cron
namespace: NAME
labels:
app.kubernetes.part-of: NAME-website
spec:
2024-05-07 10:16:41 +02:00
schedule: "0/7 * * * *"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
2024-05-07 10:16:41 +02:00
activeDeadlineSeconds: 415
template:
2024-02-27 10:32:32 +01:00
metadata:
namespace: NAME
labels:
app: build-cron
app.kubernetes.part-of: NAME-website
spec:
containers:
- image: domaindrivenarchitecture/c4k-website-build:2.0.6
2024-02-27 10:32:32 +01:00
name: build-cron-container
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: BUILD_CPU_REQUEST
memory: BUILD_MEMORY_REQUEST
limits:
cpu: BUILD_CPU_LIMIT
memory: BUILD_MEMORY_LIMIT
command: ["/entrypoint.sh"]
envFrom:
- configMapRef:
name: build-configmap
- secretRef:
2024-02-27 10:42:36 +01:00
name: build-secret
volumeMounts:
- name: content-volume
mountPath: /var/www/html/website
2024-02-27 10:32:32 +01:00
- name: hash-state-volume
2022-12-02 11:56:21 +01:00
mountPath: /var/hashfile.d
volumes:
- name: content-volume
persistentVolumeClaim:
2024-02-27 10:32:32 +01:00
claimName: content-volume
- name: hash-state-volume
2022-12-02 12:18:08 +01:00
persistentVolumeClaim:
2024-02-27 10:32:32 +01:00
claimName: hash-state-volume
restartPolicy: OnFailure