Skip to content

Remove all known arguments in plugin invocations - #6657

Merged
thomastaylor312 merged 1 commit into
helm:dev-v3from
jonasrutishauser:fix/special-plugin-args
Oct 14, 2019
Merged

thomastaylor312 merged 1 commit into
helm:dev-v3from
jonasrutishauser:fix/special-plugin-args

Conversation

@jonasrutishauser

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Consistenly removes all arguments in plugin invocations which are passed as environment variables:

  • --context is renamed to --kube-context
  • added missing known arguments including short option of --namespace

Additional fix: Get all arguments from environment variables passed to plugins:

  • HELM_KUBECONTEXT was the only environment variable not processed

@helm-bot helm-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 12, 2019
Consistenly remove all arguments which are passed as environment
variables.

Get all arguments from environment variables passed to plugins.

Signed-off-by: Jonas Rutishauser <[email protected]>
@bacongobbler bacongobbler added the v3.x Issues and Pull Requests related to the major version v3 label Oct 12, 2019
@thomastaylor312

Copy link
Copy Markdown
Contributor

@jonasrutishauser Just wanted to clarify after reading the thread in databus23/helm-diff#151. The idea here is to only pass arguments via environment variables for known flags, correct?

@jonasrutishauser

Copy link
Copy Markdown
Contributor Author

Exactly.

This way all known flags are parsed by helm and passed to plugins via environment variables.
If a plugin later calls helm again, the configuration will be picked from the environment variables passed previously to the plugin.
If a plugin needs one of this values it can read it from the environment.

This way theses flags will always have the meaning defined by helm and can't accidentally be overridden by a plugin.

@thomastaylor312
thomastaylor312 merged commit 81b92e8 into helm:dev-v3 Oct 14, 2019
@jonasrutishauser
jonasrutishauser deleted the fix/special-plugin-args branch October 14, 2019 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor size/S Denotes a PR that changes 10-29 lines, ignoring generated files. v3.x Issues and Pull Requests related to the major version v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants