Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

helm_: Add context aliases for kube_context #152

Merged
merged 1 commit into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/helm_context_aliases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- helm - add aliases context for kube_context.
- helm_info - add aliases context for kube_context.
3 changes: 2 additions & 1 deletion plugins/modules/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
- Helm option to specify which kubeconfig context to use.
- If the value is not specified in the task, the value of environment variable C(K8S_AUTH_CONTEXT) will be used instead.
type: str
aliases: [ context ]
kubeconfig_path:
description:
- Helm option to specify kubeconfig path to use.
Expand Down Expand Up @@ -397,7 +398,7 @@ def main():
# Helm options
disable_hook=dict(type='bool', default=False),
force=dict(type='bool', default=False),
kube_context=dict(type='str', fallback=(env_fallback, ['K8S_AUTH_CONTEXT'])),
kube_context=dict(type='str', aliases=['context'], fallback=(env_fallback, ['K8S_AUTH_CONTEXT'])),
kubeconfig_path=dict(type='path', aliases=['kubeconfig'], fallback=(env_fallback, ['K8S_AUTH_KUBECONFIG'])),
purge=dict(type='bool', default=True),
wait=dict(type='bool', default=False),
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/helm_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
- Helm option to specify which kubeconfig context to use.
- If the value is not specified in the task, the value of environment variable C(K8S_AUTH_CONTEXT) will be used instead.
type: str
aliases: [ context ]
kubeconfig_path:
description:
- Helm option to specify kubeconfig path to use.
Expand Down Expand Up @@ -179,7 +180,7 @@ def main():
release_namespace=dict(type='str', required=True, aliases=['namespace']),

# Helm options
kube_context=dict(type='str', fallback=(env_fallback, ['K8S_AUTH_CONTEXT'])),
kube_context=dict(type='str', aliases=['context'], fallback=(env_fallback, ['K8S_AUTH_CONTEXT'])),
kubeconfig_path=dict(type='path', aliases=['kubeconfig'], fallback=(env_fallback, ['K8S_AUTH_KUBECONFIG'])),
),
supports_check_mode=True,
Expand Down