kube.py support kubeconfig (#9982)
parent
6682a843b4
commit
73ce6aef97
|
@ -46,6 +46,11 @@ options:
|
||||||
default: null
|
default: null
|
||||||
description:
|
description:
|
||||||
- The url for the API server that commands are executed against.
|
- The url for the API server that commands are executed against.
|
||||||
|
kubeconfig:
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
description:
|
||||||
|
- The path to the kubeconfig.
|
||||||
force:
|
force:
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
@ -126,6 +131,9 @@ class KubeManager(object):
|
||||||
if module.params.get('server'):
|
if module.params.get('server'):
|
||||||
self.base_cmd.append('--server=' + module.params.get('server'))
|
self.base_cmd.append('--server=' + module.params.get('server'))
|
||||||
|
|
||||||
|
if module.params.get('kubeconfig'):
|
||||||
|
self.base_cmd.append('--kubeconfig=' + module.params.get('kubeconfig'))
|
||||||
|
|
||||||
if module.params.get('log_level'):
|
if module.params.get('log_level'):
|
||||||
self.base_cmd.append('--v=' + str(module.params.get('log_level')))
|
self.base_cmd.append('--v=' + str(module.params.get('log_level')))
|
||||||
|
|
||||||
|
@ -309,6 +317,7 @@ def main():
|
||||||
resource=dict(),
|
resource=dict(),
|
||||||
label=dict(),
|
label=dict(),
|
||||||
server=dict(),
|
server=dict(),
|
||||||
|
kubeconfig=dict(),
|
||||||
kubectl=dict(),
|
kubectl=dict(),
|
||||||
force=dict(default=False, type='bool'),
|
force=dict(default=False, type='bool'),
|
||||||
wait=dict(default=False, type='bool'),
|
wait=dict(default=False, type='bool'),
|
||||||
|
|
Loading…
Reference in New Issue