kedacore / keda

KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes
https://keda.sh
Apache License 2.0
8.01k stars 1.01k forks source link

Pass Metadata from ScaledJob Template to ChildJob Template Metadata #5908

Open SpiritZhou opened 4 days ago

SpiritZhou commented 4 days ago

Proposal

We encountered a situation where we set up annotations in the template metadata of ScaledJob, but the pod generated by ScaledJob had empty metadata. The annotation that pod needed was not passed through.

I suggest adding the // +kubebuilder:pruning:PreserveUnknownFields flag in JobTargetRef so that the scaledjob crd will keep properties to ensure that the metadata is passed through.

Use-Case

No response

Is this a feature you are interested in implementing yourself?

Yes

Anything else?

No response

zroubalik commented 3 days ago

Makes sense, good catch!