Merge pull request #180 from itspluxstahre/fix_k8s_example

Fix k8s example
This commit is contained in:
Michael 2024-10-08 16:02:48 +01:00 committed by GitHub
commit 0dfac703f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,6 +12,21 @@ kubectl create secret generic fedifetcher \
--from-literal=token="<token>" --from-literal=token="<token>"
``` ```
Define a PVC, for example:
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fedifetcher-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```
Now define the cronjob, and don't forget to define your PVCs: Now define the cronjob, and don't forget to define your PVCs:
```yaml ```yaml
@ -20,10 +35,10 @@ kind: CronJob
metadata: metadata:
name: fedifetcher name: fedifetcher
spec: spec:
schedule: "*/15 * * * *" schedule: "*/15 * * * *" # Run every 15 minutes
failedJobsHistoryLimit: 5 failedJobsHistoryLimit: 5 # Keep history of failed jobs
successfulJobsHistoryLimit: 5 successfulJobsHistoryLimit: 5 # Keep history of successful jobs
concurrencyPolicy: Forbid concurrencyPolicy: Forbid # Do not allow concurrent jobs
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -38,7 +53,6 @@ spec:
value: "200" value: "200"
- name: FF_MAX_FOLLOWERS - name: FF_MAX_FOLLOWERS
value: "10" value: "10"
# Add any other options below as described in in the README.md file # 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 # If you don't want to use a PVC you may comment the next two lines, but that will significantly
@ -50,7 +64,6 @@ spec:
secretKeyRef: secretKeyRef:
name: fedifetcher name: fedifetcher
key: server_domain key: server_domain
optional: false
- name: FF_ACCESS_TOKEN - name: FF_ACCESS_TOKEN
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -60,12 +73,12 @@ spec:
# Comment the lines below if you do not use a PVC, but that will significantly # Comment the lines below if you do not use a PVC, but that will significantly
# affect performance and is NOT recommended # affect performance and is NOT recommended
volumeMounts: volumeMounts:
- mountPath: /data - name: fedifetcher-storage
name: fedifetcher mountPath: /data
readOnly: false readOnly: false
volumes: volumes:
- name: fedifetcher - name: fedifetcher-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: fedifetcher claimName: fedifetcher-pvc
``` ```