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

RestoreSpec.podConfigRef doesn't seem to work #1019

Open
deitmerit opened this issue Oct 22, 2024 · 0 comments
Open

RestoreSpec.podConfigRef doesn't seem to work #1019

deitmerit opened this issue Oct 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@deitmerit
Copy link

Description

I would like to use RestoreSpec.podConfigRef (to set podAffinity rules, which I need to be able to restore a backup to a ReadWriteOnce PV). However, they don't seem to work.

This is how I set up my Restore and PodConfig resources:

apiVersion: k8up.io/v1
kind: PodConfig
metadata:
  name: restore-podconfig
spec:
  template:
    spec:
      containers: [ ]
      affinity:
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - topologyKey: kubernetes.io/hostname
              labelSelector:
                matchExpressions:
                  - key: app.kubernetes.io/name
                    operator: In
                    values:
                      - foo
---
apiVersion: k8up.io/v1
kind: Restore
metadata:
  name: restore
spec:
  podConfigRef:
    name: restore-podconfig
  restoreMethod:
    folder:
      claimName: pvc-foo
  backend:
    s3: [...]
    repoPasswordSecretRef:
      name: backup-encryption
      key: password

The generated restore pod has no affinity set at all.

BTW, for backups I do the same, and it works.

Additional Context

No response

Logs

No response

Expected Behavior

I expect the generated restore pods to have the affinity set as specified in the PodConfig resource.

Steps To Reproduce

No response

Version of K8up

v4.8.1

Version of Kubernetes

v1.31.1

Distribution of Kubernetes

Talos 1.8

@deitmerit deitmerit added the bug Something isn't working label Oct 22, 2024
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

1 participant