Commit Graph

21 Commits

Author SHA1 Message Date
Mike Graves
a48a68ecfd Add deprecation notice to k8s_exec (#233)
Add deprecation notice to k8s_exec

SUMMARY


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: None <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2021-09-14 14:40:58 +00:00
itaru2622
07ac24e42e fix k8s_exec, returning rc attribute to follow ansible's common return values. (#230)
fix k8s_exec, returning rc attribute to follow ansible's common return values.

SUMMARY

fix #229.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

k8s_exec
ADDITIONAL INFORMATION

Reviewed-by: None <None>
Reviewed-by: None <None>
2021-09-13 10:21:24 +00:00
Mike Graves
01a0815e56 Replace openshift client with kubernetes client (#96)
* Replace openshift client with kubernetes client

This commit primarily just removes mentions of openshift from the docs
and updates the requirements. Most of the work to replace the client has
been done through the following commits:

edc48ee577
c214376cac
48c5170018
2b6a989cf9

* Add changelog fragment

* Update changelogs/fragments/96-replace-openshift-client.yaml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update plugins/modules/k8s.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update plugins/modules/k8s_info.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update plugins/modules/k8s_service.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Bump minimum kubernetes version to 12.0.0

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-06 14:44:17 -04:00
abikouo
fc80540db5 drop python 2 support (breaking changes) (#86)
* drop python 2 support

* change log

* Update changelogs/fragments/86_drop_python2_support.yaml

Co-authored-by: Mike Graves <mgraves@redhat.com>

* Update k8s.py

Co-authored-by: Mike Graves <mgraves@redhat.com>
2021-05-04 18:07:22 +02:00
Gonéri Le Bouder
c516d7ecb9 k8s_exec: reuse existing connection (#76)
Initialize the CoreV1Api object with the existing Kubernetes connection.
2021-04-22 12:50:40 -04:00
Mike Graves
ba586a8ed8 Rename from community.kubernetes to kubernetes.core (#6)
* Rename from community.kubernetes to kubernetes.core

This goes through and renames community.kubernetes to kubernetes.core.
Most of this was generated from the downstream build script that was
used on the community repository, plus whatever hand edits I could find
that were needed.

The downstream build and test process has also been removed as this
repository is now the downstream repository.

* Fix CONTRIBUTING.md
2021-04-08 08:48:27 -04:00
Gonéri Le Bouder
39660dd40e refactoring for ansible_module.turbo integration (#313)
* refactoring for ansible_module.turbo integration

This refactoring prepares the integration of `ansible_module.turbo`

- Delay the loading of `common.py`, move the shared structure in
  `args_common`.
- Avoid the use of one single object per module, this to increase the
  amount of Python structure that we can cache.
- Cache the Kubernetes client.

See: https://github.com/ansible-collections/community.kubernetes/pull/270

Co-authored-by: Jill Rouleau <jill.rouleau@bespokess.com>
2021-03-16 17:16:18 -04:00
Mike Graves
981493dfb6 Add note about required permissions for k8s_exec (#361) 2021-02-08 19:42:13 -05:00
Abhijeet Kasurde
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
Jeff Geerling
1ef28bcd73 Issue #171: Update changelog and make sure things are ready for 1.0.0 release. 2020-07-28 10:37:15 -05:00
Abhijeet Kasurde
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
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
Jeff Geerling
aad3ec7ad5 Add version_added to docs for each of the new collection modules. 2020-05-14 09:39:17 -05:00
Örjan Sjöholm
f45d33224f Remove ANSIBLE_METADATA
The meta data field is deprecated and is not used anymore.

See ansible-collections/overview#57 for more details.
2020-05-14 14:25:07 +02:00
Jeff Geerling
7aa071c98f Issue #49: Remaining fixes from diff on auto-migrated collection. 2020-03-20 15:42:13 -05:00
Tristan Cacqueray
eb50e6f6cd Fix k8s_exec mode 2020-02-14 14:13:49 -05:00
Tristan Cacqueray
5f1b88ba6f Update test variable name and k8s_exec version_added attribute 2020-02-14 18:28:16 +00:00
Tristan Cacqueray
42cf348eeb Fix doc required and remove exec bit 2020-02-13 19:13:59 -05:00
Tristan Cacqueray
3bab767762 Fix doc-required-mismatch 2020-02-13 19:13:59 -05:00
Tristan Cacqueray
c4f5d254ca Fix doc_fragments reference 2020-02-13 19:13:59 -05:00
Tristan Cacqueray
58d9bc13bb Add k8s_exec module to execute command through the API
This change adds a new module to execute command in a container
through the API:
https://docs.okd.io/latest/dev_guide/executing_remote_commands.html#protocol

Related: https://github.com/ansible/ansible/pull/55029
Closes: https://github.com/ansible-collections/kubernetes/issues/7
2020-02-13 19:13:59 -05:00