dafaf93d50
Fixes validation errors upon applying the k8s manifest: ``` The CronJob "FediFetcher" is invalid: * metadata.name: Invalid value: "FediFetcher": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') * spec.jobTemplate.spec.template.spec.containers[0].name: Invalid value: "FediFetcher": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?') ```
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: fedifetcher-pvc
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
volumeMode: Filesystem
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
---
|
|
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: fedifetcher
|
|
spec:
|
|
# Run every 2 hours
|
|
schedule: "0 */2 * * *"
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 1
|
|
concurrencyPolicy: Forbid
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
volumes:
|
|
- name: artifacts
|
|
persistentVolumeClaim:
|
|
claimName: fedifetcher-pvc
|
|
containers:
|
|
- name: fedifetcher
|
|
image: ghcr.io/nanos/fedifetcher:latest
|
|
args:
|
|
- --server=your.server.social
|
|
- --access-token=TOKEN
|
|
- --home-timeline-length
|
|
- "200"
|
|
- --max-followings
|
|
- "80"
|
|
- --from-notification
|
|
- "4"
|
|
volumeMounts:
|
|
- name: artifacts
|
|
mountPath: /app/artifacts
|
|
restartPolicy: Never
|