mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-13 21:12:05 +00:00
k8s_exec: reuse existing connection (#76)
Initialize the CoreV1Api object with the existing Kubernetes connection.
This commit is contained in:
@@ -144,7 +144,7 @@ def argspec():
|
|||||||
def execute_module(module, k8s_ansible_mixin):
|
def execute_module(module, k8s_ansible_mixin):
|
||||||
|
|
||||||
# Load kubernetes.client.Configuration
|
# Load kubernetes.client.Configuration
|
||||||
api = core_v1_api.CoreV1Api()
|
api = core_v1_api.CoreV1Api(k8s_ansible_mixin.client.client)
|
||||||
|
|
||||||
# hack because passing the container as None breaks things
|
# hack because passing the container as None breaks things
|
||||||
optional_kwargs = {}
|
optional_kwargs = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user