-
Notifications
You must be signed in to change notification settings - Fork 228
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
Cannot render kpt package with batch/v1 Jobs using metadata.generateName
#3573
Comments
Possibly related, but not too sure. It's just the only other mention of |
Thank you reporting this @zevisert This is indeed a very interesting edge case that's breaking the assumption that all resources will have Treating /cc @yuwenma This is interesting case, any ideas to support such resources ? |
Hi @zevisert. Thank you for filing the issue. Not supporting Kpt is designed to be declarative, KRM resource centric and shifting the reliable KRM resource editing on the client side, it even keeps track of the KRM resource's upstream Group, Version, Namespace and Name in the |
Before closing this, can we spend a little more time and help @zevisert understand how they might solve the issue using the
There may be other solutions, depending on the details. When you say "run once immediately after deployment", can you clarify the deployment of what exactly? |
+1 to the |
Thanks for the discussion everyone, and thanks for reopening to help us solve this! I totally understand how
I mean package deployment, a-la We picked
|
I would generate the name client side then, with a function. |
Could do that pretty easily, sure. Checking my understanding, we're fine to do that inventory-wise right? The previously generated job name would get pruned from the inventory and deleted from the cluster if it's still there, and the new name gets saved in the inventory, right. That would seem pretty good to me. Edit; yeah of course, that's how kpt works :) |
Thanks @johnbelamaric, I got caught up thinking about init-containers with that writeup, generating a name client side should work just fine. |
Expected behavior
I can
kpt fn render
a package containing a Job that usesmetadata.generateName
instead ofmetadata.name
using curated functions from catalog.kpt.dev.Actual behavior
Information
I have a job that performs some migrations tasks that is to be run once immediately after deployment. Since deployments may occur one-after-another in quick succession, setting
spec.ttlSecondsAfterFinished
is insufficient, since the spec of the job being deployed gets changed with each deployment, leading toSteps to reproduce the behavior
kpt fn render .
The text was updated successfully, but these errors were encountered: