mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-12 20:42:08 +00:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8feb564b4d | ||
|
|
42832bc9d2 | ||
|
|
19b2efd0dd | ||
|
|
1c3bf95b74 | ||
|
|
018c92429b | ||
|
|
9267e03538 | ||
|
|
eb3ab99709 | ||
|
|
a1ac6b99dc | ||
|
|
4ad57fdb6c | ||
|
|
ee9939c54f | ||
|
|
c1549db1bb | ||
|
|
c6bd8ab453 | ||
|
|
6299f242a2 | ||
|
|
cd55f596ab | ||
|
|
00bbf16cff | ||
|
|
31fd4058f1 | ||
|
|
5c748bd4e9 | ||
|
|
1c295560ba | ||
|
|
615d3d8bd0 | ||
|
|
4854d7fbd9 | ||
|
|
baa59f388c | ||
|
|
e071ae73b6 | ||
|
|
00cb40094a |
3
.config/ansible-lint-ignore.txt
Normal file
3
.config/ansible-lint-ignore.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# no-changed-when is not requried for examples
|
||||||
|
plugins/connection/kubectl.py no-changed-when
|
||||||
|
meta/runtime.yml meta-runtime[unsupported-version]
|
||||||
@@ -2,5 +2,7 @@
|
|||||||
profile: production
|
profile: production
|
||||||
|
|
||||||
exclude_paths:
|
exclude_paths:
|
||||||
|
- .ansible/
|
||||||
- tests/integration
|
- tests/integration
|
||||||
|
- tests/unit
|
||||||
- tests/sanity
|
- tests/sanity
|
||||||
60
.github/stale.yml
vendored
60
.github/stale.yml
vendored
@@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
# Configuration for probot-stale - https://github.com/probot/stale
|
|
||||||
|
|
||||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
|
||||||
daysUntilStale: 90
|
|
||||||
|
|
||||||
# Number of days of inactivity before an Issue or Pull Request with the stale
|
|
||||||
# label is closed. Set to false to disable. If disabled, issues still need to be
|
|
||||||
# closed manually, but will remain marked as stale.
|
|
||||||
daysUntilClose: 30
|
|
||||||
|
|
||||||
# Only issues or pull requests with all of these labels are check if stale.
|
|
||||||
# Defaults to `[]` (disabled)
|
|
||||||
onlyLabels: []
|
|
||||||
|
|
||||||
# Issues or Pull Requests with these labels will never be considered stale. Set
|
|
||||||
# to `[]` to disable
|
|
||||||
exemptLabels:
|
|
||||||
- security
|
|
||||||
- planned
|
|
||||||
- priority/critical
|
|
||||||
- lifecycle/frozen
|
|
||||||
- verified
|
|
||||||
|
|
||||||
# Set to true to ignore issues in a project (defaults to false)
|
|
||||||
exemptProjects: false
|
|
||||||
|
|
||||||
# Set to true to ignore issues in a milestone (defaults to false)
|
|
||||||
exemptMilestones: true
|
|
||||||
|
|
||||||
# Set to true to ignore issues with an assignee (defaults to false)
|
|
||||||
exemptAssignees: false
|
|
||||||
|
|
||||||
# Label to use when marking as stale
|
|
||||||
staleLabel: lifecycle/stale
|
|
||||||
|
|
||||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
|
||||||
limitPerRun: 30
|
|
||||||
|
|
||||||
pulls:
|
|
||||||
markComment: |-
|
|
||||||
PRs go stale after 90 days of inactivity.
|
|
||||||
If there is no further activity, the PR will be closed in another 30 days.
|
|
||||||
|
|
||||||
unmarkComment: >-
|
|
||||||
This pull request is no longer stale.
|
|
||||||
|
|
||||||
closeComment: >-
|
|
||||||
This pull request has been closed due to inactivity.
|
|
||||||
|
|
||||||
issues:
|
|
||||||
markComment: |-
|
|
||||||
Issues go stale after 90 days of inactivity.
|
|
||||||
If there is no further activity, the issue will be closed in another 30 days.
|
|
||||||
|
|
||||||
unmarkComment: >-
|
|
||||||
This issue is no longer stale.
|
|
||||||
|
|
||||||
closeComment: >-
|
|
||||||
This issue has been closed due to inactivity.
|
|
||||||
5
.github/workflows/linters.yaml
vendored
5
.github/workflows/linters.yaml
vendored
@@ -19,6 +19,5 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: run-ansible-lint
|
||||||
- name: Run ansible-lint
|
uses: ansible/ansible-lint@v24.12.2
|
||||||
uses: ansible/ansible-lint@v24.2.3
|
|
||||||
|
|||||||
@@ -4,6 +4,41 @@ Kubernetes Collection Release Notes
|
|||||||
|
|
||||||
.. contents:: Topics
|
.. contents:: Topics
|
||||||
|
|
||||||
|
v3.3.0
|
||||||
|
======
|
||||||
|
|
||||||
|
Minor Changes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- inventory/k8s.py - Defer removal of k8s inventory plugin to version 5.0 (https://github.com/ansible-collections/kubernetes.core/pull/723).
|
||||||
|
- inventory/k8s.py - Defer removal of k8s inventory plugin to version 6.0.0 (https://github.com/ansible-collections/kubernetes.core/pull/734).
|
||||||
|
- k8s_drain - Improve error message for pod disruption budget when draining a node (https://github.com/ansible-collections/kubernetes.core/issues/797).
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- helm - Helm version checks did not support RC versions. They now accept any version tags. (https://github.com/ansible-collections/kubernetes.core/pull/745).
|
||||||
|
- helm_pull - Apply no_log=True to pass_credentials to silence false positive warning.. (https://github.com/ansible-collections/kubernetes.core/pull/796).
|
||||||
|
- k8s_drain - Fix k8s_drain does not wait for single pod (https://github.com/ansible-collections/kubernetes.core/issues/769).
|
||||||
|
- k8s_drain - Fix k8s_drain runs into a timeout when evicting a pod which is part of a stateful set (https://github.com/ansible-collections/kubernetes.core/issues/792).
|
||||||
|
- kubeconfig option should not appear in module invocation log (https://github.com/ansible-collections/kubernetes.core/issues/782).
|
||||||
|
- kustomize - kustomize plugin fails with deprecation warnings (https://github.com/ansible-collections/kubernetes.core/issues/639).
|
||||||
|
- waiter - Fix waiting for daemonset when desired number of pods is 0. (https://github.com/ansible-collections/kubernetes.core/pull/756).
|
||||||
|
|
||||||
|
v3.2.0
|
||||||
|
======
|
||||||
|
|
||||||
|
Release Summary
|
||||||
|
---------------
|
||||||
|
|
||||||
|
This release comes with documentation updates.
|
||||||
|
|
||||||
|
Minor Changes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- connection/kubectl.py - Added an example of using the kubectl connection plugin to the documentation (https://github.com/ansible-collections/kubernetes.core/pull/741).
|
||||||
|
- inventory/k8s.py - Defer removal of k8s inventory plugin to version 6.0.0 (https://github.com/ansible-collections/kubernetes.core/pull/734).
|
||||||
|
|
||||||
v3.1.0
|
v3.1.0
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,5 +1,5 @@
|
|||||||
# Also needs to be updated in galaxy.yml
|
# Also needs to be updated in galaxy.yml
|
||||||
VERSION = 3.0.0
|
VERSION = 3.3.0
|
||||||
|
|
||||||
TEST_ARGS ?= ""
|
TEST_ARGS ?= ""
|
||||||
PYTHON_VERSION ?= `python -c 'import platform; print(".".join(platform.python_version_tuple()[0:2]))'`
|
PYTHON_VERSION ?= `python -c 'import platform; print(".".join(platform.python_version_tuple()[0:2]))'`
|
||||||
|
|||||||
62
README.md
62
README.md
@@ -4,10 +4,14 @@
|
|||||||
|
|
||||||
This repository hosts the `kubernetes.core` (formerly known as `community.kubernetes`) Ansible Collection.
|
This repository hosts the `kubernetes.core` (formerly known as `community.kubernetes`) Ansible Collection.
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
The collection includes a variety of Ansible content to help automate the management of applications in Kubernetes and OpenShift clusters, as well as the provisioning and maintenance of clusters themselves.
|
The collection includes a variety of Ansible content to help automate the management of applications in Kubernetes and OpenShift clusters, as well as the provisioning and maintenance of clusters themselves.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
<!--start requires_ansible-->
|
<!--start requires_ansible-->
|
||||||
## Ansible version compatibility
|
### Ansible version compatibility
|
||||||
|
|
||||||
This collection has been tested against following Ansible versions: **>=2.14.0**.
|
This collection has been tested against following Ansible versions: **>=2.14.0**.
|
||||||
|
|
||||||
@@ -18,43 +22,43 @@ A collection may contain metadata that identifies these versions.
|
|||||||
PEP440 is the schema used to describe the versions of Ansible.
|
PEP440 is the schema used to describe the versions of Ansible.
|
||||||
<!--end requires_ansible-->
|
<!--end requires_ansible-->
|
||||||
|
|
||||||
## Python Support
|
### Python Support
|
||||||
|
|
||||||
* Collection supports 3.9+
|
* Collection supports 3.9+
|
||||||
|
|
||||||
Note: Python2 is deprecated from [1st January 2020](https://www.python.org/doc/sunset-python-2/). Please switch to Python3.
|
Note: Python2 is deprecated from [1st January 2020](https://www.python.org/doc/sunset-python-2/). Please switch to Python3.
|
||||||
|
|
||||||
## Kubernetes Version Support
|
### Kubernetes Version Support
|
||||||
|
|
||||||
This collection supports Kubernetes versions >= 1.24.
|
This collection supports Kubernetes versions >= 1.24.
|
||||||
|
|
||||||
## Included content
|
### Included content
|
||||||
|
|
||||||
Click on the name of a plugin or module to view that content's documentation:
|
Click on the name of a plugin or module to view that content's documentation:
|
||||||
|
|
||||||
<!--start collection content-->
|
<!--start collection content-->
|
||||||
### Connection plugins
|
#### Connection plugins
|
||||||
Name | Description
|
Name | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
[kubernetes.core.kubectl](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.kubectl_connection.rst)|Execute tasks in pods running on Kubernetes.
|
[kubernetes.core.kubectl](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.kubectl_connection.rst)|Execute tasks in pods running on Kubernetes.
|
||||||
|
|
||||||
### K8s filter plugins
|
#### K8s filter plugins
|
||||||
Name | Description
|
Name | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
kubernetes.core.k8s_config_resource_name|Generate resource name for the given resource of type ConfigMap, Secret
|
kubernetes.core.k8s_config_resource_name|Generate resource name for the given resource of type ConfigMap, Secret
|
||||||
|
|
||||||
### Inventory plugins
|
#### Inventory plugins
|
||||||
Name | Description
|
Name | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
[kubernetes.core.k8s](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_inventory.rst)|Kubernetes (K8s) inventory source
|
[kubernetes.core.k8s](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_inventory.rst)|Kubernetes (K8s) inventory source
|
||||||
|
|
||||||
### Lookup plugins
|
#### Lookup plugins
|
||||||
Name | Description
|
Name | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
[kubernetes.core.k8s](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_lookup.rst)|Query the K8s API
|
[kubernetes.core.k8s](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_lookup.rst)|Query the K8s API
|
||||||
[kubernetes.core.kustomize](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.kustomize_lookup.rst)|Build a set of kubernetes resources using a 'kustomization.yaml' file.
|
[kubernetes.core.kustomize](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.kustomize_lookup.rst)|Build a set of kubernetes resources using a 'kustomization.yaml' file.
|
||||||
|
|
||||||
### Modules
|
#### Modules
|
||||||
Name | Description
|
Name | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
[kubernetes.core.helm](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.helm_module.rst)|Manages Kubernetes packages with the Helm package manager
|
[kubernetes.core.helm](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.helm_module.rst)|Manages Kubernetes packages with the Helm package manager
|
||||||
@@ -79,9 +83,7 @@ Name | Description
|
|||||||
|
|
||||||
<!--end collection content-->
|
<!--end collection content-->
|
||||||
|
|
||||||
## Installation and Usage
|
## Installation
|
||||||
|
|
||||||
### Installing the Collection from Ansible Galaxy
|
|
||||||
|
|
||||||
Before using the Kubernetes collection, you need to install it with the Ansible Galaxy CLI:
|
Before using the Kubernetes collection, you need to install it with the Ansible Galaxy CLI:
|
||||||
|
|
||||||
@@ -93,7 +95,7 @@ You can also include it in a `requirements.yml` file and install it via `ansible
|
|||||||
---
|
---
|
||||||
collections:
|
collections:
|
||||||
- name: kubernetes.core
|
- name: kubernetes.core
|
||||||
version: 3.0.0
|
version: 3.3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installing the Kubernetes Python Library
|
### Installing the Kubernetes Python Library
|
||||||
@@ -102,7 +104,7 @@ Content in this collection requires the [Kubernetes Python client](https://pypi.
|
|||||||
|
|
||||||
pip3 install kubernetes
|
pip3 install kubernetes
|
||||||
|
|
||||||
### Using modules from the Kubernetes Collection in your playbooks
|
## Use Cases
|
||||||
|
|
||||||
It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example `kubernetes.core.k8s_info`:
|
It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example `kubernetes.core.k8s_info`:
|
||||||
|
|
||||||
@@ -189,12 +191,16 @@ defined in the playbook using `environment` keyword as above, you must set it us
|
|||||||
|
|
||||||
Please read more about Ansible Turbo mode - [here](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/ansible_turbo_mode.rst).
|
Please read more about Ansible Turbo mode - [here](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/ansible_turbo_mode.rst).
|
||||||
|
|
||||||
## Testing and Development
|
## Contributing to this collection
|
||||||
|
|
||||||
If you want to develop new content for this collection or improve what's already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATHS`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there.
|
If you want to develop new content for this collection or improve what's already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATHS`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there.
|
||||||
|
|
||||||
See [Contributing to kubernetes.core](CONTRIBUTING.md).
|
See [Contributing to kubernetes.core](CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
[](https://github.com/ansible-collections/kubernetes.core/actions/workflows/linters.yaml) [](https://github.com/ansible-collections/kubernetes.core/actions/workflows/integration-tests.yaml) [](https://github.com/ansible-collections/kubernetes.core/actions/workflows/sanity-tests.yaml) [](https://github.com/ansible-collections/kubernetes.core/actions/workflows/unit-tests.yaml) [](https://app.codecov.io/gh/ansible-collections/kubernetes.core)
|
||||||
|
|
||||||
### Testing with `ansible-test`
|
### Testing with `ansible-test`
|
||||||
|
|
||||||
The `tests` directory contains configuration for running sanity and integration tests using [`ansible-test`](https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html).
|
The `tests` directory contains configuration for running sanity and integration tests using [`ansible-test`](https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html).
|
||||||
@@ -231,10 +237,36 @@ After the version is published, verify it exists on the [Kubernetes Collection G
|
|||||||
|
|
||||||
The process for uploading a supported release to Automation Hub is documented separately.
|
The process for uploading a supported release to Automation Hub is documented separately.
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
<!--List available communication channels. In addition to channels specific to your collection, we also recommend to use the following ones.-->
|
||||||
|
|
||||||
|
We announce releases and important changes through Ansible's [The Bullhorn newsletter](https://github.com/ansible/community/wiki/News#the-bullhorn). Be sure you are [subscribed](https://eepurl.com/gZmiEP).
|
||||||
|
|
||||||
|
We take part in the global quarterly [Ansible Contributor Summit](https://github.com/ansible/community/wiki/Contributor-Summit) virtually or in-person. Track [The Bullhorn newsletter](https://eepurl.com/gZmiEP) and join us.
|
||||||
|
|
||||||
|
For more information about communication, refer to the [Ansible Communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
|
||||||
|
|
||||||
|
For the latest supported versions, refer to the release notes below.
|
||||||
|
|
||||||
|
If you encounter issues or have questions, you can submit a support request through the following channels:
|
||||||
|
- GitHub Issues: Report bugs, request features, or ask questions by opening an issue in the [GitHub repository]((https://github.com/ansible-collections/kubernetes.core/).
|
||||||
|
|
||||||
|
## Release notes
|
||||||
|
|
||||||
|
See the [raw generated changelog](https://github.com/ansible-collections/kubernetes.core/blob/main/CHANGELOG.rst).
|
||||||
|
|
||||||
## More Information
|
## More Information
|
||||||
|
|
||||||
For more information about Ansible's Kubernetes integration, join the `#ansible-kubernetes` channel on [libera.chat](https://libera.chat/) IRC, and browse the resources in the [Kubernetes Working Group](https://github.com/ansible/community/wiki/Kubernetes) Community wiki page.
|
For more information about Ansible's Kubernetes integration, join the `#ansible-kubernetes` channel on [libera.chat](https://libera.chat/) IRC, and browse the resources in the [Kubernetes Working Group](https://github.com/ansible/community/wiki/Kubernetes) Community wiki page.
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
We follow the [Ansible Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html) in all our interactions within this project.
|
||||||
|
|
||||||
|
If you encounter abusive behavior, please refer to the [policy violations](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html#policy-violations) section of the Code for information on how to raise a complaint.
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
GNU General Public License v3.0 or later
|
GNU General Public License v3.0 or later
|
||||||
|
|||||||
@@ -854,3 +854,48 @@ releases:
|
|||||||
- 652-fix-json-patch-action.yml
|
- 652-fix-json-patch-action.yml
|
||||||
- 654-helm-expand-user.yml
|
- 654-helm-expand-user.yml
|
||||||
release_date: '2024-05-16'
|
release_date: '2024-05-16'
|
||||||
|
3.2.0:
|
||||||
|
changes:
|
||||||
|
minor_changes:
|
||||||
|
- connection/kubectl.py - Added an example of using the kubectl connection plugin
|
||||||
|
to the documentation (https://github.com/ansible-collections/kubernetes.core/pull/741).
|
||||||
|
- inventory/k8s.py - Defer removal of k8s inventory plugin to version 6.0.0
|
||||||
|
(https://github.com/ansible-collections/kubernetes.core/pull/734).
|
||||||
|
- inventory/k8s.py - Defer removal of k8s inventory plugin to version 5.0 (https://github.com/ansible-collections/kubernetes.core/pull/723).
|
||||||
|
release_summary: This release comes with documentation updates.
|
||||||
|
fragments:
|
||||||
|
- 20240530-defer-removal-and-ansible-core-support-update.yaml
|
||||||
|
- 20240601-doc-example-of-using-kubectl.yaml
|
||||||
|
- inventory-update_removal_date.yml
|
||||||
|
- 3.2.0.yml
|
||||||
|
release_date: '2024-06-14'
|
||||||
|
3.3.0:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- helm - Helm version checks did not support RC versions. They now accept any
|
||||||
|
version tags. (https://github.com/ansible-collections/kubernetes.core/pull/745).
|
||||||
|
- helm_pull - Apply no_log=True to pass_credentials to silence false positive
|
||||||
|
warning. (https://github.com/ansible-collections/kubernetes.core/pull/796).
|
||||||
|
- k8s_drain - Fix k8s_drain does not wait for single pod (https://github.com/ansible-collections/kubernetes.core/issues/769).
|
||||||
|
- k8s_drain - Fix k8s_drain runs into a timeout when evicting a pod which is
|
||||||
|
part of a stateful set (https://github.com/ansible-collections/kubernetes.core/issues/792).
|
||||||
|
- kubeconfig option should not appear in module invocation log (https://github.com/ansible-collections/kubernetes.core/issues/782).
|
||||||
|
- kustomize - kustomize plugin fails with deprecation warnings (https://github.com/ansible-collections/kubernetes.core/issues/639).
|
||||||
|
- waiter - Fix waiting for daemonset when desired number of pods is 0. (https://github.com/ansible-collections/kubernetes.core/pull/756).
|
||||||
|
minor_changes:
|
||||||
|
- k8s_drain - Improve error message for pod disruption budget when draining
|
||||||
|
a node (https://github.com/ansible-collections/kubernetes.core/issues/797).
|
||||||
|
release_summary: This release comes with improvements to the error messages in the k8s_drain module and several bug fixes.
|
||||||
|
fragments:
|
||||||
|
- 20240530-ansible-core-support-update.yaml
|
||||||
|
- 20240611-helm-rc-version.yaml
|
||||||
|
- 20240620-fix-kustomize-plugin-fails-with-deprecation-warnings.yml
|
||||||
|
- 20241102-fix-ci-post-2.18-issue.yaml
|
||||||
|
- 20241213-kubeconfig-set-no_log-true.yaml
|
||||||
|
- 756-fix-daemonset-waiting.yaml
|
||||||
|
- 770-fix-k8s-drain-doesnt-wait-for-single-pod.yaml
|
||||||
|
- 793-fix-k8s-drain-runs-into-timeout.yaml
|
||||||
|
- 796-false-positive-helmull.yaml
|
||||||
|
- 798-drain-pdb-error-message.yaml
|
||||||
|
- readme_template_update.yml
|
||||||
|
release_date: '2025-01-22'
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ Parameters
|
|||||||
<div style="font-size: small">
|
<div style="font-size: small">
|
||||||
<span style="color: purple">boolean</span>
|
<span style="color: purple">boolean</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-style: italic; font-size: small; color: darkgreen">added in 2.5.0</div>
|
<div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||||
@@ -463,7 +463,7 @@ Parameters
|
|||||||
<div style="font-size: small">
|
<div style="font-size: small">
|
||||||
<span style="color: purple">boolean</span>
|
<span style="color: purple">boolean</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-style: italic; font-size: small; color: darkgreen">added in 2.5.0</div>
|
<div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ Parameters
|
|||||||
<span style="color: purple">list</span>
|
<span style="color: purple">list</span>
|
||||||
/ <span style="color: purple">elements=string</span>
|
/ <span style="color: purple">elements=string</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-style: italic; font-size: small; color: darkgreen">added in 2.5.0</div>
|
<div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ Parameters
|
|||||||
<span style="color: purple">list</span>
|
<span style="color: purple">list</span>
|
||||||
/ <span style="color: purple">elements=string</span>
|
/ <span style="color: purple">elements=string</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-style: italic; font-size: small; color: darkgreen">added in 2.5.0</div>
|
<div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ DEPRECATED
|
|||||||
----------
|
----------
|
||||||
:Removed in collection release after
|
:Removed in collection release after
|
||||||
:Why: As discussed in https://github.com/ansible-collections/kubernetes.core/issues/31, we decided to
|
:Why: As discussed in https://github.com/ansible-collections/kubernetes.core/issues/31, we decided to
|
||||||
remove the k8s inventory plugin in release 4.0.0.
|
remove the k8s inventory plugin in release 6.0.0.
|
||||||
|
|
||||||
:Alternative: Use :ref:`kubernetes.core.k8s_info <kubernetes.core.k8s_info_module>` and :ref:`ansible.builtin.add_host <ansible.builtin.add_host_module>` instead.
|
:Alternative: Use :ref:`kubernetes.core.k8s_info <kubernetes.core.k8s_info_module>` and :ref:`ansible.builtin.add_host <ansible.builtin.add_host_module>` instead.
|
||||||
|
|
||||||
@@ -357,7 +357,7 @@ Status
|
|||||||
------
|
------
|
||||||
|
|
||||||
|
|
||||||
- This inventory will be removed in version 4.0.0. *[deprecated]*
|
- This inventory will be removed in version 6.0.0. *[deprecated]*
|
||||||
- For more information see `DEPRECATED`_.
|
- For more information see `DEPRECATED`_.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ Parameters
|
|||||||
<div style="font-size: small">
|
<div style="font-size: small">
|
||||||
<span style="color: purple">boolean</span>
|
<span style="color: purple">boolean</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-style: italic; font-size: small; color: darkgreen">added in 2.5.0</div>
|
<div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||||
@@ -389,7 +389,7 @@ Parameters
|
|||||||
<span style="color: purple">list</span>
|
<span style="color: purple">list</span>
|
||||||
/ <span style="color: purple">elements=string</span>
|
/ <span style="color: purple">elements=string</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-style: italic; font-size: small; color: darkgreen">added in 2.5.0</div>
|
<div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -365,6 +365,82 @@ Parameters
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Examples
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
- name: Run a command in a pod using local kubectl with kubeconfig file ~/.kube/config
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: no
|
||||||
|
vars:
|
||||||
|
ansible_connection: kubernetes.core.kubectl
|
||||||
|
ansible_kubectl_namespace: my-namespace
|
||||||
|
ansible_kubectl_pod: my-pod
|
||||||
|
ansible_kubectl_container: my-container
|
||||||
|
tasks:
|
||||||
|
# be aware that the command is executed as the user that started the container
|
||||||
|
# and requires python to be installed in the image
|
||||||
|
- name: Run a command in a pod
|
||||||
|
ansible.builtin.command: echo "Hello, World!"
|
||||||
|
|
||||||
|
- name: Run a command in a pod using local kubectl with inventory variables
|
||||||
|
# Example inventory:
|
||||||
|
# k8s:
|
||||||
|
# hosts:
|
||||||
|
# foo.example.com:
|
||||||
|
# ansible_connection: kubernetes.core.kubectl
|
||||||
|
# ansible_kubectl_kubeconfig: /root/.kube/foo.example.com.config
|
||||||
|
# ansible_kubectl_pod: my-foo-pod
|
||||||
|
# ansible_kubectl_container: my-foo-container
|
||||||
|
# ansible_kubectl_namespace: my-foo-namespace
|
||||||
|
# bar.example.com:
|
||||||
|
# ansible_connection: kubernetes.core.kubectl
|
||||||
|
# ansible_kubectl_kubeconfig: /root/.kube/bar.example.com.config
|
||||||
|
# ansible_kubectl_pod: my-bar-pod
|
||||||
|
# ansible_kubectl_container: my-bar-container
|
||||||
|
# ansible_kubectl_namespace: my-bar-namespace
|
||||||
|
hosts: k8s
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
# be aware that the command is executed as the user that started the container
|
||||||
|
# and requires python to be installed in the image
|
||||||
|
- name: Run a command in a pod
|
||||||
|
ansible.builtin.command: echo "Hello, World!"
|
||||||
|
|
||||||
|
- name: Run a command in a pod using dynamic inventory
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: no
|
||||||
|
vars:
|
||||||
|
kubeconfig: /root/.kube/config
|
||||||
|
namespace: my-namespace
|
||||||
|
my_app: my-app
|
||||||
|
tasks:
|
||||||
|
- name: Get My App pod info based on label
|
||||||
|
kubernetes.core.k8s_info:
|
||||||
|
kubeconfig: "{{ kubeconfig }}"
|
||||||
|
namespace: "{{ namespace }}"
|
||||||
|
kind: Pod
|
||||||
|
label_selectors: app.kubernetes.io/name = "{{ my_app }}"
|
||||||
|
register: my_app_pod
|
||||||
|
|
||||||
|
- name: Get My App pod name
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
my_app_pod_name: "{{ my_app_pod.resources[0].metadata.name }}"
|
||||||
|
|
||||||
|
- name: Add My App pod to inventory
|
||||||
|
ansible.builtin.add_host:
|
||||||
|
name: "{{ my_app_pod_name }}"
|
||||||
|
ansible_connection: kubernetes.core.kubectl
|
||||||
|
ansible_kubectl_kubeconfig: "{{ kubeconfig }}"
|
||||||
|
ansible_kubectl_pod: "{{ my_app_pod_name }}"
|
||||||
|
ansible_kubectl_namespace: "{{ namespace }}"
|
||||||
|
|
||||||
|
- name: Run a command in My App pod
|
||||||
|
# be aware that the command is executed as the user that started the container
|
||||||
|
# and requires python to be installed in the image
|
||||||
|
ansible.builtin.command: echo "Hello, World!"
|
||||||
|
delegate_to: "{{ my_app_pod_name }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ tags:
|
|||||||
- openshift
|
- openshift
|
||||||
- okd
|
- okd
|
||||||
- cluster
|
- cluster
|
||||||
version: 3.1.0
|
version: 3.3.0
|
||||||
build_ignore:
|
build_ignore:
|
||||||
- .DS_Store
|
- .DS_Store
|
||||||
- "*.tar.gz"
|
- "*.tar.gz"
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ plugin_routing:
|
|||||||
redirect: community.okd.openshift
|
redirect: community.okd.openshift
|
||||||
k8s:
|
k8s:
|
||||||
deprecation:
|
deprecation:
|
||||||
removal_version: 4.0.0
|
removal_version: 6.0.0
|
||||||
warning_text: >-
|
warning_text: >-
|
||||||
The k8s inventory plugin has been deprecated and
|
The k8s inventory plugin has been deprecated and
|
||||||
will be removed in release 4.0.0.
|
will be removed in release 6.0.0.
|
||||||
modules:
|
modules:
|
||||||
k8s_auth:
|
k8s_auth:
|
||||||
redirect: community.okd.k8s_auth
|
redirect: community.okd.k8s_auth
|
||||||
|
|||||||
@@ -181,6 +181,81 @@ DOCUMENTATION = r"""
|
|||||||
aliases: [ kubectl_verify_ssl ]
|
aliases: [ kubectl_verify_ssl ]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
EXAMPLES = r"""
|
||||||
|
|
||||||
|
- name: Run a command in a pod using local kubectl with kubeconfig file ~/.kube/config
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: no
|
||||||
|
vars:
|
||||||
|
ansible_connection: kubernetes.core.kubectl
|
||||||
|
ansible_kubectl_namespace: my-namespace
|
||||||
|
ansible_kubectl_pod: my-pod
|
||||||
|
ansible_kubectl_container: my-container
|
||||||
|
tasks:
|
||||||
|
# be aware that the command is executed as the user that started the container
|
||||||
|
# and requires python to be installed in the image
|
||||||
|
- name: Run a command in a pod
|
||||||
|
ansible.builtin.command: echo "Hello, World!"
|
||||||
|
|
||||||
|
- name: Run a command in a pod using local kubectl with inventory variables
|
||||||
|
# Example inventory:
|
||||||
|
# k8s:
|
||||||
|
# hosts:
|
||||||
|
# foo.example.com:
|
||||||
|
# ansible_connection: kubernetes.core.kubectl
|
||||||
|
# ansible_kubectl_kubeconfig: /root/.kube/foo.example.com.config
|
||||||
|
# ansible_kubectl_pod: my-foo-pod
|
||||||
|
# ansible_kubectl_container: my-foo-container
|
||||||
|
# ansible_kubectl_namespace: my-foo-namespace
|
||||||
|
# bar.example.com:
|
||||||
|
# ansible_connection: kubernetes.core.kubectl
|
||||||
|
# ansible_kubectl_kubeconfig: /root/.kube/bar.example.com.config
|
||||||
|
# ansible_kubectl_pod: my-bar-pod
|
||||||
|
# ansible_kubectl_container: my-bar-container
|
||||||
|
# ansible_kubectl_namespace: my-bar-namespace
|
||||||
|
hosts: k8s
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
# be aware that the command is executed as the user that started the container
|
||||||
|
# and requires python to be installed in the image
|
||||||
|
- name: Run a command in a pod
|
||||||
|
ansible.builtin.command: echo "Hello, World!"
|
||||||
|
|
||||||
|
- name: Run a command in a pod using dynamic inventory
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: no
|
||||||
|
vars:
|
||||||
|
kubeconfig: /root/.kube/config
|
||||||
|
namespace: my-namespace
|
||||||
|
my_app: my-app
|
||||||
|
tasks:
|
||||||
|
- name: Get My App pod info based on label
|
||||||
|
kubernetes.core.k8s_info:
|
||||||
|
kubeconfig: "{{ kubeconfig }}"
|
||||||
|
namespace: "{{ namespace }}"
|
||||||
|
kind: Pod
|
||||||
|
label_selectors: app.kubernetes.io/name = "{{ my_app }}"
|
||||||
|
register: my_app_pod
|
||||||
|
|
||||||
|
- name: Get My App pod name
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
my_app_pod_name: "{{ my_app_pod.resources[0].metadata.name }}"
|
||||||
|
|
||||||
|
- name: Add My App pod to inventory
|
||||||
|
ansible.builtin.add_host:
|
||||||
|
name: "{{ my_app_pod_name }}"
|
||||||
|
ansible_connection: kubernetes.core.kubectl
|
||||||
|
ansible_kubectl_kubeconfig: "{{ kubeconfig }}"
|
||||||
|
ansible_kubectl_pod: "{{ my_app_pod_name }}"
|
||||||
|
ansible_kubectl_namespace: "{{ namespace }}"
|
||||||
|
|
||||||
|
- name: Run a command in My App pod
|
||||||
|
# be aware that the command is executed as the user that started the container
|
||||||
|
# and requires python to be installed in the image
|
||||||
|
ansible.builtin.command: echo "Hello, World!"
|
||||||
|
delegate_to: "{{ my_app_pod_name }}"
|
||||||
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ DOCUMENTATION = """
|
|||||||
- Uses k8s.(yml|yaml) YAML configuration file to set parameter values.
|
- Uses k8s.(yml|yaml) YAML configuration file to set parameter values.
|
||||||
|
|
||||||
deprecated:
|
deprecated:
|
||||||
removed_in: 4.0.0
|
removed_in: 6.0.0
|
||||||
why: |
|
why: |
|
||||||
As discussed in U(https://github.com/ansible-collections/kubernetes.core/issues/31), we decided to
|
As discussed in U(https://github.com/ansible-collections/kubernetes.core/issues/31), we decided to
|
||||||
remove the k8s inventory plugin in release 4.0.0.
|
remove the k8s inventory plugin in release 6.0.0.
|
||||||
alternative: "Use M(kubernetes.core.k8s_info) and M(ansible.builtin.add_host) instead."
|
alternative: "Use M(kubernetes.core.k8s_info) and M(ansible.builtin.add_host) instead."
|
||||||
|
|
||||||
options:
|
options:
|
||||||
@@ -164,8 +164,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||||||
super(InventoryModule, self).parse(inventory, loader, path)
|
super(InventoryModule, self).parse(inventory, loader, path)
|
||||||
|
|
||||||
self.display.deprecated(
|
self.display.deprecated(
|
||||||
"The 'k8s' inventory plugin has been deprecated and will be removed in release 4.0.0",
|
"The 'k8s' inventory plugin has been deprecated and will be removed in release 6.0.0",
|
||||||
version="4.0.0",
|
version="6.0.0",
|
||||||
collection_name="kubernetes.core",
|
collection_name="kubernetes.core",
|
||||||
)
|
)
|
||||||
cache_key = self._get_cache_prefix(path)
|
cache_key = self._get_cache_prefix(path)
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ def get_binary_from_path(name, opt_dirs=None):
|
|||||||
|
|
||||||
def run_command(command):
|
def run_command(command):
|
||||||
cmd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
cmd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
return cmd.communicate()
|
stdout, stderr = cmd.communicate()
|
||||||
|
return cmd.returncode, stdout, stderr
|
||||||
|
|
||||||
|
|
||||||
class LookupModule(LookupBase):
|
class LookupModule(LookupBase):
|
||||||
@@ -140,9 +141,18 @@ class LookupModule(LookupBase):
|
|||||||
if enable_helm:
|
if enable_helm:
|
||||||
command += ["--enable-helm"]
|
command += ["--enable-helm"]
|
||||||
|
|
||||||
(out, err) = run_command(command)
|
(ret, out, err) = run_command(command)
|
||||||
if err:
|
if ret != 0:
|
||||||
raise AnsibleLookupError(
|
if err:
|
||||||
"kustomize command failed with: {0}".format(err.decode("utf-8"))
|
raise AnsibleLookupError(
|
||||||
)
|
"kustomize command failed. exit code: {0}, error: {1}".format(
|
||||||
|
ret, err.decode("utf-8")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
raise AnsibleLookupError(
|
||||||
|
"kustomize command failed with unknown error. exit code: {0}".format(
|
||||||
|
ret
|
||||||
|
)
|
||||||
|
)
|
||||||
return [out.decode("utf-8")]
|
return [out.decode("utf-8")]
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ AUTH_PROXY_HEADERS_SPEC = dict(
|
|||||||
)
|
)
|
||||||
|
|
||||||
AUTH_ARG_SPEC = {
|
AUTH_ARG_SPEC = {
|
||||||
"kubeconfig": {"type": "raw"},
|
"kubeconfig": {"type": "raw", "no_log": True},
|
||||||
"context": {},
|
"context": {},
|
||||||
"host": {},
|
"host": {},
|
||||||
"api_key": {"no_log": True},
|
"api_key": {"no_log": True},
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ def write_temp_kubeconfig(server, validate_certs=True, ca_cert=None, kubeconfig=
|
|||||||
|
|
||||||
|
|
||||||
class AnsibleHelmModule(object):
|
class AnsibleHelmModule(object):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
An Ansible module class for Kubernetes.core helm modules
|
An Ansible module class for Kubernetes.core helm modules
|
||||||
"""
|
"""
|
||||||
@@ -184,10 +183,10 @@ class AnsibleHelmModule(object):
|
|||||||
def get_helm_version(self):
|
def get_helm_version(self):
|
||||||
command = self.get_helm_binary() + " version"
|
command = self.get_helm_binary() + " version"
|
||||||
rc, out, err = self.run_command(command)
|
rc, out, err = self.run_command(command)
|
||||||
m = re.match(r'version.BuildInfo{Version:"v([0-9\.]*)",', out)
|
m = re.match(r'version.BuildInfo{Version:"v(.*?)",', out)
|
||||||
if m:
|
if m:
|
||||||
return m.group(1)
|
return m.group(1)
|
||||||
m = re.match(r'Client: &version.Version{SemVer:"v([0-9\.]*)", ', out)
|
m = re.match(r'Client: &version.Version{SemVer:"v(.*?)", ', out)
|
||||||
if m:
|
if m:
|
||||||
return m.group(1)
|
return m.group(1)
|
||||||
return None
|
return None
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ HELM_AUTH_ARG_SPEC = dict(
|
|||||||
type="raw",
|
type="raw",
|
||||||
aliases=["kubeconfig_path"],
|
aliases=["kubeconfig_path"],
|
||||||
fallback=(env_fallback, ["K8S_AUTH_KUBECONFIG"]),
|
fallback=(env_fallback, ["K8S_AUTH_KUBECONFIG"]),
|
||||||
|
no_log=True,
|
||||||
),
|
),
|
||||||
host=dict(type="str", fallback=(env_fallback, ["K8S_AUTH_HOST"])),
|
host=dict(type="str", fallback=(env_fallback, ["K8S_AUTH_HOST"])),
|
||||||
ca_cert=dict(
|
ca_cert=dict(
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ def daemonset_ready(daemonset: ResourceInstance) -> bool:
|
|||||||
return bool(
|
return bool(
|
||||||
daemonset.status
|
daemonset.status
|
||||||
and daemonset.status.desiredNumberScheduled is not None
|
and daemonset.status.desiredNumberScheduled is not None
|
||||||
and daemonset.status.updatedNumberScheduled
|
and (daemonset.status.updatedNumberScheduled or 0)
|
||||||
== daemonset.status.desiredNumberScheduled
|
== daemonset.status.desiredNumberScheduled
|
||||||
and daemonset.status.numberReady == daemonset.status.desiredNumberScheduled
|
and daemonset.status.numberReady == daemonset.status.desiredNumberScheduled
|
||||||
and daemonset.status.observedGeneration == daemonset.metadata.generation
|
and daemonset.status.observedGeneration == daemonset.metadata.generation
|
||||||
|
|||||||
@@ -137,14 +137,14 @@ options:
|
|||||||
- If I(reset_values) is set to C(True), this is ignored.
|
- If I(reset_values) is set to C(True), this is ignored.
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
version_added: 2.5.0
|
version_added: 3.0.0
|
||||||
reset_values:
|
reset_values:
|
||||||
description:
|
description:
|
||||||
- When upgrading package, reset the values to the ones built into the chart.
|
- When upgrading package, reset the values to the ones built into the chart.
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
default: True
|
default: True
|
||||||
version_added: 2.5.0
|
version_added: 3.0.0
|
||||||
|
|
||||||
#Helm options
|
#Helm options
|
||||||
disable_hook:
|
disable_hook:
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ def main():
|
|||||||
repo_password=dict(
|
repo_password=dict(
|
||||||
type="str", no_log=True, aliases=["password", "chart_repo_password"]
|
type="str", no_log=True, aliases=["password", "chart_repo_password"]
|
||||||
),
|
),
|
||||||
pass_credentials=dict(type="bool", default=False),
|
pass_credentials=dict(type="bool", default=False, no_log=False),
|
||||||
skip_tls_certs_check=dict(type="bool", default=False),
|
skip_tls_certs_check=dict(type="bool", default=False),
|
||||||
chart_devel=dict(type="bool"),
|
chart_devel=dict(type="bool"),
|
||||||
untar_chart=dict(type="bool", default=False),
|
untar_chart=dict(type="bool", default=False),
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ options:
|
|||||||
- This parameter can be used with C(label_selectors) to restrict the resources to be deleted.
|
- This parameter can be used with C(label_selectors) to restrict the resources to be deleted.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
version_added: 2.5.0
|
version_added: 3.0.0
|
||||||
aliases:
|
aliases:
|
||||||
- all
|
- all
|
||||||
hidden_fields:
|
hidden_fields:
|
||||||
@@ -192,7 +192,7 @@ options:
|
|||||||
- Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
|
- Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
version_added: 2.5.0
|
version_added: 3.0.0
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 3.9"
|
- "python >= 3.9"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ options:
|
|||||||
- This option has effect only when C(state) is set to I(drain).
|
- This option has effect only when C(state) is set to I(drain).
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
version_added: 2.5.0
|
version_added: 3.0.0
|
||||||
aliases:
|
aliases:
|
||||||
- label_selectors
|
- label_selectors
|
||||||
delete_options:
|
delete_options:
|
||||||
@@ -143,6 +143,7 @@ result:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
import json
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@@ -187,6 +188,17 @@ except ImportError:
|
|||||||
HAS_EVICTION_API = False
|
HAS_EVICTION_API = False
|
||||||
|
|
||||||
|
|
||||||
|
def format_dynamic_api_exc(exc):
|
||||||
|
if exc.body:
|
||||||
|
if exc.headers and exc.headers.get("Content-Type") == "application/json":
|
||||||
|
message = json.loads(exc.body).get("message")
|
||||||
|
if message:
|
||||||
|
return message
|
||||||
|
return exc.body
|
||||||
|
else:
|
||||||
|
return "%s Reason: %s" % (exc.status, exc.reason)
|
||||||
|
|
||||||
|
|
||||||
def filter_pods(pods, force, ignore_daemonset, delete_emptydir_data):
|
def filter_pods(pods, force, ignore_daemonset, delete_emptydir_data):
|
||||||
k8s_kind_mirror = "kubernetes.io/config.mirror"
|
k8s_kind_mirror = "kubernetes.io/config.mirror"
|
||||||
daemonSet, unmanaged, mirror, localStorage, to_delete = [], [], [], [], []
|
daemonSet, unmanaged, mirror, localStorage, to_delete = [], [], [], [], []
|
||||||
@@ -291,16 +303,19 @@ class K8sDrainAnsible(object):
|
|||||||
return (datetime.now() - start).seconds
|
return (datetime.now() - start).seconds
|
||||||
|
|
||||||
response = None
|
response = None
|
||||||
pod = pods.pop()
|
pod = None
|
||||||
while (_elapsed_time() < wait_timeout or wait_timeout == 0) and pods:
|
while (_elapsed_time() < wait_timeout or wait_timeout == 0) and pods:
|
||||||
if not pod:
|
if not pod:
|
||||||
pod = pods.pop()
|
pod = pods[-1]
|
||||||
try:
|
try:
|
||||||
response = self._api_instance.read_namespaced_pod(
|
response = self._api_instance.read_namespaced_pod(
|
||||||
namespace=pod[0], name=pod[1]
|
namespace=pod[0], name=pod[1]
|
||||||
)
|
)
|
||||||
if not response:
|
if not response or response.spec.node_name != self._module.params.get(
|
||||||
|
"name"
|
||||||
|
):
|
||||||
pod = None
|
pod = None
|
||||||
|
del pods[-1]
|
||||||
time.sleep(wait_sleep)
|
time.sleep(wait_sleep)
|
||||||
except ApiException as exc:
|
except ApiException as exc:
|
||||||
if exc.reason != "Not Found":
|
if exc.reason != "Not Found":
|
||||||
@@ -308,6 +323,7 @@ class K8sDrainAnsible(object):
|
|||||||
msg="Exception raised: {0}".format(exc.reason)
|
msg="Exception raised: {0}".format(exc.reason)
|
||||||
)
|
)
|
||||||
pod = None
|
pod = None
|
||||||
|
del pods[-1]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self._module.fail_json(msg="Exception raised: {0}".format(to_native(e)))
|
self._module.fail_json(msg="Exception raised: {0}".format(to_native(e)))
|
||||||
if not pods:
|
if not pods:
|
||||||
@@ -334,7 +350,7 @@ class K8sDrainAnsible(object):
|
|||||||
if exc.reason != "Not Found":
|
if exc.reason != "Not Found":
|
||||||
self._module.fail_json(
|
self._module.fail_json(
|
||||||
msg="Failed to delete pod {0}/{1} due to: {2}".format(
|
msg="Failed to delete pod {0}/{1} due to: {2}".format(
|
||||||
namespace, name, exc.reason
|
namespace, name, to_native(format_dynamic_api_exc(exc))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ options:
|
|||||||
- Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
|
- Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
version_added: 2.5.0
|
version_added: 3.0.0
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- kubernetes.core.k8s_auth_options
|
- kubernetes.core.k8s_auth_options
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
loop_var: helm_version
|
loop_var: helm_version
|
||||||
with_items:
|
with_items:
|
||||||
- "v3.7.0"
|
- "v3.8.0"
|
||||||
|
|||||||
@@ -17,8 +17,7 @@
|
|||||||
- name: Initial chart installation
|
- name: Initial chart installation
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
chart_ref: redis
|
chart_ref: oci://registry-1.docker.io/bitnamicharts/redis
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
|
||||||
release_name: test-redis
|
release_name: test-redis
|
||||||
release_namespace: "{{ helm_namespace }}"
|
release_namespace: "{{ helm_namespace }}"
|
||||||
create_namespace: true
|
create_namespace: true
|
||||||
@@ -42,8 +41,7 @@
|
|||||||
- name: Upgrade chart using reuse_values=true
|
- name: Upgrade chart using reuse_values=true
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
chart_ref: redis
|
chart_ref: oci://registry-1.docker.io/bitnamicharts/redis
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
|
||||||
release_name: test-redis
|
release_name: test-redis
|
||||||
release_namespace: "{{ helm_namespace }}"
|
release_namespace: "{{ helm_namespace }}"
|
||||||
reuse_values: true
|
reuse_values: true
|
||||||
|
|||||||
@@ -374,8 +374,8 @@
|
|||||||
chart_ref: "{{ chart_source }}"
|
chart_ref: "{{ chart_source }}"
|
||||||
chart_version: "{{ chart_source_version | default(omit) }}"
|
chart_version: "{{ chart_source_version | default(omit) }}"
|
||||||
disable_hook: True
|
disable_hook: True
|
||||||
release_name: "MyRelease"
|
release_name: "myrelease"
|
||||||
release_namespace: "MyReleaseNamespace"
|
release_namespace: "myreleasenamespace"
|
||||||
show_only:
|
show_only:
|
||||||
- "templates/configmap.yaml"
|
- "templates/configmap.yaml"
|
||||||
release_values:
|
release_values:
|
||||||
@@ -388,7 +388,7 @@
|
|||||||
- result is changed
|
- result is changed
|
||||||
- result is not failed
|
- result is not failed
|
||||||
- result.rc == 0
|
- result.rc == 0
|
||||||
- result.command is match("{{ helm_binary }} template MyRelease {{ chart_source }}")
|
- result.command is match(helm_binary+" template myrelease "+chart_source)
|
||||||
- result.stdout is search("ThisValue")
|
- result.stdout is search("ThisValue")
|
||||||
when: chart_source is search("test-chart")
|
when: chart_source is search("test-chart")
|
||||||
# limit assertion of test result to controlled (local) chart_source
|
# limit assertion of test result to controlled (local) chart_source
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: test-chart-deployment-time
|
||||||
|
description: A chart with a config map containing the deployment time in data
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "default"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ default "ansible-configmap" .Values.myConfigmapName }}
|
||||||
|
data:
|
||||||
|
myValue: {{ default "test" .Values.myValue }}
|
||||||
|
deploymentTime: {{ now }}
|
||||||
@@ -2,3 +2,4 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- remove_namespace
|
- remove_namespace
|
||||||
- install_helm
|
- install_helm
|
||||||
|
- setup_helm_registry
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
- name: Test helm diff functionality
|
- name: Test helm diff functionality
|
||||||
vars:
|
vars:
|
||||||
test_chart_ref: "/tmp/test-chart"
|
test_chart_ref: "/tmp/test-chart"
|
||||||
redis_chart_version: '17.0.5'
|
|
||||||
|
|
||||||
block:
|
block:
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@
|
|||||||
name: test-chart
|
name: test-chart
|
||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
chart_ref: "{{ test_chart_ref }}"
|
chart_ref: "{{ test_chart_ref }}"
|
||||||
create_namespace: yes
|
create_namespace: true
|
||||||
register: install
|
register: install
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
@@ -49,8 +48,8 @@
|
|||||||
name: test-chart
|
name: test-chart
|
||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
chart_ref: "{{ test_chart_ref }}"
|
chart_ref: "{{ test_chart_ref }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
diff: yes
|
diff: true
|
||||||
register: diff_result
|
register: diff_result
|
||||||
|
|
||||||
- name: Check if helm diff check is correct
|
- name: Check if helm diff check is correct
|
||||||
@@ -79,7 +78,7 @@
|
|||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
chart_ref: "{{ test_chart_ref }}"
|
chart_ref: "{{ test_chart_ref }}"
|
||||||
check_mode: yes
|
check_mode: yes
|
||||||
diff: yes
|
diff: true
|
||||||
register: diff_result
|
register: diff_result
|
||||||
|
|
||||||
- name: Check if no diff in check mode when no change
|
- name: Check if no diff in check mode when no change
|
||||||
@@ -101,7 +100,7 @@
|
|||||||
|
|
||||||
- name: Modify values
|
- name: Modify values
|
||||||
blockinfile:
|
blockinfile:
|
||||||
create: yes
|
create: true
|
||||||
path: "{{ test_chart_ref }}/values.yml"
|
path: "{{ test_chart_ref }}/values.yml"
|
||||||
block: |
|
block: |
|
||||||
---
|
---
|
||||||
@@ -206,52 +205,76 @@
|
|||||||
- install is not changed
|
- install is not changed
|
||||||
|
|
||||||
# Test helm diff with chart_repo_url
|
# Test helm diff with chart_repo_url
|
||||||
- name: Define Redis chart values
|
|
||||||
set_fact:
|
|
||||||
redis_chart_values:
|
|
||||||
commonLabels:
|
|
||||||
phase: testing
|
|
||||||
company: RedHat
|
|
||||||
image:
|
|
||||||
tag: 6.2.6-debian-10-r135
|
|
||||||
architecture: standalone
|
|
||||||
|
|
||||||
- name: Install Redis chart
|
|
||||||
helm:
|
|
||||||
binary_path: "{{ helm_binary }}"
|
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
|
||||||
chart_ref: redis
|
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
name: redis-chart
|
|
||||||
chart_version: "{{ redis_chart_version }}"
|
|
||||||
release_values: "{{ redis_chart_values }}"
|
|
||||||
|
|
||||||
- name: Upgrade Redis chart
|
|
||||||
helm:
|
|
||||||
binary_path: "{{ helm_binary }}"
|
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
|
||||||
chart_ref: redis
|
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
name: redis-chart
|
|
||||||
chart_version: "{{ redis_chart_version }}"
|
|
||||||
release_values: "{{ redis_chart_values }}"
|
|
||||||
check_mode: yes
|
|
||||||
register: redis_upgrade
|
|
||||||
|
|
||||||
- name: Assert that module raised a warning
|
|
||||||
assert:
|
|
||||||
that:
|
|
||||||
- not redis_upgrade.changed
|
|
||||||
- redis_upgrade.warnings is defined
|
|
||||||
- redis_upgrade.warnings | length == 1
|
|
||||||
- redis_upgrade.warnings[0] == "The default idempotency check can fail to report changes in certain cases. Install helm diff >= 3.4.1 for better results."
|
|
||||||
|
|
||||||
- name: Uninstall helm diff
|
- name: Uninstall helm diff
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
state: absent
|
state: absent
|
||||||
plugin_name: diff
|
plugin_name: diff
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Define chart variables
|
||||||
|
set_fact:
|
||||||
|
test_chart_values:
|
||||||
|
myValue: 'Some ConfigMap data value'
|
||||||
|
myConfigmapName: 'ansible-config-from-url'
|
||||||
|
test_chart_version: 0.1.0
|
||||||
|
test_chart_ref_url: "oci://localhost:6035/testing/test-chart-deployment-time"
|
||||||
|
|
||||||
|
- name: Deploy chart to remote registry
|
||||||
|
block:
|
||||||
|
- name: Create local directory to copy chart in
|
||||||
|
ansible.builtin.tempfile:
|
||||||
|
suffix: .chart
|
||||||
|
state: directory
|
||||||
|
register: _tmpd
|
||||||
|
|
||||||
|
- name: Copy local registry
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ _tmpd.path }}"
|
||||||
|
src: '{{ role_path }}/files/test-chart-deployment-time'
|
||||||
|
|
||||||
|
- name: Push chart to helm registry
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: push_to_helm_registry
|
||||||
|
vars:
|
||||||
|
chart_local_path: '{{ _tmpd.path }}/test-chart-deployment-time'
|
||||||
|
chart_repo_path: 'testing'
|
||||||
|
always:
|
||||||
|
- name: Delete temporary directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
state: absent
|
||||||
|
path: '{{ _tmpd.path }}'
|
||||||
|
|
||||||
|
- name: Log into Helm registry
|
||||||
|
ansible.builtin.command: "{{ helm_binary }} registry login -u testuser -p 'pass123!' localhost:6035"
|
||||||
|
|
||||||
|
- name: Install chart from remote URL
|
||||||
|
helm:
|
||||||
|
binary_path: "{{ helm_binary }}"
|
||||||
|
chart_ref: "{{ test_chart_ref_url }}"
|
||||||
|
chart_version: 0.1.0
|
||||||
|
namespace: "{{ helm_namespace }}"
|
||||||
|
name: another-chart
|
||||||
|
release_values: "{{ test_chart_values }}"
|
||||||
|
|
||||||
|
- name: Upgrade chart
|
||||||
|
helm:
|
||||||
|
binary_path: "{{ helm_binary }}"
|
||||||
|
chart_ref: "{{ test_chart_ref_url }}"
|
||||||
|
chart_version: 0.1.0
|
||||||
|
namespace: "{{ helm_namespace }}"
|
||||||
|
name: another-chart
|
||||||
|
release_values: "{{ test_chart_values }}"
|
||||||
|
check_mode: true
|
||||||
|
register: _upgrade
|
||||||
|
|
||||||
|
- name: Assert that module raised a warning
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not _upgrade.changed
|
||||||
|
- _upgrade.warnings is defined
|
||||||
|
- _upgrade.warnings | length == 1
|
||||||
|
- _upgrade.warnings[0] == "The default idempotency check can fail to report changes in certain cases. Install helm diff >= 3.4.1 for better results."
|
||||||
|
|
||||||
- name: Install helm diff (version=3.4.1)
|
- name: Install helm diff (version=3.4.1)
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
@@ -260,37 +283,36 @@
|
|||||||
plugin_path: https://github.com/databus23/helm-diff
|
plugin_path: https://github.com/databus23/helm-diff
|
||||||
plugin_version: 3.4.1
|
plugin_version: 3.4.1
|
||||||
|
|
||||||
- name: Upgrade Redis chart once again
|
- name: Upgrade chart once again
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
chart_ref: "{{ test_chart_ref_url }}"
|
||||||
chart_ref: redis
|
chart_version: 0.1.0
|
||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
name: redis-chart
|
name: another-chart
|
||||||
chart_version: "{{ redis_chart_version }}"
|
release_values: "{{ test_chart_values }}"
|
||||||
release_values: "{{ redis_chart_values }}"
|
check_mode: true
|
||||||
check_mode: yes
|
register: _upgrade_2
|
||||||
register: redis_upgrade_2
|
|
||||||
|
|
||||||
- name: Assert that module raised a warning
|
- name: Assert that module raised a warning
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- redis_upgrade_2.changed
|
- _upgrade_2.changed
|
||||||
- redis_upgrade_2.warnings is not defined
|
- _upgrade_2.warnings is not defined
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Remove chart directory
|
- name: Remove chart directory
|
||||||
file:
|
file:
|
||||||
path: "{{ test_chart_ref }}"
|
path: "{{ test_chart_ref }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Uninstall helm diff
|
- name: Uninstall helm diff
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
state: absent
|
state: absent
|
||||||
plugin_name: diff
|
plugin_name: diff
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Remove helm namespace
|
- name: Remove helm namespace
|
||||||
k8s:
|
k8s:
|
||||||
@@ -299,6 +321,6 @@
|
|||||||
name: "{{ helm_namespace }}"
|
name: "{{ helm_namespace }}"
|
||||||
state: absent
|
state: absent
|
||||||
wait: true
|
wait: true
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- include_tasks: reuse_values.yml
|
- include_tasks: reuse_values.yml
|
||||||
|
|||||||
@@ -18,7 +18,12 @@
|
|||||||
- set_fact:
|
- set_fact:
|
||||||
saved_kubeconfig_path: "{{ _dir.path }}/config"
|
saved_kubeconfig_path: "{{ _dir.path }}/config"
|
||||||
|
|
||||||
- block:
|
- vars:
|
||||||
|
helm_repo_name: autoscaler
|
||||||
|
helm_repo_url: "https://kubernetes.github.io/autoscaler"
|
||||||
|
helm_release_name: "autoscaler"
|
||||||
|
helm_chart_name: "cluster-autoscaler"
|
||||||
|
block:
|
||||||
- name: Copy default kubeconfig
|
- name: Copy default kubeconfig
|
||||||
copy:
|
copy:
|
||||||
remote_src: true
|
remote_src: true
|
||||||
@@ -59,14 +64,14 @@
|
|||||||
- plugin_info.plugin_list != []
|
- plugin_info.plugin_list != []
|
||||||
|
|
||||||
# helm_repository, helm, helm_info
|
# helm_repository, helm, helm_info
|
||||||
- name: Add test_bitnami chart repository
|
- name: 'Add "{{ helm_repo_name }}" chart repository'
|
||||||
helm_repository:
|
helm_repository:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
name: test_bitnami
|
name: "{{ helm_repo_name }}"
|
||||||
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
||||||
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
||||||
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
||||||
repo_url: https://charts.bitnami.com/bitnami
|
repo_url: "{{ helm_repo_url }}"
|
||||||
register: repository
|
register: repository
|
||||||
|
|
||||||
- name: Assert that repository was added
|
- name: Assert that repository was added
|
||||||
@@ -77,8 +82,8 @@
|
|||||||
- name: Install chart from repository added before
|
- name: Install chart from repository added before
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
name: rabbitmq
|
name: "{{ helm_release_name }}"
|
||||||
chart_ref: test_bitnami/rabbitmq
|
chart_ref: "{{ helm_repo_name }}/{{ helm_chart_name }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
update_repo_cache: true
|
update_repo_cache: true
|
||||||
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
||||||
@@ -98,7 +103,7 @@
|
|||||||
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
||||||
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
||||||
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
||||||
name: "rabbitmq"
|
name: "{{ helm_release_name }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
register: chart_info
|
register: chart_info
|
||||||
|
|
||||||
@@ -112,7 +117,7 @@
|
|||||||
- name: Remove chart
|
- name: Remove chart
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
name: rabbitmq
|
name: "{{ helm_release_name }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
||||||
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
||||||
@@ -131,7 +136,7 @@
|
|||||||
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
||||||
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
||||||
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
||||||
name: "rabbitmq"
|
name: "{{ helm_release_name }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
namespace: "{{ helm_namespace }}"
|
||||||
register: chart_info
|
register: chart_info
|
||||||
|
|
||||||
@@ -143,7 +148,7 @@
|
|||||||
- name: Remove chart repository
|
- name: Remove chart repository
|
||||||
helm_repository:
|
helm_repository:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
name: test_bitnami
|
name: "{{ helm_repo_name }}"
|
||||||
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
kubeconfig: "{{ test_kubeconfig | default(omit) }}"
|
||||||
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
validate_certs: "{{ test_validate_certs | default(omit) }}"
|
||||||
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
ca_cert: "{{ test_ca_cert | default(omit) }}"
|
||||||
@@ -192,6 +197,6 @@
|
|||||||
- name: Delete helm repository
|
- name: Delete helm repository
|
||||||
helm_repository:
|
helm_repository:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
name: test_bitnami
|
name: "{{ helm_repo_name }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|||||||
@@ -180,6 +180,7 @@
|
|||||||
- '"--username ansible" in _result.command'
|
- '"--username ansible" in _result.command'
|
||||||
- '"--password ***" in _result.command'
|
- '"--password ***" in _result.command'
|
||||||
- '"--keyring pubring.gpg" in _result.command'
|
- '"--keyring pubring.gpg" in _result.command'
|
||||||
|
- '"Module did not set no_log for pass_credentials" not in _result.stderr'
|
||||||
|
|
||||||
- name: Download chart using chart_ref
|
- name: Download chart using chart_ref
|
||||||
helm_pull:
|
helm_pull:
|
||||||
@@ -203,9 +204,8 @@
|
|||||||
- name: Download chart using untar_chart
|
- name: Download chart using untar_chart
|
||||||
helm_pull:
|
helm_pull:
|
||||||
binary_path: "{{ helm_path }}"
|
binary_path: "{{ helm_path }}"
|
||||||
chart_ref: redis
|
chart_ref: "oci://registry-1.docker.io/bitnamicharts/redis"
|
||||||
destination: "{{ destination }}"
|
destination: "{{ destination }}"
|
||||||
repo_url: "https://charts.bitnami.com/bitnami"
|
|
||||||
untar_chart: true
|
untar_chart: true
|
||||||
register: _result
|
register: _result
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
- name: Install helm using set_values parameters
|
- name: Install helm using set_values parameters
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
chart_ref: mariadb
|
chart_ref: oci://registry-1.docker.io/bitnamicharts/mariadb
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
|
||||||
release_name: test-mariadb
|
release_name: test-mariadb
|
||||||
release_namespace: "{{ helm_namespace }}"
|
release_namespace: "{{ helm_namespace }}"
|
||||||
create_namespace: true
|
create_namespace: true
|
||||||
@@ -36,8 +35,7 @@
|
|||||||
- name: Install helm using set_values parameters
|
- name: Install helm using set_values parameters
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
chart_ref: apache
|
chart_ref: oci://registry-1.docker.io/bitnamicharts/apache
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
|
||||||
release_name: test-apache
|
release_name: test-apache
|
||||||
release_namespace: "{{ helm_namespace }}"
|
release_namespace: "{{ helm_namespace }}"
|
||||||
create_namespace: true
|
create_namespace: true
|
||||||
@@ -79,8 +77,7 @@
|
|||||||
- name: Install helm using set_values parameters
|
- name: Install helm using set_values parameters
|
||||||
helm:
|
helm:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
chart_ref: minio
|
chart_ref: oci://registry-1.docker.io/bitnamicharts/minio
|
||||||
chart_repo_url: https://charts.bitnami.com/bitnami
|
|
||||||
release_name: test-minio
|
release_name: test-minio
|
||||||
release_namespace: "{{ helm_namespace }}"
|
release_namespace: "{{ helm_namespace }}"
|
||||||
create_namespace: true
|
create_namespace: true
|
||||||
@@ -107,3 +104,11 @@
|
|||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: "{{ ymlfile.path }}"
|
path: "{{ ymlfile.path }}"
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Delete namespace
|
||||||
|
k8s:
|
||||||
|
state: absent
|
||||||
|
kind: namespace
|
||||||
|
name: "{{ helm_namespace }}"
|
||||||
|
ignore_errors: true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
helm_version: v3.7.0
|
helm_version: v3.8.0
|
||||||
helm_install_path: /tmp/helm
|
helm_install_path: /tmp/helm
|
||||||
helm_default_archive_name: "helm-{{ helm_version }}-{{ ansible_system | lower }}-amd64.tar.gz"
|
helm_default_archive_name: "helm-{{ helm_version }}-{{ ansible_system | lower }}-amd64.tar.gz"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ k8s_pod_metadata:
|
|||||||
|
|
||||||
k8s_pod_spec:
|
k8s_pod_spec:
|
||||||
serviceAccount: "{{ k8s_pod_service_account }}"
|
serviceAccount: "{{ k8s_pod_service_account }}"
|
||||||
|
nodeSelector: "{{ k8s_pod_node_selector }}"
|
||||||
containers:
|
containers:
|
||||||
- image: "{{ k8s_pod_image }}"
|
- image: "{{ k8s_pod_image }}"
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
@@ -33,6 +34,8 @@ k8s_pod_ports: []
|
|||||||
|
|
||||||
k8s_pod_env: []
|
k8s_pod_env: []
|
||||||
|
|
||||||
|
k8s_pod_node_selector: {}
|
||||||
|
|
||||||
k8s_pod_template:
|
k8s_pod_template:
|
||||||
metadata: "{{ k8s_pod_metadata }}"
|
metadata: "{{ k8s_pod_metadata }}"
|
||||||
spec: "{{ k8s_pod_spec }}"
|
spec: "{{ k8s_pod_spec }}"
|
||||||
|
|||||||
@@ -127,6 +127,48 @@
|
|||||||
- ds.result.status.currentNumberScheduled == ds.result.status.desiredNumberScheduled
|
- ds.result.status.currentNumberScheduled == ds.result.status.desiredNumberScheduled
|
||||||
- updated_ds_pods.resources[0].spec.containers[0].image.endswith(":3")
|
- updated_ds_pods.resources[0].spec.containers[0].image.endswith(":3")
|
||||||
|
|
||||||
|
- name: Create daemonset with nodeSelector and not existing label
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: wait-daemonset-not-existing-label
|
||||||
|
namespace: "{{ wait_namespace }}"
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: "{{ k8s_pod_name }}"
|
||||||
|
template: "{{ k8s_pod_template }}"
|
||||||
|
wait: yes
|
||||||
|
wait_sleep: 5
|
||||||
|
wait_timeout: "{{ k8s_wait_timeout | default(omit) }}"
|
||||||
|
vars:
|
||||||
|
k8s_pod_name: wait-daemonset-not-existing-label
|
||||||
|
k8s_pod_image: gcr.io/kuar-demo/kuard-amd64:1
|
||||||
|
k8s_pod_command:
|
||||||
|
- sleep
|
||||||
|
- "600"
|
||||||
|
k8s_pod_node_selector:
|
||||||
|
nonExisitingLabel: test-not-exiting-label
|
||||||
|
register: ds_not_existing_label
|
||||||
|
|
||||||
|
- name: Get updated pods
|
||||||
|
k8s_info:
|
||||||
|
api_version: v1
|
||||||
|
kind: Pod
|
||||||
|
namespace: "{{ wait_namespace }}"
|
||||||
|
label_selectors:
|
||||||
|
- app=wait-daemonset-not-existing-label
|
||||||
|
register: updated_ds_pods_not_existing_label
|
||||||
|
|
||||||
|
- name: Check that daemonset wait worked (when desired number is 0)
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- ds_not_existing_label.result.status.currentNumberScheduled == ds_not_existing_label.result.status.desiredNumberScheduled
|
||||||
|
- ds_not_existing_label.result.status.desiredNumberScheduled == 0
|
||||||
|
- updated_ds_pods_not_existing_label.resources | length == 0
|
||||||
|
|
||||||
- name: Add a statefulset
|
- name: Add a statefulset
|
||||||
k8s:
|
k8s:
|
||||||
definition:
|
definition:
|
||||||
|
|||||||
1
tests/integration/targets/push_to_helm_registry/aliases
Normal file
1
tests/integration/targets/push_to_helm_registry/aliases
Normal file
@@ -0,0 +1 @@
|
|||||||
|
disabled
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
helm_binary_path: "helm"
|
||||||
|
chart_repo_url: 'localhost:6035'
|
||||||
|
chart_repo_username: testuser
|
||||||
|
chart_repo_password: 'pass123!'
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure we can log into the helm registry
|
||||||
|
command: >-
|
||||||
|
{{ helm_binary_path }} registry login
|
||||||
|
-u {{ chart_repo_username }}
|
||||||
|
-p {{ chart_repo_password }}
|
||||||
|
{{ chart_repo_url }}
|
||||||
|
|
||||||
|
- name: Package chart and push to helm registry
|
||||||
|
block:
|
||||||
|
- name: Create temporary directory to store chart
|
||||||
|
ansible.builtin.tempfile:
|
||||||
|
state: directory
|
||||||
|
suffix: .chart
|
||||||
|
register: _tmpfile
|
||||||
|
|
||||||
|
- name: Package helm chart
|
||||||
|
command: '{{ helm_binary_path }} package {{ chart_local_path }} --destination {{ _tmpfile.path }}'
|
||||||
|
|
||||||
|
- name: Locate helm chart package
|
||||||
|
ansible.builtin.find:
|
||||||
|
paths: "{{ _tmpfile.path }}"
|
||||||
|
patterns: '*.tgz'
|
||||||
|
register: _files
|
||||||
|
|
||||||
|
- name: Helm push chart to the registry
|
||||||
|
command: '{{ helm_binary_path }} push {{ _files.files.0.path }} oci://{{ chart_repo_url }}/{{ chart_repo_path }}'
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: Logout from registry
|
||||||
|
command: '{{ helm_binary_path }} registry logout {{ chart_repo_url }}'
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Delete temporary directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
state: absent
|
||||||
|
path: '{{ _tmpfile.path }}'
|
||||||
|
ignore_errors: true
|
||||||
1
tests/integration/targets/setup_helm_registry/aliases
Normal file
1
tests/integration/targets/setup_helm_registry/aliases
Normal file
@@ -0,0 +1 @@
|
|||||||
|
disabled
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
# user: testuser, password: pass123!
|
||||||
|
registry_credentials: testuser:$2y$05$d8tw6L1hojRFW.FjHOAnIOihJWAvFb0/Pu/30hLbQNJIYzCmlyBCi
|
||||||
|
registry_name: helm_registry
|
||||||
|
registry_port: 6035
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: Teardown registry
|
||||||
|
include_tasks: teardown_registry.yml
|
||||||
32
tests/integration/targets/setup_helm_registry/tasks/main.yml
Normal file
32
tests/integration/targets/setup_helm_registry/tasks/main.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure we can talk to docker daemon
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: docker ps
|
||||||
|
|
||||||
|
- name: Create temporary directory to store file in
|
||||||
|
tempfile:
|
||||||
|
state: directory
|
||||||
|
suffix: .helm_registry
|
||||||
|
register: _tmpfile
|
||||||
|
# notify:
|
||||||
|
# - Teardown registry
|
||||||
|
|
||||||
|
- name: Create authentication file
|
||||||
|
copy:
|
||||||
|
content: "{{ registry_credentials }}"
|
||||||
|
dest: "{{ _tmpfile.path }}/htpasswd"
|
||||||
|
|
||||||
|
- name: Remove existing registry
|
||||||
|
ansible.builtin.include_tasks: remove_docker_container.yml
|
||||||
|
|
||||||
|
- name: Create registry container
|
||||||
|
command: >-
|
||||||
|
docker run -d
|
||||||
|
-p {{ registry_port }}:5000
|
||||||
|
--restart=always
|
||||||
|
--name "{{ registry_name }}"
|
||||||
|
-v "{{ _tmpfile.path }}:/auth"
|
||||||
|
-e "REGISTRY_AUTH=htpasswd"
|
||||||
|
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm"
|
||||||
|
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
|
||||||
|
registry:2
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
- name: Inspect docker container
|
||||||
|
command: docker container inspect {{ registry_name }} -f '{{ '{{' }} .State.Running {{ '}}' }}'
|
||||||
|
register: _inspect
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Remove container
|
||||||
|
when: _inspect.rc == 0
|
||||||
|
block:
|
||||||
|
- name: Stop running container
|
||||||
|
command: docker container stop {{ registry_name }}
|
||||||
|
when: _inspect.stdout == "true"
|
||||||
|
|
||||||
|
- name: Remove container
|
||||||
|
command: docker container rm {{ registry_name }}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: Remove Docker container
|
||||||
|
ansible.builtin.include_tasks: remove_docker_container.yml
|
||||||
|
|
||||||
|
- name: Delete temporary directory
|
||||||
|
file:
|
||||||
|
state: absent
|
||||||
|
path: '{{ _tmpfile.path }}'
|
||||||
|
ignore_errors: true
|
||||||
@@ -34,3 +34,4 @@ plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
|||||||
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
||||||
tests/integration/targets/k8s_delete/files/deployments.yaml yamllint!skip
|
tests/integration/targets/k8s_delete/files/deployments.yaml yamllint!skip
|
||||||
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart-deployment-time/templates/configmap.yaml yamllint!skip
|
||||||
|
|||||||
@@ -35,3 +35,4 @@ plugins/modules/k8s_scale.py validate-modules:return-syntax-error
|
|||||||
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
||||||
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
||||||
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart-deployment-time/templates/configmap.yaml yamllint!skip
|
||||||
|
|||||||
@@ -38,3 +38,4 @@ plugins/modules/k8s_scale.py validate-modules:return-syntax-error
|
|||||||
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
||||||
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
||||||
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart-deployment-time/templates/configmap.yaml yamllint!skip
|
||||||
|
|||||||
@@ -29,3 +29,4 @@ plugins/modules/k8s_scale.py validate-modules:return-syntax-error
|
|||||||
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
||||||
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
||||||
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart-deployment-time/templates/configmap.yaml yamllint!skip
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
plugins/module_utils/client/discovery.py import-3.9!skip
|
|
||||||
plugins/module_utils/client/discovery.py import-3.10!skip
|
|
||||||
plugins/module_utils/client/discovery.py import-3.11!skip
|
plugins/module_utils/client/discovery.py import-3.11!skip
|
||||||
plugins/module_utils/client/discovery.py import-3.12!skip
|
plugins/module_utils/client/discovery.py import-3.12!skip
|
||||||
plugins/module_utils/client/resource.py import-3.9!skip
|
plugins/module_utils/client/discovery.py import-3.13!skip
|
||||||
plugins/module_utils/client/resource.py import-3.10!skip
|
|
||||||
plugins/module_utils/client/resource.py import-3.11!skip
|
plugins/module_utils/client/resource.py import-3.11!skip
|
||||||
plugins/module_utils/client/resource.py import-3.12!skip
|
plugins/module_utils/client/resource.py import-3.12!skip
|
||||||
plugins/module_utils/k8sdynamicclient.py import-3.9!skip
|
plugins/module_utils/client/resource.py import-3.13!skip
|
||||||
plugins/module_utils/k8sdynamicclient.py import-3.10!skip
|
|
||||||
plugins/module_utils/k8sdynamicclient.py import-3.11!skip
|
plugins/module_utils/k8sdynamicclient.py import-3.11!skip
|
||||||
plugins/module_utils/k8sdynamicclient.py import-3.12!skip
|
plugins/module_utils/k8sdynamicclient.py import-3.12!skip
|
||||||
|
plugins/module_utils/k8sdynamicclient.py import-3.13!skip
|
||||||
plugins/module_utils/version.py pylint!skip
|
plugins/module_utils/version.py pylint!skip
|
||||||
plugins/modules/k8s.py validate-modules:parameter-type-not-in-doc
|
plugins/modules/k8s.py validate-modules:parameter-type-not-in-doc
|
||||||
plugins/modules/k8s_scale.py validate-modules:parameter-type-not-in-doc
|
plugins/modules/k8s_scale.py validate-modules:parameter-type-not-in-doc
|
||||||
@@ -29,3 +26,4 @@ plugins/modules/k8s_scale.py validate-modules:return-syntax-error
|
|||||||
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
||||||
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
||||||
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart-deployment-time/templates/configmap.yaml yamllint!skip
|
||||||
|
|||||||
29
tests/sanity/ignore-2.19.txt
Normal file
29
tests/sanity/ignore-2.19.txt
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
plugins/module_utils/client/discovery.py import-3.11!skip
|
||||||
|
plugins/module_utils/client/discovery.py import-3.12!skip
|
||||||
|
plugins/module_utils/client/discovery.py import-3.13!skip
|
||||||
|
plugins/module_utils/client/resource.py import-3.11!skip
|
||||||
|
plugins/module_utils/client/resource.py import-3.12!skip
|
||||||
|
plugins/module_utils/client/resource.py import-3.13!skip
|
||||||
|
plugins/module_utils/k8sdynamicclient.py import-3.11!skip
|
||||||
|
plugins/module_utils/k8sdynamicclient.py import-3.12!skip
|
||||||
|
plugins/module_utils/k8sdynamicclient.py import-3.13!skip
|
||||||
|
plugins/module_utils/version.py pylint!skip
|
||||||
|
plugins/modules/k8s.py validate-modules:parameter-type-not-in-doc
|
||||||
|
plugins/modules/k8s_scale.py validate-modules:parameter-type-not-in-doc
|
||||||
|
plugins/modules/k8s_service.py validate-modules:parameter-type-not-in-doc
|
||||||
|
tests/unit/module_utils/fixtures/definitions.yml yamllint!skip
|
||||||
|
tests/unit/module_utils/fixtures/deployments.yml yamllint!skip
|
||||||
|
tests/integration/targets/k8s_delete/files/deployments.yaml yamllint!skip
|
||||||
|
tests/unit/module_utils/fixtures/pods.yml yamllint!skip
|
||||||
|
tests/integration/targets/helm/files/appversionless-chart-v2/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm/files/appversionless-chart/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm/files/test-chart-v2/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm/files/test-chart/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/k8s_scale/files/deployment.yaml yamllint!skip
|
||||||
|
plugins/modules/k8s.py validate-modules:return-syntax-error
|
||||||
|
plugins/modules/k8s_scale.py validate-modules:return-syntax-error
|
||||||
|
plugins/modules/k8s_service.py validate-modules:return-syntax-error
|
||||||
|
plugins/modules/k8s_taint.py validate-modules:return-syntax-error
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart-reuse-values/templates/configmap.yaml yamllint!skip
|
||||||
|
tests/integration/targets/helm_diff/files/test-chart-deployment-time/templates/configmap.yaml yamllint!skip
|
||||||
@@ -200,6 +200,10 @@ def test_module_get_values(_ansible_helm_module, no_values, get_all):
|
|||||||
'version.BuildInfo{Version:"v3.10.3", GitCommit:7870ab3ed4135f136eec, GoVersion:"go1.18.9"}',
|
'version.BuildInfo{Version:"v3.10.3", GitCommit:7870ab3ed4135f136eec, GoVersion:"go1.18.9"}',
|
||||||
"3.10.3",
|
"3.10.3",
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
'version.BuildInfo{Version:"v3.15.0-rc.1", GitCommit:"d7afa3b6b432c09a02cd07342e908ba5bed34940", GitTreeState:"clean", GoVersion:"go1.22.4"}',
|
||||||
|
"3.15.0-rc.1",
|
||||||
|
),
|
||||||
('Client: &version.Version{SemVer:"v3.12.3", ', "3.12.3"),
|
('Client: &version.Version{SemVer:"v3.12.3", ', "3.12.3"),
|
||||||
('Client: &version.Version{SemVer:"v3.12.3"', None),
|
('Client: &version.Version{SemVer:"v3.12.3"', None),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user