Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-Backup pod labels are too long #862

Open
SchoolGuy opened this issue May 25, 2023 · 3 comments
Open

Pre-Backup pod labels are too long #862

SchoolGuy opened this issue May 25, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@SchoolGuy
Copy link
Contributor

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

  1. Use schedule from above
  2. 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

@SchoolGuy SchoolGuy added the bug Something isn't working label May 25, 2023
@SchoolGuy
Copy link
Contributor Author

I am deeply sorry that I report so many issues in recent days. I really love the software you build and I will continue to pay the early adopter tax. Before and including 2.7.0 everything was very easy and rock solid for me!

@Kidswiss
Copy link
Contributor

Kidswiss commented May 26, 2023

@SchoolGuy

I appreciate you reportiing bugs, so we're aware of them and can fix them. :)

As a workaround here I'd suggest to shorten the name of your backup schedule.

@SchoolGuy
Copy link
Contributor Author

@Kidswiss Ack. Thanks for the tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants