From 8f9ef82fc9c3ad24a54ada9a3ed9639875b14665 Mon Sep 17 00:00:00 2001 From: Plux Stahre Date: Sun, 29 Sep 2024 03:39:22 +0200 Subject: [PATCH] Update k8s-cronjob.md Fix formatting of yaml example. --- examples/k8s-cronjob.md | 78 ++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 44 deletions(-) diff --git a/examples/k8s-cronjob.md b/examples/k8s-cronjob.md index f42dc14..1c4c739 100644 --- a/examples/k8s-cronjob.md +++ b/examples/k8s-cronjob.md @@ -20,52 +20,42 @@ kind: CronJob metadata: name: fedifetcher spec: - schedule: "*/15 * * * *" - failedJobsHistoryLimit: 5 - successfulJobsHistoryLimit: 5 - concurrencyPolicy: Forbid + schedule: "*/15 * * * *" # Run every 15 minutes + failedJobsHistoryLimit: 5 # Keep history of failed jobs + successfulJobsHistoryLimit: 5 # Keep history of successful jobs + concurrencyPolicy: Forbid # Do not allow concurrent jobs jobTemplate: spec: - template: - spec: - restartPolicy: Never - containers: - - name: fedifetcher - image: ghcr.io/nanos/fedifetcher:latest - imagePullPolicy: IfNotPresent - env: - - name: FF_HOME_TIMELINE_LENGTH - value: "200" - - name: FF_MAX_FOLLOWERS - value: "10" - - # Add any other options below as described in in the README.md file - - # If you don't want to use a PVC you may comment the next two lines, but that will significantly - # affect performance, and is NOT recommended - - name: FF_STATE_DIR - value: "/data/" - - name: FF_SERVER - valueFrom: - secretKeyRef: - name: fedifetcher - key: server_domain - optional: false - - name: FF_ACCESS_TOKEN - valueFrom: - secretKeyRef: - name: fedifetcher - key: token - optional: false - # Comment the lines below if you do not use a PVC, but that will significantly - # affect performance and is NOT recommended - volumeMounts: - - mountPath: /data + template: + spec: + restartPolicy: Never + containers: + - name: fedifetcher + image: ghcr.io/nanos/fedifetcher:latest + imagePullPolicy: IfNotPresent + env: + - name: FF_HOME_TIMELINE_LENGTH + value: "200" + - name: FF_MAX_FOLLOWERS + value: "10" + - name: FF_STATE_DIR + value: "/data/" + - name: FF_SERVER + valueFrom: + secretKeyRef: name: fedifetcher - readOnly: false - volumes: - - name: fedifetcher - persistentVolumeClaim: - claimName: fedifetcher + key: server_domain + - name: FF_ACCESS_TOKEN + valueFrom: + secretKeyRef: + name: fedifetcher + key: token + volumeMounts: + - name: fedifetcher-storage + mountPath: /data + volumes: + - name: fedifetcher-storage + persistentVolumeClaim: + claimName: fedifetcher-pvc ```