-
Notifications
You must be signed in to change notification settings - Fork 109
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
Provide support for resources with generateName #76
Comments
Argo is another tool that makes frequent use of When I was testing it's hello-world example, I would get the following output when doing a redeploy with kapp
I managed to suppress the waiting-reconciliation with the following annotation
This caused a new Workflow object to be created...which I guess was the goal?...but I'm not entirely sure if that's what I wanted to do or not. |
I just encountered this as while using an idempotent K8s job with I can think of two potential approaches to solving this problem for K8s jobs
|
Hey folks - following up here after a few years - is this something that we can still fix? |
Hi @dprotaso! It seems like a reasonable ask to me, and I think the first option that you suggested (kapp generates the name based on generateName) makes sense as we already have versioned resources that does something similar. I will mark this as accepted but not sure when we will be able to get to it. We can definitely prioritise a review if you (or someone else) would like to contribute a PR. |
Sometimes there's some tools that take advantage of resources defined with
genereteName
instead ofname
in the resource definition, mostly so that a new instance is created every time the resource is applied/created to the cluster.kubectl does require you to use create instead of apply for this type of resources as otherwise it will give an error.
In my use case, I'm deploying programmatically a Tekton PipelineRun, and my expected behavior is that everytime that I use
kapp deploy
a new instance is created but the previous are kept under kapp control.After discussing with @cppforlife in the K8s slack, he gave me a workaround which works (after applying a manual fix to remove line https://github.com/k14s/kapp/blob/4db982f52b04bebf30d366f3d9d3f914ef383516/pkg/kapp/diff/template_resource.go#L154 in a local fork). The workaround is to:
With this, what you get is the same behavior as when using generateName but requires you to make a change in your resource definition and also makes the generatedName kapp specific.
Although not ideal, it works ok for many (including me).
This issue is to consider whether adding support out of the box to resources defined with generateName make sense and what would be the best implementation.
The text was updated successfully, but these errors were encountered: