757 Commits

Author SHA1 Message Date
Mike Graves
a9b8cc68d5 Add support for configuring garbage collection (#334)
* Add support for configuring garbage collection

This surfaces deleteOptions functionality in a top-level delete_options
parameter.

* Add changelog fragment

* Remove kind and apiVersion from delete_options

* Add release version to docs
2021-01-12 14:17:18 -05:00
Abhijeet Kasurde
9059f2c526 k8s: Handle ValueError raised (#330) 2021-01-12 21:38:58 +05:30
Gonéri Le Bouder
a6cb6c4821 action/k8s_info: refactoring to simplify the code base (#331)
Break down the long `run()` method to simplify the readability of the
plugin.
2021-01-11 11:04:11 +05:30
Gonéri Le Bouder
01ee3e603c helm: 'changed' flag takes 'values' in consideration (#332)
Return `changed` `False` is the `values_files` match the `values` of
the existing deployment.

Closes: #274
2021-01-05 13:53:20 -06: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
Abhijeet Kasurde
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
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
549dd262d2 Loosen strictness for boolean (#326) 2020-12-08 20:01:44 +05:30
Gonéri Le Bouder
486a179c7a add 3 doc-default-does-not-match-spec errors (#325)
Address the following error with the test-suite:

- plugins/modules/k8s.py:0:0: doc-default-does-not-match-spec: Argument 'append_hash' in argument_spec defines default as (False) but documentation defines default as (None)
- plugins/modules/k8s.py:0:0: doc-default-does-not-match-spec: Argument 'apply' in argument_spec defines default as (False) but documentation defines default as (None)
- plugins/modules/k8s_service.py:0:0: doc-default-does-not-match-spec: Argument 'apply' in argument_spec defines default as (False) but documentation defines default as (None)
2020-12-08 09:20:20 +05:30
Abhijeet Kasurde
4b447cc301 CI fix (#322)
Fixes: #316
2020-12-04 12:33:10 +05:30
Gonéri Le Bouder
11191e40b0 molecule: conditional statements should not include jinja2 templating (#305)
This address the following warning:
```
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: {{ scale_down_no_wait_pods.resources
| length == 1 }
```
2020-12-02 14:10:07 -05:00
Abhijeet Kasurde
86ce0b5556 add changelog and version added information. (#312)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-11-30 12:46:02 +05:30
Fabian von Feilitzsch
2474ef1b2c k8s_info now outputs whether the api was found (#308) 2020-11-30 10:26:54 +05:30
Gonéri Le Bouder
8f14bf6c46 The type of wait_condition.status is str (#310)
The `wait_condition.status` key is a string.

- Use actually string in the documentation
- Use core's `boolean()` method to convert the value internally to
  boolean
2020-11-25 13:01:38 -06:00
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
1513bced36 test: k8s's merge_type expect a list (#309)
The `merge_type` parameter of `k8s` is a list, not a string.
2020-11-23 15:39:25 -05:00
Gonéri Le Bouder
fac0478293 molecule: clone the chart repos with depth=1 (#303) 2020-11-19 13:31:51 -05:00
Jeff Geerling
b97c5ce85b Update to latest version of kind action so kind cluster setup succeeds. (#306) 2020-11-18 11:32:02 -06:00
Abhijeet Kasurde
108efaf065 Properly format list in README.md (#302) 2020-11-11 14:39:25 +05:30
Abhijeet Kasurde
90a1c626a2 Fix CI (#301)
Missing variables in Chart local_path testing.
2020-11-11 10:29:10 +05:30
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
Abhijeet Kasurde
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
66494890ba Enable validate_certs test for kubernetes (#298)
Fixes: #24
2020-11-10 14:14:54 -05:00
Abhijeet Kasurde
e2d4cff952 Updated chart repo URLs (#297) 2020-11-10 14:13:09 -05:00
Abhijeet Kasurde
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
jaydesl
aad4696f20 Fix default configuration getter in client v12.0.0 (#276)
Fixes #273
2020-10-22 15:41:51 -04:00
Abhijeet Kasurde
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
Jeff Geerling
9a2e29acd2 Issue #263: Prepare for 1.1.1 release. (#268) 2020-10-09 13:46:20 -05:00
Jeff Geerling
d60a726e6d Fix sed command for README fix in downstream build. (#267) 2020-10-09 13:19:53 -05:00
Timothy Appnel
1486ffd6e6 Fixes #262 downstream.sh README page edits (#266) 2020-10-09 13:49:26 -04:00
Jeff Geerling
f01644a565 Fix the downstream build and release process (#259)
* Issue #254: Fix 'unbound variable' error with empty array.

* Issue #254: Make downstream-release work completely.

* Make sed commands cross-platform.
2020-10-09 11:06:55 -05:00
Jeff Geerling
cbd3a2554e Issue #260: Sanity test 'compile' failing because of positional args. (#261)
* Issue #260: Sanity test 'compile' failing because of positional args.

* Issue #260: Run integration tests on older Python 3.6 still.

* Issue #260: Add changelog fragment.
2020-10-09 10:17:52 -05:00
Jeff Geerling
9ff259c638 Issue #254: Prepare for 1.1.0 release. (#257)
* Issue #254: Add changelogs for 1.1.0.

* Issue #254: Two of the changes are major.

* Update CHANGELOG and galaxy tag version.

* Issue #254: Document kubernetes.core release process.
2020-10-08 15:35:42 -05:00
Timothy Appnel
f0dacc083c Embedded docs clarifications and refinements. (#258)
* Another embedded docs clarifications in k8s_rollback

* Embedded docs clarification in helm_pljugin_info

* Embedded docs clarification in k8s

* More embedded docs clarification in k8s inventory plugin

* Fixed markdown formatting to RST in k8s_rollback
2020-10-08 15:32:54 -05:00
Timothy Appnel
ef256060f1 Embedded docs clarification in k8s_rollback (#255) 2020-10-08 13:10:06 -04:00
Timothy Appnel
5fa34b6b60 Embedded docs clarification in helm_plugin 2020-10-08 13:09:21 -04:00
Timothy Appnel
784347703b Embedded docs clarification in k8s_cluster_info 2020-10-08 12:33:20 -04:00
Nathan Loika
50c82056b3 Add appVersion check to Helm (#247)
When upgrading a Helm release include the chart's appVersion in the idempotence check. Fixes #246
2020-10-07 16:40:59 -04:00
Timothy Appnel
b7ec6bf79d Fixes #250 by defining the FQCN connection plugin name to force using the one included in this collection (#252) 2020-10-07 15:58:03 -04:00
Julien Huon
0377a892d5 k8s_rollback: new module (#26)
This module allows user to rollback deployment and daemonsets.

Signed-off-by: Julien Huon <julien@huon.email>
2020-10-07 10:07:47 +05:30
Jeff Geerling
fc1f4e5ffd helm: Support for single or multiple values files (#236 was #136) 2020-10-05 13:19:36 -04:00
Abhijeet Kasurde
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
Gerald Spencer
7946b398a7 Return status in check mode (#192)
It is useful to return both the current values of the release, as well as the proposed values.
2020-09-29 14:09:43 -04:00
Fabian von Feilitzsch
0f3fef927e SelfSubjectAccessReviews now work with the k8s module (#237)
* SelfSubjectAccessReviews now work with the k8s module
2020-09-28 12:20:01 -04:00
Abhijeet Kasurde
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
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
f03d2ce243 k8s_info: Add support for wait (#235)
Fixes: #18
2020-09-28 10:52:00 +05:30
Timothy Appnel
70a4b068ff Fixed CHANGELOG underlining 2020-09-27 15:29:44 -04:00
Timothy Appnel
d06dfc37d4 Added release dates to CHANGELOG 2020-09-27 15:24:46 -04:00
tima
833ac7c4b0 Merge pull request #99 into main 2020-09-22 17:00:12 -04:00