diff --git a/changelogs/fragments/helm_context_aliases.yml b/changelogs/fragments/helm_context_aliases.yml new file mode 100644 index 00000000..02a0e909 --- /dev/null +++ b/changelogs/fragments/helm_context_aliases.yml @@ -0,0 +1,3 @@ +minor_changes: +- helm - add aliases context for kube_context. +- helm_info - add aliases context for kube_context. diff --git a/plugins/modules/helm.py b/plugins/modules/helm.py index 9ca1beed..edd87c82 100644 --- a/plugins/modules/helm.py +++ b/plugins/modules/helm.py @@ -100,6 +100,7 @@ options: - 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. @@ -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), diff --git a/plugins/modules/helm_info.py b/plugins/modules/helm_info.py index 1e514138..31c6fab9 100644 --- a/plugins/modules/helm_info.py +++ b/plugins/modules/helm_info.py @@ -50,6 +50,7 @@ options: - 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. @@ -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,