Abhijeet Kasurde and GitHub
dde6eb3c06
k8scopy: rely on existing kubectl binary ( #369 )
...
k8scopy: rely on existing kubectl binary
SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
molecule/default/roles/k8scopy/defaults/main.yml
molecule/default/roles/k8scopy/tasks/main.yml
molecule/default/roles/k8scopy/tasks/test_copy_directory.yml
molecule/default/roles/k8scopy/tasks/test_copy_file.yml
molecule/default/roles/k8scopy/tasks/test_copy_large_file.yml
molecule/default/roles/k8scopy/tasks/test_multi_container_pod.yml
molecule/default/tasks/lookup_kustomize.yml
2022-02-07 16:58:22 +00:00
Abhijeet Kasurde and GitHub
ed33d0b56e
Prepare for distutils.version being removed in Python 3.12 ( #314 )
...
Prepare for distutils.version being removed in Python 3.12
SUMMARY
distutils has been deprecafed and will be removed from
Python's stdlib in Python 3.12 (see python.org/dev/peps/pep-0632).
This PR replaces the use of distutils.version.LooseVersion and distutils.version.StrictVersion
with LooseVersion from the vendored copy of distutils.version
included with ansible-core 2.12 (ansible/ansible#74644 ) if available,
and falls back to distutils.version for ansible-core 2.11 and before.
Since ansible-core 2.11 and earlier do not support Python 3.12 (since
they use LooseVersion itself in various places), this incomplete fix
should be OK for now. Also, the way this PR works (by adding a new
module_utils version that abstracts away where LooseVersion comes from),
it is easy to also fix this for ansible-core 2.11 and earlier later on.
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
changelogs/fragments/disutils.version.yml
molecule/default/roles/helm/library/helm_test_version.py
plugins/module_utils/common.py
plugins/module_utils/version.py
plugins/modules/helm.py
Reviewed-by: Felix Fontein <felix@fontein.de >
Reviewed-by: Mike Graves <mgraves@redhat.com >
Reviewed-by: None <None>
2022-01-18 13:03:14 +00:00
Abhijeet Kasurde and GitHub
04e14c1f95
DNM: CI fix ( #323 )
...
CI fix
SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
molecule/default/tasks/taint.yml
Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
2022-01-12 08:07:03 +00:00
Abhijeet Kasurde and GitHub
91b80b1d1d
Enable black formatting test ( #259 )
...
Enable black formatting test
SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
plugins/action/k8s_info.py
plugins/connection/kubectl.py
plugins/doc_fragments/helm_common_options.py
plugins/doc_fragments/k8s_auth_options.py
plugins/doc_fragments/k8s_delete_options.py
plugins/doc_fragments/k8s_name_options.py
plugins/doc_fragments/k8s_resource_options.py
plugins/doc_fragments/k8s_scale_options.py
plugins/doc_fragments/k8s_state_options.py
plugins/doc_fragments/k8s_wait_options.py
plugins/filter/k8s.py
plugins/inventory/k8s.py
plugins/lookup/k8s.py
plugins/lookup/kustomize.py
plugins/module_utils/ansiblemodule.py
plugins/module_utils/apply.py
plugins/module_utils/args_common.py
plugins/module_utils/client/discovery.py
plugins/module_utils/client/resource.py
plugins/module_utils/common.py
plugins/module_utils/exceptions.py
plugins/module_utils/hashes.py
plugins/module_utils/helm.py
plugins/module_utils/k8sdynamicclient.py
plugins/module_utils/selector.py
plugins/modules/helm.py
plugins/modules/helm_info.py
plugins/modules/helm_plugin.py
plugins/modules/helm_plugin_info.py
plugins/modules/helm_repository.py
plugins/modules/helm_template.py
plugins/modules/k8s.py
plugins/modules/k8s_cluster_info.py
plugins/modules/k8s_cp.py
plugins/modules/k8s_drain.py
plugins/modules/k8s_exec.py
plugins/modules/k8s_info.py
plugins/modules/k8s_json_patch.py
plugins/modules/k8s_log.py
plugins/modules/k8s_rollback.py
plugins/modules/k8s_scale.py
plugins/modules/k8s_service.py
tests/integration/targets/kubernetes/library/test_tempfile.py
tests/unit/module_utils/test_apply.py
tests/unit/module_utils/test_common.py
tests/unit/module_utils/test_discoverer.py
tests/unit/module_utils/test_hashes.py
tests/unit/module_utils/test_marshal.py
tests/unit/module_utils/test_selector.py
tox.ini
Reviewed-by: None <None>
Reviewed-by: Mike Graves <mgraves@redhat.com >
Reviewed-by: None <None>
2021-10-18 15:32:05 +00:00
Abhijeet Kasurde and GitHub
688cff4ea8
k8s: document multi template feature ( #209 )
...
k8s: document multi template feature
SUMMARY
template parameter allows user to provide multiple
template files.
Fixes : #207
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
Docs Pull Request
COMPONENT NAME
plugins/modules/k8s.py
Reviewed-by: None <None>
Reviewed-by: Mike Graves <mgraves@redhat.com >
Reviewed-by: None <None>
2021-08-19 14:52:46 +00:00
Abhijeet Kasurde and GitHub
fa819d3f11
test molecule zuul job ( #180 )
2021-07-27 15:48:37 +05:30
Abhijeet Kasurde and GitHub
2f59c3db77
Add exception for import sanity ( #177 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-07-21 15:20:25 +02:00
Abhijeet Kasurde and GitHub
2076da7dc0
Update test-requirements for Zuul job ( #178 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-07-21 15:20:15 +02:00
Abhijeet Kasurde and GitHub
e9be88f212
Add script to handle sanity ignore ( #173 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-07-20 15:27:43 +05:30
Abhijeet Kasurde and GitHub
5fb3ecbb50
common: import k8sdynamicclient directly ( #163 )
2021-07-09 10:02:35 +05:30
Abhijeet Kasurde and GitHub
eab3aa29bf
Docs: Migrate Scenario Guide to collection ( #143 )
...
Migrate scenario guide from ansible/ansible repo to
this collection.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-07-09 09:55:47 +05:30
Abhijeet Kasurde and GitHub
04f227e9b9
lookup: Recommend query instead of lookup ( #155 )
2021-07-08 22:26:03 +05:30
Abhijeet Kasurde and GitHub
cf0b71f93e
lookup: return list even if single item found ( #117 )
...
Always return list from k8s lookup plugin
Fixes : #9
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-06-04 10:23:21 +05:30
Abhijeet Kasurde and GitHub
eb4b85c17d
Add a doc about Ansible Turbo mode ( #100 )
2021-05-27 09:44:12 +05:30
Abhijeet Kasurde and GitHub
1f47931c7c
helm: Add complex values example ( #108 )
2021-05-24 18:02:00 +05:30
Abhijeet Kasurde and GitHub
f9ee1f05b8
Add docs for doc autogeneration ( #98 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-05-21 10:49:01 +05:30
Abhijeet Kasurde and GitHub
0eb1559cc7
Update docs ( #101 )
2021-05-17 13:54:51 +05:30
Abhijeet Kasurde and GitHub
87827d79a4
Update README for the Python3 ( #93 )
2021-05-05 13:10:39 +05:30
a5a850d1da
Remove KubernetesAnsibleModule class ( #70 )
...
Co-authored-by: Mike Graves <mgraves@redhat.com >
2021-04-20 21:02:59 +05:30
Abhijeet Kasurde and GitHub
cc10268adf
k8s inventory - remove trailing slashes from hostname ( #63 )
...
When the user provides a hostname with trailing slashes like
https://localhost:6443/ , the openshift library fails to
enumerate the APIs from the given cluster.
This fix removes any extra trailing slashes before sending it
to the openshift DynamicClient.
Fixes : #52
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-04-20 13:15:29 +05:30
Abhijeet Kasurde and GitHub
5a0f5d6b93
helm: handle multiline output ( #64 )
...
Fixes : #399
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-04-20 12:07:28 +05:30
Abhijeet Kasurde and GitHub
5f993e6028
Update kubeconfig file location in docs ( #65 )
...
Fixes : #53
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-04-19 19:50:14 +05:30
Abhijeet Kasurde and GitHub
28223dbe36
Fix broken links in docs ( #61 )
2021-04-16 10:19:47 +05:30
Abhijeet Kasurde and GitHub
8182a3afd4
Added docs for the collection ( #50 )
2021-04-12 22:25:10 +05:30
Abhijeet Kasurde and GitHub
4aa983509b
Remove old changelog fragment files ( #51 )
2021-04-12 18:32:47 +05:30
Abhijeet Kasurde and GitHub
c9157ce713
k8s: fix get_api_client usage in inventory plugin ( #395 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-03-26 14:36:47 -04:00
Abhijeet Kasurde and GitHub
2f6fae322c
Removed openshift inventory for community.kubernetes ( #377 )
2021-03-16 18:43:07 +05:30
Abhijeet Kasurde and GitHub
1e511113a5
k8s_auth: remove module ( #376 )
2021-03-08 22:54:22 +05:30
Abhijeet Kasurde and GitHub
dc80c418e9
Update minimum version of Ansible required ( #366 )
...
https://github.com/ansible-collections/community.kubernetes/pull/276
is backported to 2.9.17
Any Ansible version lesser than this will not work due to
Kubernetes-python compatibility issues.
Fixes : #314
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-02-16 15:05:53 -05:00
Abhijeet Kasurde and GitHub
92e373239c
k8s: Add example for download and apply manifest from URL ( #359 )
...
Fixes : #352
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2021-02-03 21:16:44 +05:30
Abhijeet Kasurde and GitHub
86c5c446dd
Make unused release_namespace parameter as optional ( #358 )
2021-02-03 13:45:25 +05:30
Abhijeet Kasurde and GitHub
9059f2c526
k8s: Handle ValueError raised ( #330 )
2021-01-12 21:38:58 +05:30
Abhijeet Kasurde and GitHub
5d3e465672
k8s: handle remote src and kubeconfig ( #320 )
...
* k8s: Add a parameter remote_src
remote_src is boolean parameter to specify if
src file is located on remote node or Ansible Controller.
Fixes : #307
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
* remove parameters
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-12-10 10:58:33 -07:00
Abhijeet Kasurde and GitHub
549dd262d2
Loosen strictness for boolean ( #326 )
2020-12-08 20:01:44 +05:30
Abhijeet Kasurde and GitHub
4b447cc301
CI fix ( #322 )
...
Fixes : #316
2020-12-04 12:33:10 +05:30
Abhijeet Kasurde and GitHub
86ce0b5556
add changelog and version added information. ( #312 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-11-30 12:46:02 +05:30
Abhijeet Kasurde and GitHub
4d94cb9439
tests: remove old openshift tests ( #311 )
...
Older openshift test cases are no longer valid for this
collection. Removing them for now.
Fixes : #300
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-11-25 11:27:13 -06:00
Abhijeet Kasurde and GitHub
108efaf065
Properly format list in README.md ( #302 )
2020-11-11 14:39:25 +05:30
Abhijeet Kasurde and GitHub
90a1c626a2
Fix CI ( #301 )
...
Missing variables in Chart local_path testing.
2020-11-11 10:29:10 +05:30
Abhijeet Kasurde and GitHub
c76aa6e45a
Use runtime.yml for action plugin redirection ( #299 )
...
Previously, kubernetes collection used symlink for action plugin redirection. It is problematic when FQCN
is not provided. Using runtime.yml to redirect the action plugin.
Fixes : #278
2020-11-10 14:15:58 -05:00
Abhijeet Kasurde and GitHub
66494890ba
Enable validate_certs test for kubernetes ( #298 )
...
Fixes : #24
2020-11-10 14:14:54 -05:00
Abhijeet Kasurde and GitHub
e2d4cff952
Updated chart repo URLs ( #297 )
2020-11-10 14:13:09 -05:00
Abhijeet Kasurde and GitHub
77e48d0c97
helm: return correct information in check mode ( #281 )
...
Fixes : #280
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-10-22 15:22:17 -05:00
Abhijeet Kasurde and GitHub
d03823794e
helm_repository: Add information about 'RETURN' ( #269 )
...
Fixes : #256
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-10-12 11:20:53 -04:00
Abhijeet Kasurde and GitHub
0f33aafca7
Add testcase for multi resource template ( #245 )
...
User can combine multiple resources in the given template
file, which can be consumed by k8s module to create multiple
resources at once.
Fixes : #243
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-10-01 08:56:40 -05:00
Abhijeet Kasurde and GitHub
5de49373b7
k8s_cluster_info: new module ( #160 )
...
Get information about k8s APIs
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-09-28 14:01:37 +05:30
Abhijeet Kasurde and GitHub
00fa8789a2
k8s: add support for template ( #230 )
...
Fixes : #37
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-09-28 11:35:26 +05:30
Abhijeet Kasurde and GitHub
f03d2ce243
k8s_info: Add support for wait ( #235 )
...
Fixes : #18
2020-09-28 10:52:00 +05:30
Abhijeet Kasurde and GitHub
308956b313
Replace KubernetesRawModule class ( #231 )
...
* Migrate from KubernetesRawModule to K8sAnsibleMixin
* Modified k8s.py
* Modified k8s_service.py
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-09-19 09:54:40 +05:30
Abhijeet Kasurde and GitHub
51cadb7150
Replace KubernetesAnsibleModule class with dummy class ( #227 )
...
* Make an AnsibleMixin parent class for every module
* Replace KubernetesAnsibleModule class with dummy class
* Modified k8s_log
* k8s_exec refactor
* k8s_info refactor
* k8s_service refactor
* k8s_scale refactor
* Fix integration tests
* Add a warning about the deprecation of KubernetesAnsibleModule
* Add a dummy class for backward compatibility
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-09-16 20:35:05 +05:30
Abhijeet Kasurde
f2b1b267a5
helm: Support vaulted kubeconfig
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-09-15 13:56:43 +05:30
Abhijeet Kasurde and GitHub
527859c9cd
Refactor module_utils ( #223 )
...
Moved a bunch of common things to module_utils.
2020-09-08 20:37:16 +05:30
Abhijeet Kasurde
ffb7032dc2
handle exception raised due to DynamicClient
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-09-07 19:03:28 +05:30
Abhijeet Kasurde and GitHub
c49f896fa0
helm: Add replace parameter ( #214 )
...
Fixes : #106
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-09-07 12:42:00 +05:30
Abhijeet Kasurde and GitHub
23f9588732
kubectl: correct usage in console ( #204 )
...
kubectl exec is printed twice in the console log.
Fixes : #200
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-08-31 09:29:27 +05:30
Abhijeet Kasurde and GitHub
16059a8111
k8s_*: Group argument_spec accroding to usage ( #199 )
...
Partially fix #36
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-08-26 19:48:07 +05:30
Abhijeet Kasurde and GitHub
d39fcfc2d8
k8s_*: Add support for vaulted kubeconfig and src ( #193 )
2020-08-26 10:22:47 +05:30
Abhijeet Kasurde
ab77b79f9c
k8s_info: Update documentation
...
* Used name_option doc_fragments
* Updated doc formatting
* Updated k8s_info example for custom resource
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-08-24 15:47:00 +05:30
Abhijeet Kasurde
f58e6489ce
Add contrib page
...
Fixes : #120
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-08-12 17:57:54 +05:30
Abhijeet Kasurde and GitHub
4f33ba7b39
raw: Handle exception raised by underlying APIs ( #180 )
...
kind can be provided by number of ways. It is diffcult to
find all cases. So, handle exceptions raised by underlying
APIs and provide good error message to user.
Fixes : ansible/ansible#63652
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-08-11 11:12:53 +05:30
Abhijeet Kasurde and GitHub
3aaf182c30
k8s_exec: Return rc for the command executed ( #158 )
...
k8s_exec now returns command return code in output.
Fixes : #122
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-07-23 10:52:26 +05:30
Abhijeet Kasurde and GitHub
6c059bd2bc
helm_plugin and helm_plugin_info: new module ( #154 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-07-22 09:14:23 +05:30
Abhijeet Kasurde and GitHub
c4f3e5a034
k8s_info: Update example using vars ( #156 )
...
Fixes : #151
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-07-13 16:35:33 +05:30
Abhijeet Kasurde and GitHub
6b28ef3c17
kubectl: redacted token and password from console log ( #159 )
...
** SECURITY_FIX ** for CVE-2020-1753
kubectl connection plugin now redact kubectl_token and
kubectl_password from console log.
Fixes : #65
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-07-11 08:50:15 +05:30
Abhijeet Kasurde
48a45de8b0
helm_: Add context aliases for kube_context
...
Added 'context' aliases for 'kube_context' in
helm and helm_info module.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-07-06 11:18:23 +05:30
Abhijeet Kasurde and GitHub
ef6722d290
helm: Add support for K8S_AUTH_CONTEXT, K8S_AUTH_KUBECONFIG env ( #141 )
...
Added support for K8S_AUTH_CONTEXT, K8S_AUTH_KUBECONFIG env
2020-07-02 18:48:41 +05:30
Abhijeet Kasurde and GitHub
9fb808c7f3
k8s: Fix a bug when manifest file ends with '---' ( #139 )
...
Any kubernetes manifest file ending with '---' will
generate an error when applied using 'k8s' module.
Although this may not be 'legal' YAML, this is quite frequent,
specially on helm's generated manifest files.
migrated from https://github.com/ansible/ansible/pull/59160
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-06-25 09:11:03 +10:00
Abhijeet Kasurde
5b7046470e
helm: Add option 'atomic'
...
helm command provides option to remove installation on failure using
'atomic' flag.
This fix adds this parameter in helm module.
Fixes : #109
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-06-18 17:01:45 +05:30
Abhijeet Kasurde and GitHub
3004c8d3f0
Handle invalid kubeconfig parsing error ( #119 )
...
Provide message to user about invalid or empty kubeconfig
by handling exception raised by kubernetes Python API
Fixes : #90
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-06-16 11:03:08 +05:30
Abhijeet Kasurde and GitHub
18dfb687e6
Handle set object retrieved from lookup plugin ( #118 )
...
api_groups is returned as "dict_keys()" which k8s lookip plugin does not handle.
Typecasting with list make it available to default callback plugin.
2020-06-05 12:18:57 +05:30
Abhijeet Kasurde and GitHub
c8ef0ae1ad
Minor refactor in helm_info and helm_repository ( #117 )
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-06-05 12:16:56 +05:30
Abhijeet Kasurde and GitHub
3078131db5
Minor doc fixes ( #114 )
...
* Spelling fixes
* Documentation update
* Example update to use FQCN
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-06-05 11:32:26 +05:30
Abhijeet Kasurde and GitHub
9a952697a2
Minor documentation fix ( #113 )
...
Inventory plugin example should read 'api_key' instead of 'token'
Fixes : #101
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-06-02 15:49:04 +10:00
Abhijeet Kasurde
641fbd92f5
helm: minor code refactoring
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com >
2020-06-01 18:55:30 +05:30