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

Pass Metadata from ScaledJob Template to ChildJob Template Metadata #5908

Open
SpiritZhou opened this issue Jun 25, 2024 · 3 comments
Open
Assignees
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@SpiritZhou
Copy link
Contributor

SpiritZhou commented Jun 25, 2024

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

@SpiritZhou SpiritZhou added needs-discussion feature-request All issues for new features that have not been committed to labels Jun 25, 2024
@zroubalik
Copy link
Member

Makes sense, good catch!

@tomkerkhove
Copy link
Member

@SpiritZhou Can you work on this when you have some time?

@SpiritZhou
Copy link
Contributor Author

Yes. I am working on this. I found another option: add crd:generateEmbeddedObjectMeta=true in Makefile to generate Metadata properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion
Projects
None yet
Development

No branches or pull requests

3 participants