Description
The label of the pre-backup pod is too long. I have no clever way how to solve this but this should definitely not happen.
apiVersion: k8up.io/v1
kind: Schedule
metadata:
name: backup-schedule-schoolguy-photoprism
namespace: photoprism
spec:
podSecurityContext:
runAsUser: 0
backend:
rest:
url: "http://<IP>:8000/<repository_name>"
repoPasswordSecretRef:
name: backup-repo
key: password
backup:
schedule: '0 3 * * *'
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 2
promURL: http://prometheus-pushgateway.monitoring.svc.cluster.local:9091
check:
schedule: '0 5 * * 6'
promURL: http://prometheus-pushgateway.monitoring.svc.cluster.local:9091
prune:
schedule: '0 0 1 * *'
retention:
keepLast: 5
keepDaily: 14
Additional Context
No response
Logs
2023-05-25T19:35:44Z ERROR k8up.operator Reconciler error {"controller": "backup.k8up.io", "controllerGroup": "k8up.io", "controllerKind": "Backup", "Backup": {"name":"backup-schedule-schoolguy-photoprism-backup-j7s5z","namespace":"photoprism"}, "namespace": "photoprism", "name": "backup-schedule-schoolguy-photoprism-backup-j7s5z", "reconcileID": "313f0f45-4162-4af3-a009-584173651199", "error": "unable to createOrUpdate(\"backup-backup-schedule-schoolguy-photoprism-backup-j7s5z-prebackup\"): Job.batch \"backup-backup-schedule-schoolguy-photoprism-backup-j7s5z-prebackup\" is invalid: spec.template.labels: Invalid value: \"backup-backup-schedule-schoolguy-photoprism-backup-j7s5z-prebackup\": must be no more than 63 characters"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:326
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:234
Expected Behavior
Pre-Backup Pods spawn as expected.
Steps To Reproduce
- Use schedule from above
- Wait for error to appear in log
Version of K8up
2.7.1 (app) / 4.2.2 (helmchart)
Version of Kubernetes
v1.26.4+k3s1
Distribution of Kubernetes
k3s
Description
The label of the pre-backup pod is too long. I have no clever way how to solve this but this should definitely not happen.
Additional Context
No response
Logs
2023-05-25T19:35:44Z ERROR k8up.operator Reconciler error {"controller": "backup.k8up.io", "controllerGroup": "k8up.io", "controllerKind": "Backup", "Backup": {"name":"backup-schedule-schoolguy-photoprism-backup-j7s5z","namespace":"photoprism"}, "namespace": "photoprism", "name": "backup-schedule-schoolguy-photoprism-backup-j7s5z", "reconcileID": "313f0f45-4162-4af3-a009-584173651199", "error": "unable to createOrUpdate(\"backup-backup-schedule-schoolguy-photoprism-backup-j7s5z-prebackup\"): Job.batch \"backup-backup-schedule-schoolguy-photoprism-backup-j7s5z-prebackup\" is invalid: spec.template.labels: Invalid value: \"backup-backup-schedule-schoolguy-photoprism-backup-j7s5z-prebackup\": must be no more than 63 characters"} sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler /home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:326 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem /home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:273 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2 /home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:234Expected Behavior
Pre-Backup Pods spawn as expected.
Steps To Reproduce
Version of K8up
2.7.1 (app) / 4.2.2 (helmchart)
Version of Kubernetes
v1.26.4+k3s1
Distribution of Kubernetes
k3s