Compare commits

...

61 Commits

Author SHA1 Message Date
Mike Graves
9e60a3a40d Release version 2.0.0 (#124)
* Release version 2.0.0
2021-06-09 12:50:23 -04:00
Mike Graves
18cbfb7f95 Remove deprecated k8s_facts (#125)
* Remove deprecated k8s_facts

This removes the k8s_facts alias to k8s_info.

* Add changelog fragment
2021-06-09 11:04:22 -04:00
abikouo
481521a09d k8s_scale - add option label_selectors and continue_on_error (#114)
k8s_scale suppport for label selector
2021-06-07 09:57:50 +02:00
Mike Graves
ef82b78a2f Support multiple resources with same GVK (#119)
In replicating the openshift client functionality we forgot to bring
over a fix for multiple resources with the same group version and kind.
This is specifically a problem for openshift templates.
2021-06-04 13:19:02 -04:00
Abhijeet Kasurde
cf0b71f93e lookup: return list even if single item found (#117)
Always return list from k8s lookup plugin

Fixes: #9

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-04 10:23:21 +05:30
abikouo
dd53fde0e1 remove openshift dependency for molecule testing (#118) 2021-06-02 10:09:19 +02:00
Andrew Klychkov
92e6ff29f6 Update README, CONTRIBUTING.md: freenode -> libera.chat (#116) 2021-06-01 14:34:02 +05:30
Abhijeet Kasurde
eb4b85c17d Add a doc about Ansible Turbo mode (#100) 2021-05-27 09:44:12 +05:30
Mike Graves
5b5777d202 Split JSON patch out into a new module (#99)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-24 18:05:48 +05:30
Abhijeet Kasurde
1f47931c7c helm: Add complex values example (#108) 2021-05-24 18:02:00 +05:30
Elliot Blackburn
e112417d4c Correct helm_info return type docs for app_version (#97) 2021-05-21 13:22:02 +05:30
Abhijeet Kasurde
f9ee1f05b8 Add docs for doc autogeneration (#98)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-21 10:49:01 +05:30
Gonéri Le Bouder
2d6a120032 galaxy.yml: dependencies is a dict (#110) 2021-05-19 17:22:35 -04:00
Mike Graves
0bbc9ca999 Account for updated pods when waiting on DaemonSet (#102)
* Account for updated pods when waiting on DaemonSet

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

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

* add changelogs

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

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

* patch_only parameter changed to state=patched

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

* Update plugins/modules/k8s.py

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

* Update molecule/default/tasks/patched.yml

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

* Update molecule/default/tasks/patched.yml

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

* sanity issue

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

* add repo name

* repo name syntax

* install requirements

* update ignore

* molecule tests on multiple versions

* Update ci.yml
2021-05-17 15:17:45 +02:00
Abhijeet Kasurde
0eb1559cc7 Update docs (#101) 2021-05-17 13:54:51 +05:30
Mike Graves
01a0815e56 Replace openshift client with kubernetes client (#96)
* Replace openshift client with kubernetes client

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

edc48ee577
c214376cac
48c5170018
2b6a989cf9

* Add changelog fragment

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

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

* Update plugins/modules/k8s.py

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

* Update plugins/modules/k8s_info.py

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

* Update plugins/modules/k8s_service.py

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

* Bump minimum kubernetes version to 12.0.0

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-06 14:44:17 -04:00
Mike Graves
2b6a989cf9 Replicate base resource for lists functionality (#89)
* Replicate base resource for lists functionality

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

* Add changelog fragment
2021-05-05 10:09:22 -04:00
Abhijeet Kasurde
87827d79a4 Update README for the Python3 (#93) 2021-05-05 13:10:39 +05:30
abikouo
fc80540db5 drop python 2 support (breaking changes) (#86)
* drop python 2 support

* change log

* Update changelogs/fragments/86_drop_python2_support.yaml

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

* Update k8s.py

Co-authored-by: Mike Graves <mgraves@redhat.com>
2021-05-04 18:07:22 +02:00
abikouo
e754a6cd31 `helm_plugin and helm_plugin_info remove unused parameter release_namespace` (#85)
* remove unused parameter release_namespace from documentation

* Update changelogs/fragments/85_helm_plugin.yaml

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

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-28 08:44:57 +02:00
Mike Graves
0e740a1f45 Enable the ansible turbo module (#68)
- enable the AnsibleTurboModule: Use AnsibleTurboModule when the `cloud.common` collection is available.
- Add dependency install step to molecule: Molecule won't install dependencies from galaxy.yml. We need to explicitly list them in a requirements.yml file and then enable the dependency step for molecule test.
2021-04-23 13:10:46 -04:00
Gonéri Le Bouder
ef6eee26a7 integration: use venv instead of virtualenv (#82)
virtualenv is deprecated since Python3. We use venv instead.
2021-04-23 10:38:08 -04:00
Mike Graves
8b2d39d6d2 Fix client regression from turbo mode refactor (#79)
* Fix client regression from turbo mode refactor

The turbo mode refactoring introduced a regression where the kubernetes
client can fail to find the kubeconfig. This happens because
get_api_client is called twice and the second time it is called without
the module being passed as an argument. Without this, the configuration
will use defaults. This will be a problem if the user has specified a
location for the kubeconfig that's different from default, for example.

* Add tests
2021-04-22 15:13:38 -04:00
Alina Buzachis
48c5170018 Replicate apply method in the DynamicClient (#45)
* * Replicate apply method in the DynamicClient

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

* * Add changelog fragment

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-04-22 14:58:53 -04:00
Gonéri Le Bouder
9384742bdc gc.yml: address a race condition (#80)
Wait until the job is actually deleted before checking the final state.
2021-04-22 13:51:02 -04:00
abikouo
361061c727 k8s loop flattening for template argument (#49)
* repo migration

* Update and rename 411-k8s-loop-flattening-and-continue_on_error.yaml to 49-k8s-loop-flattening-and-continue_on_error.yaml

* Update plugins/modules/k8s.py

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

* split into multiple lines

* linting

* Update .gitignore

* Update template.yml

* merge

* Update template.yml

* deep copy environment

* deepcopy

* lint

* remove useless comment

* multiple definition

* tests update

* jmespath

* Update ci.yml

* Update template.yml

Co-authored-by: Mike Graves <mgraves@redhat.com>
2021-04-22 19:28:07 +02:00
Gonéri Le Bouder
c516d7ecb9 k8s_exec: reuse existing connection (#76)
Initialize the CoreV1Api object with the existing Kubernetes connection.
2021-04-22 12:50:40 -04:00
Gonéri Le Bouder
9a529fc8f3 helm: accept context and validate_certs (#74)
I've got the following environment variable set:
- `K8S_AUTH_VERIFY_SSL=False`

Helm's `validate_certs` parameter fallback on this environment variable.
Which means, on my system, the `validate_certs` will already be set.

So we cannot make this parameter exclusive wih another one.
2021-04-22 10:30:38 -04:00
abikouo
b59336e6b2 ignore .cache directory used for tests (#77) 2021-04-22 16:11:59 +02:00
Mike Graves
47acf53909 Cleanup sample_plugin during helm tests (#75) 2021-04-22 09:25:03 +05:30
Gonéri Le Bouder
e4469f72bc yamllint and flake8 should ignore .cache (#73)
The content of .cache is not maintained in this repository. There
is no point raising an error when there is problem in one of these
3rd party dependencies.
2021-04-22 09:22:09 +05:30
Alina Buzachis
c214376cac Add cache_file parameter for DynamicClient (#46) 2021-04-21 09:57:52 +05:30
Abhijeet Kasurde
a5a850d1da Remove KubernetesAnsibleModule class (#70)
Co-authored-by: Mike Graves <mgraves@redhat.com>
2021-04-20 21:02:59 +05:30
Alina Buzachis
edc48ee577 Add configmap/secret hash functionality (#48)
* * * Add configmap/secret hash functionality

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

* * Add changelog fragment

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-04-20 08:27:25 -04:00
Abhijeet Kasurde
cc10268adf k8s inventory - remove trailing slashes from hostname (#63)
When the user provides a hostname with trailing slashes like
https://localhost:6443/, the openshift library fails to
enumerate the APIs from the given cluster.

This fix removes any extra trailing slashes before sending it
to the openshift DynamicClient.

Fixes: #52

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-20 13:15:29 +05:30
Abhijeet Kasurde
5a0f5d6b93 helm: handle multiline output (#64)
Fixes: #399

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-20 12:07:28 +05:30
Abhijeet Kasurde
5f993e6028 Update kubeconfig file location in docs (#65)
Fixes: #53 

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-19 19:50:14 +05:30
abikouo
8cee069ff1 Fix apis being overwritten when using k8s_cluster_info (#47)
* Update and rename 389-fix-apis-being-overwritten-in-k8s_cluster_info.yaml to 41-fix-apis-being-overwritten-in-k8s_cluster_info.yaml

* Update changelogs/fragments/41-fix-apis-being-overwritten-in-k8s_cluster_info.yaml

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-19 09:05:13 -04:00
Mike Graves
b68bf7c065 Add support for tags to molecule tests (#62) 2021-04-19 10:00:21 +05:30
Abhijeet Kasurde
28223dbe36 Fix broken links in docs (#61) 2021-04-16 10:19:47 +05:30
Abhijeet Kasurde
8182a3afd4 Added docs for the collection (#50) 2021-04-12 22:25:10 +05:30
Abhijeet Kasurde
4aa983509b Remove old changelog fragment files (#51) 2021-04-12 18:32:47 +05:30
Mike Graves
ba586a8ed8 Rename from community.kubernetes to kubernetes.core (#6)
* Rename from community.kubernetes to kubernetes.core

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

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

* Fix CONTRIBUTING.md
2021-04-08 08:48:27 -04:00
Andrew Klychkov
a55edac38f Add ignore.txt for 2.12 (#7) 2021-04-08 14:00:02 +05:30
Mike Graves
d6f251173e Add unit tests to CI (#407)
* Add unit tests to CI

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

* Add changelog fragment
2021-04-05 09:39:01 -04:00
Abhijeet Kasurde
c9157ce713 k8s: fix get_api_client usage in inventory plugin (#395)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-03-26 14:36:47 -04:00
Mike Graves
34e6e09fb8 Restrict molecule version to <3.3.0 (#396)
The 3.3.0 version of molecule broke the test suite. Restricting the
version until we can either fix upstream or decide on the best
workaround.
2021-03-25 09:22:59 +05:30
Timothy Appnel
5fc3dd02bf Adds a wait example to k8s.py (#386)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-03-18 14:48:07 +05:30
Gonéri Le Bouder
39660dd40e refactoring for ansible_module.turbo integration (#313)
* refactoring for ansible_module.turbo integration

This refactoring prepares the integration of `ansible_module.turbo`

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

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

Co-authored-by: Jill Rouleau <jill.rouleau@bespokess.com>
2021-03-16 17:16:18 -04:00
Abhijeet Kasurde
2f6fae322c Removed openshift inventory for community.kubernetes (#377) 2021-03-16 18:43:07 +05:30
Mike Graves
af928a255f Remove old openshift integration tests (#382) 2021-03-16 09:05:52 -04:00
Mike Graves
07915509c1 Remove deprecated KubernetesRawModule (#379)
* Remove deprecated KubernetesRawModule

* Add changelog fragment
2021-03-16 09:05:07 -04:00
Mike Graves
c4182ad84f Fix helm ignoring given context (#387)
Fixes: #385
2021-03-15 10:04:06 +05:30
Timothy Appnel
af41efdf46 Fix typo in README.md
helm_template had a typo in it.
2021-03-08 18:49:45 -05:00
Abhijeet Kasurde
1e511113a5 k8s_auth: remove module (#376) 2021-03-08 22:54:22 +05:30
Timothy Appnel
8caca90c11 Update README.md with helm_template module under Included Content (#375) 2021-03-04 19:43:42 +05:30
204 changed files with 15005 additions and 2956 deletions

View File

@@ -14,24 +14,29 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ['2.7', '3.7']
python_version: ['3.7']
ansible_version: ['stable-2.11', 'stable-2.10', 'stable-2.9', 'devel']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
path: ansible_collections/kubernetes/core
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install ansible base (devel branch)
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Check ansible version
uses: actions/checkout@v2
with:
repository: ansible/ansible
ref: ${{ matrix.ansible_version }}
path: ansible_collections/kubernetes/core/ansible
- name: Run sanity tests on Python ${{ matrix.python_version }}
run: make test-sanity PYTHON_VERSION=${{ matrix.python_version }}
working-directory: ./ansible_collections/community/kubernetes
run: source ./ansible/hacking/env-setup && make test-sanity PYTHON_VERSION=${{ matrix.python_version }}
working-directory: ./ansible_collections/kubernetes/core
integration:
runs-on: ubuntu-latest
@@ -43,7 +48,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
path: ansible_collections/kubernetes/core
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
@@ -55,11 +60,11 @@ jobs:
- name: Run integration tests on Python ${{ matrix.python_version }}
run: make test-integration PYTHON_VERSION=${{ matrix.python_version }}
working-directory: ./ansible_collections/community/kubernetes
working-directory: ./ansible_collections/kubernetes/core
- name: Generate coverage report.
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
working-directory: ./ansible_collections/community/kubernetes
working-directory: ./ansible_collections/kubernetes/core
- uses: codecov/codecov-action@v1
with:
@@ -74,7 +79,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
path: ansible_collections/kubernetes/core
- name: Set up KinD cluster
uses: engineerd/setup-kind@v0.5.0
@@ -84,8 +89,10 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install molecule and openshift dependencies
run: pip install ansible molecule yamllint openshift flake8
# The 3.3.0 release of molecule introduced a breaking change. See
# https://github.com/ansible-community/molecule/issues/3083
- name: Install molecule and kubernetes dependencies
run: pip install ansible "molecule<3.3.0" yamllint kubernetes flake8 jsonpatch
# The latest release doesn't work with Molecule currently.
# See: https://github.com/ansible-community/molecule/issues/2757
@@ -100,7 +107,6 @@ jobs:
# run: |
# pip uninstall -y ansible
# pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Create default collection path symlink
run: |
mkdir -p /home/runner/.ansible
@@ -108,9 +114,9 @@ jobs:
- name: Run molecule default test scenario
run: make test-molecule
working-directory: ./ansible_collections/community/kubernetes
working-directory: ./ansible_collections/kubernetes/core
downstream-sanity-29:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -119,7 +125,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
path: ansible_collections/kubernetes/core
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
@@ -127,63 +133,8 @@ jobs:
python-version: ${{ matrix.python_version }}
- name: Install ansible base (devel branch)
run: pip install "ansible>=2.9.0,<2.10.0"
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Run sanity tests on Python ${{ matrix.python_version }}
run: make downstream-test-sanity
working-directory: ./ansible_collections/community/kubernetes
downstream-integration-29:
runs-on: ubuntu-latest
strategy:
matrix:
# Our old integration tests fail under newer Python versions.
python_version: ['3.6']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install ansible base (devel branch)
run: pip install "ansible>=2.9.0,<2.10.0" pip==20.3.1
- name: Run integration tests on Python ${{ matrix.python_version }}
run: make downstream-test-integration
working-directory: ./ansible_collections/community/kubernetes
downstream-molecule-29:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ['3.7']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up KinD cluster
uses: engineerd/setup-kind@v0.5.0
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install molecule and openshift dependencies
run: pip install "ansible>=2.9.0,<2.10.0" molecule yamllint openshift flake8
- name: Create default collection path symlink
run: |
mkdir -p /home/runner/.ansible
ln -s /home/runner/work/kubernetes/kubernetes /home/runner/.ansible/collections
- name: Run molecule default test scenario
run: make downstream-test-molecule
working-directory: ./ansible_collections/community/kubernetes
- name: Run unit tests on Python ${{ matrix.python_version }}
run: make test-unit PYTHON_VERSION=${{ matrix.python_version }}
working-directory: ./ansible_collections/kubernetes/core

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ changelogs/.plugin-cache.yaml
# Temporary test files.
tests/output
tests/integration/cloud-config-*
.cache

View File

@@ -14,3 +14,5 @@ rules:
indentation:
spaces: 2
indent-sequences: consistent
ignore: |
.cache

View File

@@ -5,6 +5,64 @@ Kubernetes Collection Release Notes
.. contents:: Topics
v2.0.0
======
Major Changes
-------------
- k8s - deprecate merge_type=json. The JSON patch functionality has never worked (https://github.com/ansible-collections/kubernetes.core/pull/99).
- k8s_json_patch - split JSON patch functionality out into a separate module (https://github.com/ansible-collections/kubernetes.core/pull/99).
- replaces the openshift client with the official kubernetes client (https://github.com/ansible-collections/kubernetes.core/issues/34).
Minor Changes
-------------
- Add cache_file when DynamicClient is created (https://github.com/ansible-collections/kubernetes.core/pull/46).
- Add configmap and secret hash functionality (https://github.com/ansible-collections/kubernetes.core/pull/48).
- Add logic for cache file name generation (https://github.com/ansible-collections/kubernetes.core/pull/46).
- Replicate apply method in the DynamicClient (https://github.com/ansible-collections/kubernetes.core/pull/45).
- add ``proxy_headers`` option for authentication on k8s_xxx modules (https://github.com/ansible-collections/kubernetes.core/pull/58).
- add support for using tags when running molecule test suite (https://github.com/ansible-collections/kubernetes.core/pull/62).
- added documentation for ``kubernetes.core`` collection (https://github.com/ansible-collections/kubernetes.core/pull/50).
- common - removed ``KubernetesAnsibleModule``, use ``K8sAnsibleMixin`` instead (https://github.com/ansible-collections/kubernetes.core/pull/70).
- helm - add example for complex values in ``helm`` module (https://github.com/ansible-collections/kubernetes.core/issues/109).
- k8s - Handle list of definition for option `template` (https://github.com/ansible-collections/kubernetes.core/pull/49).
- k8s - `continue_on_error` option added (whether to continue on creation/deletion errors) (https://github.com/ansible-collections/kubernetes.core/pull/49).
- k8s - support ``patched`` value for ``state`` option. patched state is an existing resource that has a given patch applied (https://github.com/ansible-collections/kubernetes.core/pull/90).
- k8s - wait for all pods to update when rolling out daemonset changes (https://github.com/ansible-collections/kubernetes.core/pull/102).
- k8s_scale - ability to scale multiple resource using ``label_selectors`` (https://github.com/ansible-collections/kubernetes.core/pull/114).
- k8s_scale - new parameter to determine whether to continue or not on error when scaling multiple resources (https://github.com/ansible-collections/kubernetes.core/pull/114).
- kubeconfig - update ``kubeconfig`` file location in the documentation (https://github.com/ansible-collections/kubernetes.core/issues/53).
- remove old change log fragment files.
- remove the deprecated ``KubernetesRawModule`` class (https://github.com/ansible-collections/community.kubernetes/issues/232).
- replicate base resource for lists functionality (https://github.com/ansible-collections/kubernetes.core/pull/89).
Breaking Changes / Porting Guide
--------------------------------
- Drop python 2 support (https://github.com/ansible-collections/kubernetes.core/pull/86).
- helm_plugin - remove unused ``release_namespace`` parameter (https://github.com/ansible-collections/kubernetes.core/pull/85).
- helm_plugin_info - remove unused ``release_namespace`` parameter (https://github.com/ansible-collections/kubernetes.core/pull/85).
- k8s_cluster_info - returned apis as list to avoid being overwritten in case of multiple version (https://github.com/ansible-collections/kubernetes.core/pull/41).
- k8s_facts - remove the deprecated alias from k8s_facts to k8s_info (https://github.com/ansible-collections/kubernetes.core/pull/125).
Bugfixes
--------
- enable unit tests in CI (https://github.com/ansible-collections/community.kubernetes/pull/407).
- helm - Accept ``validate_certs`` with a ``context`` (https://github.com/ansible-collections/kubernetes.core/pull/74).
- helm - fix helm ignoring the kubeconfig context when passed through the ``context`` param or the ``K8S_AUTH_CONTEXT`` environment variable (https://github.com/ansible-collections/community.kubernetes/issues/385).
- helm - handle multiline output of ``helm plugin list`` command (https://github.com/ansible-collections/community.kubernetes/issues/399).
- k8s - fix merge_type option when set to json (https://github.com/ansible-collections/kubernetes.core/issues/54).
- k8s - lookup should return list even if single item is found (https://github.com/ansible-collections/kubernetes.core/issues/9).
- k8s inventory - remove extra trailing slashes from the hostname (https://github.com/ansible-collections/kubernetes.core/issues/52).
New Modules
-----------
- k8s_json_patch - Apply JSON patch operations to existing objects
v1.2.0
======

View File

@@ -9,16 +9,16 @@ https://docs.ansible.com/ansible/latest/community/index.html).
## Kubernetes Collections
### community.kubernetes
### kubernetes.core
This collection contains modules and plugins contributed and maintained by the Ansible Kubernetes
community.
New modules and plugins developed by the community should be proposed to `community.kubernetes`.
New modules and plugins developed by the community should be proposed to `kubernetes.core`.
## Submitting Issues
All software has bugs, and the `community.kubernetes` collection is no exception. When you find a bug,
you can help tremendously by [telling us about it](https://github.com/ansible-collections/community.kubernetes/issues/new/choose).
All software has bugs, and the `kubernetes.core` collection is no exception. When you find a bug,
you can help tremendously by [telling us about it](https://github.com/ansible-collections/kubernetes.core/issues/new/choose).
If you should discover that the bug you're trying to file already exists in an issue,
you can help by verifying the behavior of the reported bug with a comment in that
@@ -28,7 +28,7 @@ issue, or by reporting any additional information.
All modules MUST have integration tests for new features.
Bug fixes for modules that currently have integration tests SHOULD have tests added.
New modules should be submitted to the [community.kubernetes](https://github.com/ansible-collections/community.kubernetes) collection and MUST have integration tests.
New modules should be submitted to the [kubernetes.core](https://github.com/ansible-collections/kubernetes.core) collection and MUST have integration tests.
Expected test criteria:
* Resource creation under check mode
@@ -48,18 +48,33 @@ Where modules have multiple parameters we recommend running through the 4-step m
For general information on running the integration tests see the
[Integration Tests page of the Module Development Guide](https://docs.ansible.com/ansible/devel/dev_guide/testing_integration.html#testing-integration),
especially the section on configuration for cloud tests. For questions about writing tests the Ansible Kubernetes community can be found on Freenode IRC as detailed below.
especially the section on configuration for cloud tests. For questions about writing tests the Ansible Kubernetes community can be found on Libera.Chat IRC as detailed below.
### Updating documentation
Modules and plugins documentation is autogenerated using ``collection_prep_add_docs`` command from [collection_prep](https://github.com/ansible-network/collection_prep) package.
You can install ``collection_prep`` using
# git clone https://github.com/ansible-network/collection_prep
# cd collection_prep
# pip install .
After installation, you can update documentation
# collection_prep_add_docs -p /<PATH_OF_COLLECTION>/kubernetes/core
Review the changes and create a pull request using updated files.
### Code of Conduct
The `community.kubernetes` collection follows the Ansible project's
The `kubernetes.core` collection follows the Ansible project's
[Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html).
Please read and familiarize yourself with this document.
### IRC
Our IRC channels may require you to register your nickname. If you receive an error when you connect, see
[Freenode's Nickname Registration guide](https://freenode.net/kb/answer/registration) for instructions.
[Libera.Chat's Nickname Registration guide](https://libera.chat/guides/registration) for instructions.
The `#ansible-kubernetes` channel on Freenode IRC is the main and official place to discuss use and development of the `community.kubernetes` collection.
The `#ansible-kubernetes` channel on [libera.chat](https://libera.chat/) IRC is the main and official place to discuss use and development of the `kubernetes.core` collection.
For more information about Ansible's Kubernetes integration, browse the resources in the [Kubernetes Working Group](https://github.com/ansible/community/wiki/Kubernetes) Community wiki page.

View File

@@ -1,11 +1,11 @@
# Also needs to be updated in galaxy.yml
VERSION = 1.2.0
VERSION = 2.0.0
TEST_ARGS ?= ""
PYTHON_VERSION ?= `python -c 'import platform; print("{0}.{1}".format(platform.python_version_tuple()[0], platform.python_version_tuple()[1]))'`
clean:
rm -f community-kubernetes-${VERSION}.tar.gz
rm -f kubernetes-core-${VERSION}.tar.gz
rm -rf ansible_collections
rm -rf tests/output
@@ -13,10 +13,10 @@ build: clean
ansible-galaxy collection build
release: build
ansible-galaxy collection publish community-kubernetes-${VERSION}.tar.gz
ansible-galaxy collection publish kubernetes-core-${VERSION}.tar.gz
install: build
ansible-galaxy collection install -p ansible_collections community-kubernetes-${VERSION}.tar.gz
ansible-galaxy collection install -p ansible_collections kubernetes-core-${VERSION}.tar.gz
test-sanity:
ansible-test sanity --docker -v --color --python $(PYTHON_VERSION) $(?TEST_ARGS)
@@ -27,17 +27,5 @@ test-integration:
test-molecule:
molecule test
downstream-test-sanity:
./utils/downstream.sh -s
downstream-test-integration:
./utils/downstream.sh -i
downstream-test-molecule:
./utils/downstream.sh -m
downstream-build:
./utils/downstream.sh -b
downstream-release:
./utils/downstream.sh -r
test-unit:
ansible-test units --docker -v --color --python $(PYTHON_VERSION) $(?TEST_ARGS)

130
README.md
View File

@@ -1,38 +1,72 @@
# Kubernetes Collection for Ansible
[![CI](https://github.com/ansible-collections/community.kubernetes/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/community.kubernetes/actions) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.kubernetes)](https://codecov.io/gh/ansible-collections/community.kubernetes)
[![CI](https://github.com/ansible-collections/kubernetes.core/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/kubernetes.core/actions) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/kubernetes.core)](https://codecov.io/gh/ansible-collections/kubernetes.core)
This repo hosts the `community.kubernetes` (a.k.a. `kubernetes.core`) Ansible Collection.
This repo hosts the `kubernetes.core` (formerly known as `community.kubernetes`) Ansible Collection.
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.
<!--start requires_ansible-->
## Ansible version compatibility
This collection has been tested against following Ansible versions: **>=2.9.17**.
Plugins and modules within a collection may be tested with only specific Ansible versions.
A collection may contain metadata that identifies these versions.
PEP440 is the schema used to describe the versions of Ansible.
<!--end requires_ansible-->
## Python Support
* Collection supports 3.6+
Note: Python2 is deprecated from [1st January 2020](https://www.python.org/doc/sunset-python-2/). Please switch to Python3.
## Included content
Click on the name of a plugin or module to view that content's documentation:
- **Connection Plugins**:
- [kubectl](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/kubectl_connection.html)
- **Filter Plugins**:
- [k8s_config_resource_name](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#kubernetes-filters)
- **Inventory Source**:
- [k8s](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_inventory.html)
- [openshift](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/openshift_inventory.html)
- **Lookup Plugins**:
- [k8s](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_lookup.html)
- **Modules**:
- [k8s](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_module.html)
- [k8s_auth](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_auth_module.html)
- [k8s_cluster_info](https://github.com/ansible-collections/community.kubernetes/blob/main/plugins/modules/k8s_cluster_info.py)
- [k8s_exec](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_exec_module.html)
- [k8s_info](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_info_module.html)
- [k8s_log](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_log_module.html)
- [k8s_scale](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_scale_module.html)
- [k8s_service](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/k8s_service_module.html)
- [helm](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/helm_module.html)
- [helm_info](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/helm_info_module.html)
- [helm_plugin](https://github.com/ansible-collections/community.kubernetes/blob/main/plugins/modules/helm_plugin.py)
- [helm_plugin_info](https://github.com/ansible-collections/community.kubernetes/blob/main/plugins/modules/helm_plugin_info.py)
- [helm_repository](https://docs.ansible.com/ansible/2.10/collections/community/kubernetes/helm_repository_module.html)
<!--start collection content-->
### Connection plugins
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.
### K8s filter plugins
Name | Description
--- | ---
kubernetes.core.k8s_config_resource_name|Generate resource name for the given resource of type ConfigMap, Secret
### Inventory plugins
Name | Description
--- | ---
[kubernetes.core.k8s](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_inventory.rst)|Kubernetes (K8s) inventory source
### Lookup plugins
Name | Description
--- | ---
[kubernetes.core.k8s](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_lookup.rst)|Query the K8s API
### Modules
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_info](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.helm_info_module.rst)|Get information from Helm package deployed inside the cluster
[kubernetes.core.helm_plugin](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.helm_plugin_module.rst)|Manage Helm plugins
[kubernetes.core.helm_plugin_info](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.helm_plugin_info_module.rst)|Gather information about Helm plugins
[kubernetes.core.helm_repository](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.helm_repository_module.rst)|Manage Helm repositories.
[kubernetes.core.helm_template](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.helm_template_module.rst)|Render chart templates
[kubernetes.core.k8s](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_module.rst)|Manage Kubernetes (K8s) objects
[kubernetes.core.k8s_cluster_info](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_cluster_info_module.rst)|Describe Kubernetes (K8s) cluster, APIs available and their respective versions
[kubernetes.core.k8s_exec](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_exec_module.rst)|Execute command in Pod
[kubernetes.core.k8s_info](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_info_module.rst)|Describe Kubernetes (K8s) objects
[kubernetes.core.k8s_json_patch](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_json_patch_module.rst)|Apply JSON patch operations to existing objects
[kubernetes.core.k8s_log](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_log_module.rst)|Fetch logs from Kubernetes resources
[kubernetes.core.k8s_rollback](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_rollback_module.rst)|Rollback Kubernetes (K8S) Deployments and DaemonSets
[kubernetes.core.k8s_scale](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_scale_module.rst)|Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
[kubernetes.core.k8s_service](https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_service_module.rst)|Manage Services on Kubernetes
<!--end collection content-->
## Installation and Usage
@@ -40,26 +74,26 @@ Click on the name of a plugin or module to view that content's documentation:
Before using the Kubernetes collection, you need to install it with the Ansible Galaxy CLI:
ansible-galaxy collection install community.kubernetes
ansible-galaxy collection install kubernetes.core
You can also include it in a `requirements.yml` file and install it via `ansible-galaxy collection install -r requirements.yml`, using the format:
```yaml
---
collections:
- name: community.kubernetes
version: 1.2.0
- name: kubernetes.core
version: 2.0.0
```
### Installing the OpenShift Python Library
### Installing the Kubernetes Python Library
Content in this collection requires the [OpenShift Python client](https://pypi.org/project/openshift/) to interact with Kubernetes' APIs. You can install it with:
Content in this collection requires the [Kubernetes Python client](https://pypi.org/project/kubernetes/) to interact with Kubernetes' APIs. You can install it with:
pip3 install openshift
pip3 install kubernetes
### Using modules from the Kubernetes Collection in your playbooks
It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example `community.kubernetes.k8s_info`:
It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example `kubernetes.core.k8s_info`:
```yaml
---
@@ -69,14 +103,14 @@ It's preferable to use content in this collection using their Fully Qualified Co
tasks:
- name: Ensure the myapp Namespace exists.
community.kubernetes.k8s:
kubernetes.core.k8s:
api_version: v1
kind: Namespace
name: myapp
state: present
- name: Ensure the myapp Service exists in the myapp Namespace.
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
@@ -93,7 +127,7 @@ It's preferable to use content in this collection using their Fully Qualified Co
app: myapp
- name: Get a list of all Services in the myapp namespace.
community.kubernetes.k8s_info:
kubernetes.core.k8s_info:
kind: Service
namespace: myapp
register: myapp_services
@@ -112,7 +146,7 @@ If upgrading older playbooks which were built prior to Ansible 2.10 and this col
connection: local
collections:
- community.kubernetes
- kubernetes.core
tasks:
- name: Ensure the myapp Namespace exists.
@@ -125,11 +159,16 @@ If upgrading older playbooks which were built prior to Ansible 2.10 and this col
For documentation on how to use individual modules and other content included in this collection, please see the links in the 'Included content' section earlier in this README.
## Ansible Turbo mode
The ``kubernetes.core`` collection supports Ansible Turbo mode via ``cloud.common`` collection. 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
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 community.kubernetes](CONTRIBUTING.md).
See [Contributing to kubernetes.core](CONTRIBUTING.md).
### Testing with `ansible-test`
@@ -139,6 +178,7 @@ You can run the collection's test suites with the commands:
make test-sanity
make test-integration
make test-unit
### Testing with `molecule`
@@ -154,31 +194,21 @@ Releases are automatically built and pushed to Ansible Galaxy for any new tag. B
1. Update the version in the following places:
1. The `version` in `galaxy.yml`
2. This README's `requirements.yml` example
3. The `DOWNSTREAM_VERSION` in `utils/downstream.sh`
4. The `VERSION` in `Makefile`
3. The `VERSION` in `Makefile`
2. Update the CHANGELOG:
1. Make sure you have [`antsibull-changelog`](https://pypi.org/project/antsibull-changelog/) installed.
2. Make sure there are fragments for all known changes in `changelogs/fragments`.
3. Run `antsibull-changelog release`.
3. Commit the changes and create a PR with the changes. Wait for tests to pass, then merge it once they have.
4. Tag the version in Git and push to GitHub.
5. Manually build and release the `kubernetes.core` collection (see following section).
After the version is published, verify it exists on the [Kubernetes Collection Galaxy page](https://galaxy.ansible.com/community/kubernetes).
### Publishing `kubernetes.core`
Until the contents of repository are moved into a new `kubernetes.core` repository on GitHub, this repository is the source of both the `kubernetes.core` and `community.kubernetes` repositories on Ansible Galaxy.
To publish the `kubernetes.core` collection on Ansible Galaxy, do the following:
1. Run `make downstream-release` (on macOS, add `LC_ALL=C` before the command).
After the version is published, verify it exists on the [Kubernetes Collection Galaxy page](https://galaxy.ansible.com/kubernetes/core).
The process for uploading a supported release to Automation Hub is documented separately.
## More Information
For more information about Ansible's Kubernetes integration, join the `#ansible-kubernetes` channel on Freenode 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.
## License

View File

@@ -312,3 +312,86 @@ releases:
- 368-helm_template.yaml
- handle_valueerror.yml
release_date: '2021-02-17'
2.0.0:
changes:
breaking_changes:
- Drop python 2 support (https://github.com/ansible-collections/kubernetes.core/pull/86).
- helm_plugin - remove unused ``release_namespace`` parameter (https://github.com/ansible-collections/kubernetes.core/pull/85).
- helm_plugin_info - remove unused ``release_namespace`` parameter (https://github.com/ansible-collections/kubernetes.core/pull/85).
- k8s_cluster_info - returned apis as list to avoid being overwritten in case
of multiple version (https://github.com/ansible-collections/kubernetes.core/pull/41).
- k8s_facts - remove the deprecated alias from k8s_facts to k8s_info (https://github.com/ansible-collections/kubernetes.core/pull/125).
bugfixes:
- enable unit tests in CI (https://github.com/ansible-collections/community.kubernetes/pull/407).
- helm - Accept ``validate_certs`` with a ``context`` (https://github.com/ansible-collections/kubernetes.core/pull/74).
- helm - fix helm ignoring the kubeconfig context when passed through the ``context``
param or the ``K8S_AUTH_CONTEXT`` environment variable (https://github.com/ansible-collections/community.kubernetes/issues/385).
- helm - handle multiline output of ``helm plugin list`` command (https://github.com/ansible-collections/community.kubernetes/issues/399).
- k8s - fix merge_type option when set to json (https://github.com/ansible-collections/kubernetes.core/issues/54).
- k8s - lookup should return list even if single item is found (https://github.com/ansible-collections/kubernetes.core/issues/9).
- k8s inventory - remove extra trailing slashes from the hostname (https://github.com/ansible-collections/kubernetes.core/issues/52).
major_changes:
- k8s - deprecate merge_type=json. The JSON patch functionality has never worked
(https://github.com/ansible-collections/kubernetes.core/pull/99).
- k8s_json_patch - split JSON patch functionality out into a separate module
(https://github.com/ansible-collections/kubernetes.core/pull/99).
- replaces the openshift client with the official kubernetes client (https://github.com/ansible-collections/kubernetes.core/issues/34).
minor_changes:
- Add cache_file when DynamicClient is created (https://github.com/ansible-collections/kubernetes.core/pull/46).
- Add configmap and secret hash functionality (https://github.com/ansible-collections/kubernetes.core/pull/48).
- Add logic for cache file name generation (https://github.com/ansible-collections/kubernetes.core/pull/46).
- Replicate apply method in the DynamicClient (https://github.com/ansible-collections/kubernetes.core/pull/45).
- add ``proxy_headers`` option for authentication on k8s_xxx modules (https://github.com/ansible-collections/kubernetes.core/pull/58).
- add support for using tags when running molecule test suite (https://github.com/ansible-collections/kubernetes.core/pull/62).
- added documentation for ``kubernetes.core`` collection (https://github.com/ansible-collections/kubernetes.core/pull/50).
- common - removed ``KubernetesAnsibleModule``, use ``K8sAnsibleMixin`` instead
(https://github.com/ansible-collections/kubernetes.core/pull/70).
- helm - add example for complex values in ``helm`` module (https://github.com/ansible-collections/kubernetes.core/issues/109).
- k8s - Handle list of definition for option `template` (https://github.com/ansible-collections/kubernetes.core/pull/49).
- k8s - `continue_on_error` option added (whether to continue on creation/deletion
errors) (https://github.com/ansible-collections/kubernetes.core/pull/49).
- k8s - support ``patched`` value for ``state`` option. patched state is an
existing resource that has a given patch applied (https://github.com/ansible-collections/kubernetes.core/pull/90).
- k8s - wait for all pods to update when rolling out daemonset changes (https://github.com/ansible-collections/kubernetes.core/pull/102).
- k8s_scale - ability to scale multiple resource using ``label_selectors`` (https://github.com/ansible-collections/kubernetes.core/pull/114).
- k8s_scale - new parameter to determine whether to continue or not on error
when scaling multiple resources (https://github.com/ansible-collections/kubernetes.core/pull/114).
- kubeconfig - update ``kubeconfig`` file location in the documentation (https://github.com/ansible-collections/kubernetes.core/issues/53).
- remove old change log fragment files.
- remove the deprecated ``KubernetesRawModule`` class (https://github.com/ansible-collections/community.kubernetes/issues/232).
- replicate base resource for lists functionality (https://github.com/ansible-collections/kubernetes.core/pull/89).
fragments:
- 102-wait-updated-daemonset-pods.yaml
- 114-k8s_scale-add-label-selectors-and-continue-on-error.yaml
- 125-remove-k8s-facts-alias.yaml
- 379-remove-kubernetesrawmodule.yaml
- 387-fix-helm-ignoring-context.yaml
- 399-helm_multiline.yml
- 407-enable-unit-tests.yaml
- 41-fix-apis-being-overwritten-in-k8s_cluster_info.yaml
- 45-add-apply-method.yml
- 46-cachefile_dynamic_client.yml
- 48_hash-configmap-secret.yml
- 49-k8s-loop-flattening-and-continue_on_error.yaml
- 52_inventory.yml
- 53_kubeconfig_docs.yml
- 58-add-support-for-proxy_headers-on-authentication.yaml
- 62-molecule-tags.yaml
- 83-k8s-fix-merge_type-json.yaml
- 85_helm_plugin.yaml
- 86_drop_python2_support.yaml
- 89-replicate-base-resource.yaml
- 90-k8s-add-parameter-patch_only.yml
- 96-replace-openshift-client.yaml
- 99-json-patch-module.yaml
- 9_lookup_k8s.yml
- add_docs.yml
- helm_example.yml
- helm_validate_certs_not_exclusive.yaml
- remove_KubernetesAnsibleModule.yml
- remove_fragment.yml
modules:
- description: Apply JSON patch operations to existing objects
name: k8s_json_patch
namespace: ''
release_date: '2021-06-09'

View File

@@ -3,7 +3,7 @@ changelog_filename_template: ../CHANGELOG.rst
changelog_filename_version_depth: 0
changes_file: changelog.yaml
changes_format: combined
keep_fragments: true
keep_fragments: false
mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s_scale - Fix scale wait and add tests (https://github.com/ansible-collections/community.kubernetes/pull/100).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Don't require project coverage check on PRs (https://github.com/ansible-collections/community.kubernetes/pull/102).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- Fix suboption docs structure for inventory plugins (https://github.com/ansible-collections/community.kubernetes/pull/103).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Use improved kubernetes diffs where possible (https://github.com/ansible-collections/community.kubernetes/pull/105).

View File

@@ -1,2 +0,0 @@
bugfixes:
- helm - add replace parameter (https://github.com/ansible-collections/community.kubernetes/issues/106).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Add action groups for playbooks with module_defaults (https://github.com/ansible-collections/community.kubernetes/pull/107).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm - minor code refactoring (https://github.com/ansible-collections/community.kubernetes/pull/110).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Minor documentation fixes and use of FQCN in some examples (https://github.com/ansible-collections/community.kubernetes/pull/114).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm - add 'atomic' option (https://github.com/ansible-collections/community.kubernetes/pull/115).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm_info and helm_repository - minor code refactor (https://github.com/ansible-collections/community.kubernetes/pull/117).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- k8s - Handle set object retrieved from lookup plugin (https://github.com/ansible-collections/community.kubernetes/pull/118).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- Handle invalid kubeconfig parsing error (https://github.com/ansible-collections/community.kubernetes/pull/119).

View File

@@ -1,2 +0,0 @@
minor_changes:
- k8s_exec - return RC for the command executed (https://github.com/ansible-collections/community.kubernetes/issues/122).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Check Python code using flake8 (https://github.com/ansible-collections/community.kubernetes/pull/123).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Add requires_ansible version constraints to runtime.yml (https://github.com/ansible-collections/community.kubernetes/pull/126).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Remove action_groups_redirection entry from meta/runtime.yml (https://github.com/ansible-collections/community.kubernetes/pull/127).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s - Fix argspec for 'elements' (https://github.com/ansible-collections/community.kubernetes/issues/13).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Add sanity test ignore file for Ansible 2.11 (https://github.com/ansible-collections/community.kubernetes/pull/130).

View File

@@ -1,3 +0,0 @@
---
major_changes:
- Add changelog and fragments and document changelog process (https://github.com/ansible-collections/community.kubernetes/pull/131).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- raw - handle condition when definition is none (https://github.com/ansible-collections/community.kubernetes/pull/139).

View File

@@ -1,3 +0,0 @@
---
major_changes:
- k8s_exec - New module for executing commands on pods via Kubernetes API (https://github.com/ansible-collections/community.kubernetes/pull/14).

View File

@@ -1,4 +0,0 @@
---
minor_changes:
- helm - add support for K8S_AUTH_KUBECONFIG and K8S_AUTH_CONTEXT environment variable (https://github.com/ansible-collections/community.kubernetes/issues/140).
- helm_info - add support for K8S_AUTH_KUBECONFIG and K8S_AUTH_CONTEXT environment variable (https://github.com/ansible-collections/community.kubernetes/issues/140).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm - Add support for K8S_AUTH_CONTEXT, K8S_AUTH_KUBECONFIG env (https://github.com/ansible-collections/community.kubernetes/pull/141).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Use FQCN in module docs and plugin examples (https://github.com/ansible-collections/community.kubernetes/pull/146).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Update base branch to 'main' (https://github.com/ansible-collections/community.kubernetes/issues/148).

View File

@@ -1,4 +0,0 @@
---
minor_changes:
- helm - add aliases context for kube_context (https://github.com/ansible-collections/community.kubernetes/pull/152).
- helm_info - add aliases context for kube_context (https://github.com/ansible-collections/community.kubernetes/pull/152).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- Update openshift requirements in k8s module doc (https://github.com/ansible-collections/community.kubernetes/pull/153).

View File

@@ -1,4 +0,0 @@
---
major_changes:
- helm_plugin - new module to manage Helm plugins (https://github.com/ansible-collections/community.kubernetes/pull/154).
- helm_plugin_info - new modules to gather information about Helm plugins (https://github.com/ansible-collections/community.kubernetes/pull/154).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Ensure check mode results are as expected (https://github.com/ansible-collections/community.kubernetes/pull/155).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- k8s_info - Update example using vars (https://github.com/ansible-collections/community.kubernetes/pull/156).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm - Allow creating namespaces with Helm (https://github.com/ansible-collections/community.kubernetes/pull/157).

View File

@@ -1,3 +0,0 @@
---
major_changes:
- k8s_exec - Return rc for the command executed (https://github.com/ansible-collections/community.kubernetes/pull/158).

View File

@@ -1,3 +0,0 @@
---
security_fixes:
- kubectl - redacted token and password from console log (https://github.com/ansible-collections/community.kubernetes/pull/159).

View File

@@ -1,3 +0,0 @@
---
major_changes:
- k8s_log - New module for retrieving pod logs (https://github.com/ansible-collections/community.kubernetes/pull/16).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- Test against stable ansible branch so molecule tests work (https://github.com/ansible-collections/community.kubernetes/pull/168).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- raw - Handle exception raised by underlying APIs (https://github.com/ansible-collections/community.kubernetes/pull/180).

View File

@@ -1,2 +0,0 @@
bugfixes:
- k8s_info - add wait functionality (https://github.com/ansible-collections/community.kubernetes/issues/18).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Added a contribution guide (https://github.com/ansible-collections/community.kubernetes/pull/192).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm - Return status in check mode (https://github.com/ansible-collections/community.kubernetes/pull/192).

View File

@@ -1,3 +0,0 @@
---
major_changes:
- k8s_* - Add support for vaulted kubeconfig and src (https://github.com/ansible-collections/community.kubernetes/pull/193).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Add probot stale bot configuration to autoclose issues (https://github.com/ansible-collections/community.kubernetes/pull/196).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Add Makefile and downstream build script for kubernetes.core (https://github.com/ansible-collections/community.kubernetes/pull/197).

View File

@@ -1,2 +0,0 @@
minor_changes:
- kubectl plugin - correct console log (https://github.com/ansible-collections/community.kubernetes/issues/200).

View File

@@ -1,2 +0,0 @@
minor_changes:
- k8s_info - update custom resource example (https://github.com/ansible-collections/community.kubernetes/issues/202).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s (inventory) - Set the connection plugin and transport separately (https://github.com/ansible-collections/community.kubernetes/pull/208).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Add execution environment metadata (https://github.com/ansible-collections/community.kubernetes/pull/211).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Refactor module_utils (https://github.com/ansible-collections/community.kubernetes/pull/223).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- common - handle exception raised due to DynamicClient (https://github.com/ansible-collections/community.kubernetes/pull/224).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Replace KubernetesAnsibleModule class with dummy class (https://github.com/ansible-collections/community.kubernetes/pull/227).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- common - Do not mark task as changed when diff is irrelevant (https://github.com/ansible-collections/community.kubernetes/pull/228).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm_* - Support vaulted kubeconfig (https://github.com/ansible-collections/community.kubernetes/pull/229).

View File

@@ -1,3 +0,0 @@
---
major_changes:
- k8s - Add support for template parameter (https://github.com/ansible-collections/community.kubernetes/pull/230).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Replace KubernetesRawModule class with K8sAnsibleMixin (https://github.com/ansible-collections/community.kubernetes/pull/231).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- k8s - SelfSubjectAccessReviews supported when 405 response received (https://github.com/ansible-collections/community.kubernetes/pull/237).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- k8s_info - Add support for wait (https://github.com/ansible-collections/community.kubernetes/pull/235).

View File

@@ -1,2 +0,0 @@
minor_changes:
- k8s - add testcase for adding multiple resources using template parameter (https://github.com/ansible-collections/community.kubernetes/issues/243).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- helm - Add appVersion idempotence check to Helm (https://github.com/ansible-collections/community.kubernetes/pull/246).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s (inventory) - Specify FQCN for k8s inventory plugin to fix use with Ansible 2.9 (https://github.com/ansible-collections/community.kubernetes/pull/250).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s - Fix sanity test 'compile' failing because of positional args (https://github.com/ansible-collections/community.kubernetes/issues/260).

View File

@@ -1,2 +0,0 @@
bugfixes:
- helm - return values in check mode when release is not present (https://github.com/ansible-collections/community.kubernetes/issues/280).

View File

@@ -1,3 +0,0 @@
minor_changes:
- k8s - check if src file is located on remote node or on Ansible Controller (https://github.com/ansible-collections/community.kubernetes/issues/307).
- k8s - check if kubeconfig file is located on remote node or on Ansible Controller (https://github.com/ansible-collections/community.kubernetes/issues/307).

View File

@@ -1,2 +0,0 @@
minor_changes:
- k8s_info - add information about api_version while returning facts (https://github.com/ansible-collections/community.kubernetes/pull/308).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Adjust the documentation to clarify the fact ``wait_condition.status`` is a string.

View File

@@ -1,2 +0,0 @@
minor_changes:
- runtime.yml - update minimum Ansible version required for Kubernetes collection (https://github.com/ansible-collections/community.kubernetes/issues/314).

View File

@@ -1,4 +0,0 @@
---
minor_changes:
- The Helm modules (``helm``, ``helm_info``, ``helm_plugin``, ``helm_plugin_info``, ``helm_plugin_repository``) accept
the K8S environment variables like the other modules of the collections.

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Adjust the name of parameters of ``helm`` and ``helm_info`` to match the documentation. No playbook change required.

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s_service - Fix argspec (https://github.com/ansible-collections/community.kubernetes/issues/33).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- helm - ``release_values`` makes ansible always show changed state (https://github.com/ansible-collections/community.kubernetes/issues/274)

View File

@@ -1,2 +0,0 @@
minor_changes:
- k8s - add a ``delete_options`` parameter to control garbage collection behavior when deleting a resource (https://github.com/ansible-collections/community.kubernetes/issues/253).

View File

@@ -1,2 +0,0 @@
bugfixes:
- k8s - fix check_mode always showing changes when using stringData on Secrets (https://github.com/ansible-collections/community.kubernetes/issues/282).

View File

@@ -1,2 +0,0 @@
minor_changes:
- helm - add a ``skip_crds`` option to skip the installation of CRDs when installing or upgrading a chart (https://github.com/ansible-collections/community.kubernetes/issues/296).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Improve k8s Deployment and Daemonset wait conditions (https://github.com/ansible-collections/community.kubernetes/pull/35).

View File

@@ -1,2 +0,0 @@
minor_changes:
- k8s - add an example for downloading manifest file and applying (https://github.com/ansible-collections/community.kubernetes/issues/352).

View File

@@ -1,2 +0,0 @@
minor_changes:
- helm - add optional support for helm diff (https://github.com/ansible-collections/community.kubernetes/issues/248).

View File

@@ -1,3 +0,0 @@
bugfixes:
- helm_plugin - make unused ``release_namespace`` parameter as optional (https://github.com/ansible-collections/community.kubernetes/issues/357).
- helm_plugin_info - make unused ``release_namespace`` parameter as optional (https://github.com/ansible-collections/community.kubernetes/issues/357).

View File

@@ -1,2 +0,0 @@
bugfixes:
- respect the ``wait_timeout`` parameter in the ``k8s`` and ``k8s_info`` modules when a resource does not exist (https://github.com/ansible-collections/community.kubernetes/issues/344).

View File

@@ -1,2 +0,0 @@
minor_changes:
- k8s_exec - add a note about required permissions for the module (https://github.com/ansible-collections/community.kubernetes/issues/339).

View File

@@ -1,2 +0,0 @@
bugfixes:
- helm - make helm-diff plugin detection more reliable by splitting by any whitespace instead of explicit whitespace (``\s``) (https://github.com/ansible-collections/community.kubernetes/pull/362).

View File

@@ -1,2 +0,0 @@
minor_changes:
- helm_template - add helm_template module to support template functionality (https://github.com/ansible-collections/community.kubernetes/issues/367).

View File

@@ -1,12 +0,0 @@
---
major_changes:
- k8s - Inventory source migrated from Ansible 2.9 to Kubernetes collection.
- k8s - Module migrated from Ansible 2.9 to Kubernetes collection.
- k8s - Lookup plugin migrated from Ansible 2.9 to Kubernetes collection.
- k8s_auth - Module migrated from Ansible 2.9 to Kubernetes collection.
- k8s_info - Module migrated from Ansible 2.9 to Kubernetes collection.
- k8s_scale - Module migrated from Ansible 2.9 to Kubernetes collection.
- k8s_service - Module migrated from Ansible 2.9 to Kubernetes collection.
- k8s_config_resource_name - Filter plugin migrated from Ansible 2.9 to Kubernetes collection.
- kubectl - Connection plugin migrated from Ansible 2.9 to Kubernetes collection.
- openshift - Inventory source migrated from Ansible 2.9 to Kubernetes collection.

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- k8s - Added ``persist_config`` option for persisting refreshed tokens (https://github.com/ansible-collections/community.kubernetes/issues/49).

View File

@@ -1,3 +0,0 @@
---
security_fixes:
- kubectl - Warn about information disclosure when using options like ``kubectl_password``, ``kubectl_extra_args``, and ``kubectl_token`` to pass data through to the command line using the ``kubectl`` connection plugin (https://github.com/ansible-collections/community.kubernetes/pull/51).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- kubectl - Fix documentation in kubectl connection plugin (https://github.com/ansible-collections/community.kubernetes/pull/52).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s - Add exception handling when retrieving k8s client (https://github.com/ansible-collections/community.kubernetes/pull/54).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s - Use ``from_yaml`` filter with lookup examples in ``k8s`` module documentation examples (https://github.com/ansible-collections/community.kubernetes/pull/56).

View File

@@ -1,5 +0,0 @@
---
major_changes:
- helm - New module for managing Helm charts (https://github.com/ansible-collections/community.kubernetes/pull/61).
- helm_info - New module for retrieving Helm chart information (https://github.com/ansible-collections/community.kubernetes/pull/61).
- helm_repository - New module for managing Helm repositories (https://github.com/ansible-collections/community.kubernetes/pull/61).

View File

@@ -1,2 +0,0 @@
security_fixes:
- kubectl - connection plugin now redact kubectl_token and kubectl_password in console log (https://github.com/ansible-collections/community.kubernetes/issues/65).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- k8s_log - Module no longer attempts to parse log as JSON (https://github.com/ansible-collections/community.kubernetes/pull/69).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- Update GitHub Actions workflow for better CI stability (https://github.com/ansible-collections/community.kubernetes/pull/78).

View File

@@ -1,3 +0,0 @@
---
minor_changes:
- Rename repository to ``community.kubernetes`` (https://github.com/ansible-collections/community.kubernetes/pull/81).

View File

@@ -1,3 +0,0 @@
---
bugfixes:
- Make sure Service changes run correctly in check_mode (https://github.com/ansible-collections/community.kubernetes/pull/84).

Some files were not shown because too many files have changed in this diff Show More