Skip to content

Commit

Permalink
kube.py support kubeconfig (#9982)
Browse files Browse the repository at this point in the history
  • Loading branch information
liupeng0518 authored Apr 14, 2023
1 parent 6682a84 commit 73ce6ae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/modules/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
default: null
description:
- The url for the API server that commands are executed against.
kubeconfig:
required: false
default: null
description:
- The path to the kubeconfig.
force:
required: false
default: false
Expand Down Expand Up @@ -126,6 +131,9 @@ def __init__(self, module):
if 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'):
self.base_cmd.append('--v=' + str(module.params.get('log_level')))

Expand Down Expand Up @@ -309,6 +317,7 @@ def main():
resource=dict(),
label=dict(),
server=dict(),
kubeconfig=dict(),
kubectl=dict(),
force=dict(default=False, type='bool'),
wait=dict(default=False, type='bool'),
Expand Down

0 comments on commit 73ce6ae

Please sign in to comment.