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

Add optional 'render' stage #4356

Closed
k opened this issue Jun 19, 2020 · 8 comments
Closed

Add optional 'render' stage #4356

k opened this issue Jun 19, 2020 · 8 comments

Comments

@k
Copy link

k commented Jun 19, 2020

This is a feature request. I like the skaffold render command, but currently I am using it in a script to pipe helm output to a file and then apply a subset of the rendered manifests with kubectl based on the images that were built.

What would be better is if I could add a render step using helm to output the manifests natively in skaffold, then use the kubectl deployer with my custom flags that I use for various profiles to deploy. This should allow me to utilize more of the feature set of skaffold like testing and tailing logs.

Anyone else have this use case? For context I use ArgoCD for deployment which uses helm template under the hood. Unfortunately its not great for local development. This is where skaffold could fill that need but currently its hard to make use of with helm without buying in to the whole helm deployment paradigm.

@tejal29
Copy link
Contributor

tejal29 commented Jun 19, 2020

@k i am not sure i understand what you mean by "render manifests natively in skaffold".

skaffold render uses the helm template command to render manifests.

func (h *HelmDeployer) Render(ctx context.Context, out io.Writer, builds []build.Artifact, labellers []Labeller, offline bool, filepath string) error {

Do you mean, skaffold should first only render using helm template and then deploy using kubectl deployer?

The team is looking into pre and post deploy hooks. This is something you could do as part of post render/deploy hook.

@k
Copy link
Author

k commented Jun 19, 2020

Do you mean, skaffold should first only render using helm template and then deploy using kubectl deployer?

Yes thats exactly what I mean. We don't use helm to deploy so the helm deployer tries to do a helm install which fails because the manifests already exist in the cluster @tejal29

@k
Copy link
Author

k commented Jun 19, 2020

@tejal29 Will pre and post deploy hooks support helm/kustomize?

@tejal29 tejal29 added triage/discuss Items for discussion and removed triage/discuss Items for discussion labels Jun 22, 2020
@tejal29
Copy link
Contributor

tejal29 commented Jun 22, 2020

@k, to understand you use case better, can you please share some part of your helm charts or skaffold logs -v=debug.

As far as we think,helm template > manifests.yaml | helm install should suffice. We would love to hear specific cases where it does not.

@GavinOsborn
Copy link

It sounds like @k and I have similar setups.
We use something that looks like helm template | kubectl apply -f - in our deployment pipelines to avoid installing tiller in our cluster. A bit of light Googling suggests this pattern isn't that uncommon either.

It would be nice if we could support this workflow with skaffold also for local development to catch edge cases that differ between the helm deployer and kubectl.

Last week we ran into an issue where our service deployed fine locally with skaffold but crashed and burned in our pipelines due to a difference between how the two systems handle casing (loadBalancerIP vs loadBalancerIp).

In truth it doesn't burn us that often but it would be cool with Skaffold supported this workflow out of the box.

(I'm aware that Helm 3 removes tiller, but #3798 prevents us from moving any time soon)

@briandealwis
Copy link
Member

As you're aware, @GavinOsborn, #3798 has been fixed by #4513 and should be in the next release (RSN).

We'd definitely appreciate some more details about @k's situation though.

@nkubala nkubala added this to the Backlog milestone Sep 1, 2020
@nkubala nkubala removed this from the Backlog [P0/P1] milestone May 11, 2021
@tejal29
Copy link
Contributor

tejal29 commented Oct 13, 2021

This should be closed by #5673

@tejal29
Copy link
Contributor

tejal29 commented Oct 13, 2021

duplicate of #5673

@tejal29 tejal29 closed this as completed Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants