skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Helm flags not working via skaffold

Open yurchenkosv opened this issue 3 years ago • 5 comments

Expected behavior

skaffold execute helm upgrade with flags

Actual behavior

Error: unknown flag: --history-max 3 deploying "release_name": install: exit status 1

Information

  • Skaffold version: v1.35.2
  • Operating system: MacOS 11.6.2
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
Cannot share 

Steps to reproduce the behavior

Add flags to upgrade stage of helm

        flags:
          upgrade:
            - '--history-max 3'

execute skaffold deploy --build-artifacts images.json

Logs

Running command: [helm --kube-context minikube upgrade release_name --history-max 3 /Users/<username>/Desktop/projects/<project_name>/build/helm/<chart_name> --set-string image.repository=repo,image.tag=119914028473db0e6c82c0862a399477b9bfb6a9b767b256b28bccffd5d48a22 -f /Users/<username>/Desktop/projects/<project_name>/build/helm/<chart_name>/values.local.yaml -f /Users/<username>/Desktop/projects/<project_name>/build/helm/<chart_name>/values.pwd.local.yaml]  subtask=0 task=Deploy
Error: unknown flag: --history-max 3

Additional info

Executing Helm command via console - got no errors. Please, help to understand skaffold behavior and fix this case )

yurchenkosv avatar Jan 24 '22 14:01 yurchenkosv

I found out that a space in the flag leads to an error. With the following I got no errors and all works as expected

        flags:
          upgrade:
            - '--history-max=3'

I think, this could be added to documentation?

yurchenkosv avatar Jan 24 '22 14:01 yurchenkosv

Thanks @yurchenkosv for finding this out. We will update the docs to reflect this.

tejal29 avatar Jan 25 '22 12:01 tejal29

Hi Folks, I'll work on this and submit a PR later.

JohnnyD45 avatar Mar 14 '22 22:03 JohnnyD45

Hi Folks, I'll work on this and submit a PR later.

Hey JohnnyD45, seems there's quite a long time, how about I work on this and submit a PR later.

ghost avatar Jul 21 '22 07:07 ghost

Sure @nayang7 , please go ahead. And apologies folks for not following up on this task.

JohnnyD45 avatar Jul 21 '22 10:07 JohnnyD45

Closing, the flag pattern used is common across many k8s/yaml specs. Re-open if perhaps this warrants more inspection

aaron-prindle avatar Jan 27 '23 20:01 aaron-prindle