Commit Graph

47 Commits

Author SHA1 Message Date
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
Gonéri Le Bouder
ef6eee26a7 integration: use venv instead of virtualenv (#82)
virtualenv is deprecated since Python3. We use venv instead.
2021-04-23 10:38:08 -04:00
Alina Buzachis
48c5170018 Replicate apply method in the DynamicClient (#45)
* * Replicate apply method in the DynamicClient

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* * Add changelog fragment

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-04-22 14:58:53 -04:00
Alina Buzachis
edc48ee577 Add configmap/secret hash functionality (#48)
* * * Add configmap/secret hash functionality

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* * Add changelog fragment

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-04-20 08:27:25 -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
Andrew Klychkov
a55edac38f Add ignore.txt for 2.12 (#7) 2021-04-08 14:00:02 +05:30
Mike Graves
d6f251173e Add unit tests to CI (#407)
* Add unit tests to CI

The unit tests were not being run during CI. This adds a GitHub Action
for it.

* Add changelog fragment
2021-04-05 09:39:01 -04:00
Mike Graves
af928a255f Remove old openshift integration tests (#382) 2021-03-16 09:05:52 -04:00
Mike Graves
2640084143 Add optional support for helm diff (#355)
There are some cases where the existing module has difficulty
determining if an upgrade would result in changes. This can particularly
be a problem when changes are made to a local chart.

This adds optional support for helm diff. If the plugin is present it
will be used. Otherwise, the default implementation will be used and a
warning will be issued. One caveat: helm diff does not currently support
using a repo url, so the default implementation will be used in this
case, as well.

Closes: #248
2021-02-03 13:46:26 +05:30
Mike Graves
b26afc3518 Fix Secret check_mode (#343)
When adding a Secret and using stringData, check_mode will always show
changes. An existing resource fetched from Kubernetes will have the
stringData already base64 encoded and merged into the data attribute.
This change performs the base64 encoding and merging with the provided
definition to more accurately represent the current state of the
cluster.

This change only affects check_mode. When making any changes to the
cluster the stringData is passed along as provided in the definition.

Closes #282.
2021-01-14 11:05:11 -05:00
Gonéri Le Bouder
221631c06a helm: add support for the K8S_ envvars (#319)
Add support for:

- K8S_AUTH_HOST
- K8S_AUTH_API_KEY
- K8S_AUTH_VERIFY_SSL
- K8S_AUTH_SSL_CA_CERT

This commit also refactor the way we pass K8S related configuration to `helm`:

All the calls are now done in a new module_utils module (`helm.py`).
The handling of the `kube_*` variables has also been moved in this new
module.

We need https://github.com/helm/helm/pull/8622 to be able to ignore the
certificate validation. As a workaround, the generate a temporary
kubeconfig configuration file.

Closes: #279
2020-12-11 11:41:08 -05:00
Gonéri Le Bouder
befc0f6853 helm and helm_info: adjust the name of two parameters (#324) 2020-12-10 09:28:27 +05:30
Abhijeet Kasurde
4b447cc301 CI fix (#322)
Fixes: #316
2020-12-04 12:33:10 +05:30
Abhijeet Kasurde
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
Gonéri Le Bouder
eff6759660 test: older_openshift_fail.yml fails with py3.7+ (#291)
The `older_openshift_fail.yml` test playbook fails with Python 3.7 because the old `kubernetes.client.apis.admissionregistration_api` module uses the new `async` keyword as a function parameter name. From: https://docs.python.org/3/whatsnew/3.7.html

Backwards incompatible syntax changes:

    `async` and `await` are now reserved keywords.

In this case, we get a `SyntaxError` exception instead of the expected `Failed to import the required Python library (openshift >= 0.7.2)`.
2020-11-10 14:27:23 -05:00
jaydesl
aad4696f20 Fix default configuration getter in client v12.0.0 (#276)
Fixes #273
2020-10-22 15:41:51 -04:00
Adam Miller
d17858c6dd fix downstream ci names
Signed-off-by: Adam Miller <admiller@redhat.com>
2020-08-28 13:58:39 -05:00
Adam Miller
827807392d fix CI tests, helm picked up the same argspec addition as some k8s modules
Signed-off-by: Adam Miller <admiller@redhat.com>
2020-08-27 22:08:01 -05:00
Abhijeet Kasurde
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
Jeff Geerling
881ca3d006 Fixes #145: Use FQCN in module docs and in plugin examples. 2020-06-29 16:25:42 -05:00
Jeff Geerling
c3796da76d Fixes #129: Add 2.11 sanity ignore file. 2020-06-16 15:19:05 -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
Jeff Geerling
f5c9dcdd29 Use GitHub Action for code coverage reporting. 2020-03-05 09:26:46 -06:00
Jeff Geerling
ac9ee36abb Fixes #44: Fix bare variable deprecation warning by cleaning up unnecessary variable. 2020-03-04 14:22:51 -06:00
Jeff Geerling
eb81891577 Issue #30: Test with Molecule 3.0 alpha. 2020-02-19 11:03:14 -06:00
Jeff Geerling
a75593c36a Attempt to resolve #23 entirely without a json_query(). 2020-02-13 15:47:24 -06:00
Jeff Geerling
b2e639b823 Issue #10: Move integration tests into molecule playbook. 2020-02-13 15:03:47 -06:00
Jeff Geerling
16019872df Issue #21: Put back kubernetes comment to see if coverage gets uploaded. 2020-02-11 17:53:35 -06:00
Jeff Geerling
426cf883ee Remove extra comment in file that was causing bash errors. 2020-02-11 17:22:30 -06:00
Jeff Geerling
41f9aaa5e1 Issue #15: Add code coverage reporting token. 2020-02-11 17:18:42 -06:00
Jeff Geerling
a21f8c4d6b Issue #15: Add codecov coverage reporting like grafana collection. 2020-02-11 17:10:38 -06:00
Jeff Geerling
99dcbcc32f Issue #2: Ignore return-syntax-error for now. 2020-01-30 16:42:22 -06:00
Jeff Geerling
21770a4fe2 Issue #2: Get the rest of the documentation errors fixed. 2020-01-30 16:35:24 -06:00
Jeff Geerling
4ac8e2e8bc Fixes #2: Use correct ignore file naming convention for collection. 2020-01-30 16:14:11 -06:00
Jeff Geerling
48b4c3be54 Issue #2: python_requirements_info is not available in ansible-base. 2020-01-30 14:20:37 -06:00
Jeff Geerling
828b3ea123 Issue #2: Remove extra test output data, adjust gitignore. 2020-01-30 14:14:13 -06:00
Jeff Geerling
d94dd72ae6 Issue #1, Issue #2: Move more content into collection, fix tests. 2020-01-30 13:51:43 -06:00
Jeff Geerling
2e807f946a Issue #2: Get tests working with GitHub Actions for now. 2020-01-30 11:30:34 -06:00
Jeff Geerling
4b6fdb1615 Issue #1: Restructure role into collection using content_collector. 2020-01-30 10:50:44 -06:00
Chris Houseknecht
c73a245f90 Travis file cleanup (#13)
* Adds inventory

* Fix interpreter

* connection
2017-10-12 15:50:47 -04:00
Chris Houseknecht
aa8fe4ea23 Regen modules. Add tests. 2017-10-12 11:24:18 -04:00
Chris Houseknecht
1b9adeaf5e Add simple module test 2017-10-11 13:15:16 -04:00
Chris Houseknecht
7fd58483f5 Fixes tests 2017-05-26 21:33:49 -04:00
Chris Houseknecht
b6689dd855 Removes *.log. Updates ansible.cfg 2017-03-27 20:07:37 -04:00
Chris Houseknecht
cc7f18bc25 Latest changes 2017-03-23 04:15:26 -04:00
Chris Houseknecht
f928690369 Initial commit 2017-03-22 18:08:20 -04:00