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

Support metadata annotations in ScaledJob template's volume claims #6254

Open
dpertin opened this issue Oct 21, 2024 · 2 comments · May be fixed by #6259
Open

Support metadata annotations in ScaledJob template's volume claims #6254

dpertin opened this issue Oct 21, 2024 · 2 comments · May be fixed by #6259
Labels
bug Something isn't working

Comments

@dpertin
Copy link

dpertin commented Oct 21, 2024

Report

Applying metadata annotations on a volume claim template, inside ScaledJob templates returns an error.
Here's the definition of the metadata annotations:

apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
  labels:
    argocd.argoproj.io/instance: xxx
  name: yyy
  namespace: zzz
spec:
(...)
        volumes:
(...)
          - ephemeral:
              volumeClaimTemplate:
                metadata:
                  annotations:
                    resize.topolvm.io/increase: 15Gi
                    resize.topolvm.io/inodes-threshold: 20%
                    resize.topolvm.io/storage_limit: 1024Gi
                    resize.topolvm.io/threshold: 30%
                    volume-type: ephemeral

Expected Behavior

This should create a volume claim with the appropriate metadata annotations

Actual Behavior

It returns the following error: ScaledJob in version "v1alpha1" cannot be handled as a ScaledJob: strict decoding error: unknown field "spec.jobTargetRef.template.spec.volumes[5].ephemeral.volumeClaimTemplate.metadata.annotations"

Steps to Reproduce the Problem

  1. Create a ScaledJobs based on the definition given above
  2. Run kubectl apply -f using this definition
  3. This returns the error

KEDA Version

2.15.1

Kubernetes Version

1.30

Platform

Google Cloud

Scaler Details

No response

Anything else?

No response

@dpertin dpertin added the bug Something isn't working label Oct 21, 2024
@JorTurFer
Copy link
Member

Interesting, could this be related with this other issue that we solved some years ago? #1311

If yes, are you willing to apply the same patch to the new path to keep the current annotations :)

@dpertin
Copy link
Author

dpertin commented Oct 22, 2024

Hey @JorTurFer,
Thanks for pointing me this related error. I applied a patch based on the fix in this issue and it solves the problem
I have proposed a PR based on this solution #6259

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

Successfully merging a pull request may close this issue.

2 participants