mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
helm: Add support for K8S_AUTH_CONTEXT, K8S_AUTH_KUBECONFIG env (#141)
Added support for K8S_AUTH_CONTEXT, K8S_AUTH_KUBECONFIG env
This commit is contained in:
@@ -98,10 +98,12 @@ options:
|
||||
kube_context:
|
||||
description:
|
||||
- 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
|
||||
kubeconfig_path:
|
||||
description:
|
||||
- Helm option to specify kubeconfig path to use.
|
||||
- If the value is not specified in the task, the value of environment variable C(K8S_AUTH_KUBECONFIG) will be used instead.
|
||||
type: path
|
||||
aliases: [ kubeconfig ]
|
||||
purge:
|
||||
@@ -245,7 +247,7 @@ except ImportError:
|
||||
IMP_YAML_ERR = traceback.format_exc()
|
||||
IMP_YAML = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib, env_fallback
|
||||
|
||||
module = None
|
||||
|
||||
@@ -395,8 +397,8 @@ def main():
|
||||
# Helm options
|
||||
disable_hook=dict(type='bool', default=False),
|
||||
force=dict(type='bool', default=False),
|
||||
kube_context=dict(type='str'),
|
||||
kubeconfig_path=dict(type='path', aliases=['kubeconfig']),
|
||||
kube_context=dict(type='str', 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),
|
||||
wait_timeout=dict(type='str'),
|
||||
|
||||
Reference in New Issue
Block a user