mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 21:12:37 +00:00
add no_proxy support to k8s* (#272)
add no_proxy support to k8s* SUMMARY close #271 ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/module_utils/args_common.py plugins/modules/k8s* ADDITIONAL INFORMATION It requires latest kubernetes library(>=19.15.0) to use this feature. pip install kubernetes>=19.15.0 then, use following snippet yaml: - k8s: state: present src: "deployment.yaml" proxy: "http://proxy.yourdomain.com:8080/" no_proxy: "localhost,.yourdomain.com,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192,168.0.0/16" or use environment variable K8S_AUTH_NO_PROXY as well as K8S_AUTH_PROXY. Reviewed-by: None <None> Reviewed-by: None <None> Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: None <None>
This commit is contained in:
@@ -29,6 +29,7 @@ AUTH_ARG_SPEC = {
|
||||
"client_cert": {"type": "path", "aliases": ["cert_file"]},
|
||||
"client_key": {"type": "path", "aliases": ["key_file"]},
|
||||
"proxy": {"type": "str"},
|
||||
"no_proxy": {"type": "str"},
|
||||
"proxy_headers": {"type": "dict", "options": AUTH_PROXY_HEADERS_SPEC},
|
||||
"persist_config": {"type": "bool"},
|
||||
}
|
||||
@@ -61,6 +62,7 @@ AUTH_ARG_MAP = {
|
||||
"cert_file": "client_cert",
|
||||
"key_file": "client_key",
|
||||
"proxy": "proxy",
|
||||
"no_proxy": "no_proxy",
|
||||
"proxy_headers": "proxy_headers",
|
||||
"persist_config": "persist_config",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user