Commit Graph

556 Commits

Author SHA1 Message Date
Abhijeet Kasurde
2076da7dc0 Update test-requirements for Zuul job (#178)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-07-21 15:20:15 +02:00
abikouo
3c36b6fa0f k8s support diff mode (#146)
* support diff mode for k8s module

* Update and rename 145-k8s-add-support-diff-mode.yml to 146-k8s-add-support-diff-mode.yml

* Update 146-k8s-add-support-diff-mode.yml

* Update changelogs/fragments/146-k8s-add-support-diff-mode.yml

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

* update k8s_scale and k8s_json_patch

* diff for k8s_scale  and k8s_json_patch

Co-authored-by: Mike Graves <mgraves@redhat.com>
2021-07-21 14:29:28 +02:00
Abhijeet Kasurde
e9be88f212 Add script to handle sanity ignore (#173)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-07-20 15:27:43 +05:30
Vincent Van Ouytsel
a0a6d7121f helm: add support for history-max parameter (#164)
* helm: add support for history-max parameter

The --history-max parameter allows the user to set a maximum amount of
revisions per release to be kept in the history.

By default helm keeps 10 revisions per release, which means that 10
secrets will be kept per release.

* helm: remove default for history_max

When the history_max option is not set, the module will not pass
'--history-max' to the CLI command. This ensures that the defaults of
the helm CLI will alwasy be used.

* helm: remove whitespace trail

* helm: add mutually exclusive logic

The 'history_max' parameter is not available when using the 'helm
install' command, it is only implemented for 'helm ugprade'.

The 'replace' option uses the 'install' parameter, thus 'replace' and
'history_max' have to be mutually exclusive.

* helm: formatting changes
2021-07-15 13:21:22 -04:00
stg
2e98493010 Add sinceSeconds parameter to k8s_logs (#142)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Mike Graves <mgraves@redhat.com>
2021-07-15 13:23:32 +05:30
Abhijeet Kasurde
5fb3ecbb50 common: import k8sdynamicclient directly (#163) 2021-07-09 10:02:35 +05:30
Abhijeet Kasurde
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
04f227e9b9 lookup: Recommend query instead of lookup (#155) 2021-07-08 22:26:03 +05:30
abikouo
25100e7f5e adding a prepare step to validate that node is ready for schedule (#160) 2021-07-07 07:23:45 -04:00
abikouo
ccc2b61719 multiple fixes on molecule helm testing (#121) 2021-07-01 14:36:39 +02:00
Mike Graves
8c7b302916 Support template param in other collections (#154)
* Support template param in other collections

The action plugin for k8s does a collection name check for the template
param, but it's missing redhat.openshift and community.kubernetes.

* Add changelog fragment

* Fix test
2021-06-29 08:41:33 -04:00
Mike Graves
abcc3e884c Release 2.1.1 (#152) 2.1.1 2021-06-24 12:41:43 -04:00
Mike Graves
15799b2dd5 Check that auth value is not None (#151)
* Check that auth value is not None

The previous check for truth prevented the verify_ssl param from being
set to false, thus forcing ssl verfication in every case.

* Add changelog fragment

* Fix linting
2021-06-24 12:15:27 -04:00
abikouo
35af8a48ad molecule gc.yml - fix sporadic fail (#144)
* update

* Update gc.yml
2021-06-24 14:33:14 +02:00
Mike Graves
8280bb78c0 Release 2.1.0 (#150) 2.1.0 2021-06-24 07:49:00 -04:00
Mike Graves
2eca446f09 Remove turbo mode functionality (#149)
* Remove turbo mode functionality

* Add changelog fragment

* Fix linting issue

* Update docs
2021-06-23 18:50:32 -04:00
Mike Graves
cd72b6d7df Remove cloud.common dependency (#148)
* Remove cloud.common dependency

* Add changelog fragment
2021-06-23 16:06:26 -04:00
abikouo
b50f1f2fc9 Fix molecule test `gc.yml` (#132)
* add until loop

* Update gc.yml
2021-06-22 08:55:40 +02:00
Mike Graves
2594ac654b Release 2.0.2 (#138) 2.0.2 2021-06-17 09:08:42 -04:00
Mike Graves
c11a255026 Fix apply on Ansible 2.9 (#135)
* Fix apply on Ansible 2.9

For some reason the apply function can't be correctly imported in
Ansible 2.9. This just renames it to get it to import. I've also added
molecule testing on multiple Ansible versions.

* Add changelog fragment
2021-06-16 11:28:46 -04:00
abikouo
46494a18bd Revert "k8s ability to wait on arbitrary property (#105)" (#133)
This reverts commit 4ccb15d4ad.
2021-06-15 14:32:21 +02:00
abikouo
4ccb15d4ad k8s ability to wait on arbitrary property (#105)
* missing implementation of jsonpath library

* not tested

* sanity

* save

* updates

* Update args_common.py

* lint validation

* fix

* Update k8s.py

* attribute should match for all

* select wait

* Revert "select wait"

This reverts commit a20a1f6f01.

* sanity

* Update molecule/default/tasks/waiter.yml

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

* Update jsonpath_extractor.py

* Update k8s_wait_options.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-15 10:44:26 +02:00
abikouo
58dba6bf22 k8s apply - fix list merge for array attribute with empty dict (#131)
Fix k8s apply
2021-06-15 10:41:55 +02:00
Mike Graves
b7345696cc Release 2.0.1 (#130) 2.0.1 2021-06-14 07:54:07 -04:00
Mike Graves
98cb88a701 Add community.kubernetes to inventory plugin param (#128) 2021-06-11 15:22:06 +05:30
Mike Graves
9e60a3a40d Release version 2.0.0 (#124)
* Release version 2.0.0
2.0.0
2021-06-09 12:50:23 -04:00
Mike Graves
18cbfb7f95 Remove deprecated k8s_facts (#125)
* Remove deprecated k8s_facts

This removes the k8s_facts alias to k8s_info.

* Add changelog fragment
2021-06-09 11:04:22 -04:00
abikouo
481521a09d k8s_scale - add option label_selectors and continue_on_error (#114)
k8s_scale suppport for label selector
2021-06-07 09:57:50 +02:00
Mike Graves
ef82b78a2f Support multiple resources with same GVK (#119)
In replicating the openshift client functionality we forgot to bring
over a fix for multiple resources with the same group version and kind.
This is specifically a problem for openshift templates.
2021-06-04 13:19:02 -04:00
Abhijeet Kasurde
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
abikouo
dd53fde0e1 remove openshift dependency for molecule testing (#118) 2021-06-02 10:09:19 +02:00
Andrew Klychkov
92e6ff29f6 Update README, CONTRIBUTING.md: freenode -> libera.chat (#116) 2021-06-01 14:34:02 +05:30
Abhijeet Kasurde
eb4b85c17d Add a doc about Ansible Turbo mode (#100) 2021-05-27 09:44:12 +05:30
Mike Graves
5b5777d202 Split JSON patch out into a new module (#99)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-24 18:05:48 +05:30
Abhijeet Kasurde
1f47931c7c helm: Add complex values example (#108) 2021-05-24 18:02:00 +05:30
Elliot Blackburn
e112417d4c Correct helm_info return type docs for app_version (#97) 2021-05-21 13:22:02 +05:30
Abhijeet Kasurde
f9ee1f05b8 Add docs for doc autogeneration (#98)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-21 10:49:01 +05:30
Gonéri Le Bouder
2d6a120032 galaxy.yml: dependencies is a dict (#110) 2021-05-19 17:22:35 -04:00
Mike Graves
0bbc9ca999 Account for updated pods when waiting on DaemonSet (#102)
* Account for updated pods when waiting on DaemonSet

The exising logic that's used to determine when a DaemonSet is ready
fails to account for the fact that a RollingUpdate first kills the pod
and then creates a new one. Simply checking if the
desiredNumberScheduled equals the numberReady will succeed in cases
when the old pod takes time to shut down, and would report that the new
Deployment is ready despite the fact that the old pod has not been
replaced, yet.

* Add changelog fragment
2021-05-19 09:29:22 -04:00
abikouo
192cae1507 k8s - patch existing resource (#90)
* patch only

* add changelogs

* Rename 89-k8s-add-parameter-patch_only.yml to 90-k8s-add-parameter-patch_only.yml

* Update 90-k8s-add-parameter-patch_only.yml

* patch_only parameter changed to state=patched

* Update 90-k8s-add-parameter-patch_only.yml

* Update plugins/modules/k8s.py

Co-authored-by: Fabian von Feilitzsch <fabian@fabianism.us>

* Update molecule/default/tasks/patched.yml

Co-authored-by: John Mazzitelli <mazz@redhat.com>

* Update molecule/default/tasks/patched.yml

Co-authored-by: John Mazzitelli <mazz@redhat.com>

* sanity issue

Co-authored-by: Fabian von Feilitzsch <fabian@fabianism.us>
Co-authored-by: John Mazzitelli <mazz@redhat.com>
2021-05-19 11:03:11 +02:00
Mike Graves
5856948657 Remove empty docstring in filter plugin (#106)
A recent change somewhere upstream broke the sanity tests. This
partially reverts 0eb1559cc7 to remove the
empty docstring on the filter plugin. The reason the empty docstring was
added in the first place was to fix a problem with the doc generation
script. However, a recent change to the collection_prep project fixed
that issue so we no longer need the empty docstring.
2021-05-18 15:34:41 -04:00
abikouo
5bb827f0f4 2.11 sanity on collection (#103)
* sanity 2.11

* add repo name

* repo name syntax

* install requirements

* update ignore

* molecule tests on multiple versions

* Update ci.yml
2021-05-17 15:17:45 +02:00
Abhijeet Kasurde
0eb1559cc7 Update docs (#101) 2021-05-17 13:54:51 +05:30
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
Mike Graves
2b6a989cf9 Replicate base resource for lists functionality (#89)
* Replicate base resource for lists functionality

This replicates specific functionality from the openshift client to more
reliably retrieve the base resource from a resource list.

* Add changelog fragment
2021-05-05 10:09:22 -04:00
Abhijeet Kasurde
87827d79a4 Update README for the Python3 (#93) 2021-05-05 13:10:39 +05:30
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
abikouo
e754a6cd31 `helm_plugin and helm_plugin_info remove unused parameter release_namespace` (#85)
* remove unused parameter release_namespace from documentation

* Update changelogs/fragments/85_helm_plugin.yaml

Co-authored-by: Mike Graves <mgraves@redhat.com>
2021-05-04 15:05:18 +02:00
abikouo
963aa3fbe6 support merge_type`json` (#83)
Fixes #54
2021-04-28 09:06:43 -04:00
abikouo
d29f8c1eb7 add option proxy_headers for k8s modules (#58)
* add option proxy_headers for k8s modules

* Update and rename 50-add-support-for-proxy_headers-on-authentication to 58-add-support-for-proxy_headers-on-authentication.yaml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-28 08:44:57 +02:00