Skip to content

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

Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
jstrachan:496
May 26, 2018
Merged

fix: allow an environment variable to default the deploy namespace#497
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
jstrachan:496

Conversation

@jstrachan
Copy link
Copy Markdown
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

if r.Namespace != "" {
args = append(args, "--namespace", r.Namespace)
ns := r.Namespace
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

allow the helm deploy to default the namespace value from an environment variable if there is no value in the YAML

2 participants