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

fix: allow an environment variable to default the deploy namespace #497

Merged
merged 1 commit into from
May 26, 2018

Conversation

jstrachan
Copy link
Contributor

lets allow an environment variable to be used to define the helm deploy namespace
fixes #496

lets allow an environment variable to be used to define the helm deploy namespace
fixes GoogleContainerTools#496
@@ -106,8 +107,12 @@ func (h *HelmDeployer) deployRelease(out io.Writer, r v1alpha2.HelmRelease, b *b
args = append(args, "upgrade", r.Name, r.ChartPath)
}

if r.Namespace != "" {
args = append(args, "--namespace", r.Namespace)
ns := r.Namespace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to map the cli arguments to env variables? I think there is. It would be much better to handle that once for all when CLI arguments are parsed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point yeah; in this case we're merging default values from the CLI / env var overriding any missing values in the skaffold.yaml

@dgageot
Copy link
Contributor

dgageot commented May 26, 2018

Let's merge this one and try to improve it in the future.

@dgageot dgageot merged commit bed41e9 into GoogleContainerTools:master May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants