From 0a6d3b604b3d1752d365c6aef17e502992a371a8 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 25 Jan 2024 15:05:01 -0500 Subject: [PATCH 1/9] Fix Sanity failures in stable-2.4 --- changelogs/fragments/fix_sanity_errors.yml | 3 ++ plugins/modules/helm_info.py | 1 + plugins/modules/helm_template.py | 1 + plugins/modules/k8s_drain.py | 1 + plugins/modules/k8s_info.py | 2 ++ plugins/modules/k8s_log.py | 1 + plugins/modules/k8s_rollback.py | 2 ++ plugins/modules/k8s_scale.py | 1 + tests/sanity/ignore-2.16.txt | 35 ++++++++++++++++++++++ 9 files changed, 47 insertions(+) create mode 100644 changelogs/fragments/fix_sanity_errors.yml create mode 100644 tests/sanity/ignore-2.16.txt diff --git a/changelogs/fragments/fix_sanity_errors.yml b/changelogs/fragments/fix_sanity_errors.yml new file mode 100644 index 0000000000..0806f136ac --- /dev/null +++ b/changelogs/fragments/fix_sanity_errors.yml @@ -0,0 +1,3 @@ +--- +trivial: + - Fix sanity validate-modules and yamllint failures. diff --git a/plugins/modules/helm_info.py b/plugins/modules/helm_info.py index aefd44778e..5a7a561662 100644 --- a/plugins/modules/helm_info.py +++ b/plugins/modules/helm_info.py @@ -52,6 +52,7 @@ - If set to C(uninstalling), show releases that are currently being uninstalled. type: list elements: str + default: [] version_added: "2.3.0" get_all_values: description: diff --git a/plugins/modules/helm_template.py b/plugins/modules/helm_template.py index ab50f87128..2a1872573b 100644 --- a/plugins/modules/helm_template.py +++ b/plugins/modules/helm_template.py @@ -98,6 +98,7 @@ required: false type: list elements: str + default: [] version_added: 2.4.0 values_files: description: diff --git a/plugins/modules/k8s_drain.py b/plugins/modules/k8s_drain.py index 31596d8c4a..0f353a6df9 100644 --- a/plugins/modules/k8s_drain.py +++ b/plugins/modules/k8s_drain.py @@ -46,6 +46,7 @@ description: - Specify options to delete pods. - This option has effect only when C(state) is set to I(drain). + default: {} suboptions: terminate_grace_period: description: diff --git a/plugins/modules/k8s_info.py b/plugins/modules/k8s_info.py index 4b29be119c..fdd5093acc 100644 --- a/plugins/modules/k8s_info.py +++ b/plugins/modules/k8s_info.py @@ -38,10 +38,12 @@ description: List of label selectors to use to filter results type: list elements: str + default: [] field_selectors: description: List of field selectors to use to filter results type: list elements: str + default: [] extends_documentation_fragment: - kubernetes.core.k8s_auth_options diff --git a/plugins/modules/k8s_log.py b/plugins/modules/k8s_log.py index e52d5bce7b..48537e4ac6 100644 --- a/plugins/modules/k8s_log.py +++ b/plugins/modules/k8s_log.py @@ -47,6 +47,7 @@ - Only one of I(name) or I(label_selectors) may be provided. type: list elements: str + default: [] container: description: - Use to specify the container within a pod to grab the log from. diff --git a/plugins/modules/k8s_rollback.py b/plugins/modules/k8s_rollback.py index 8dfab4596e..8dd6862942 100644 --- a/plugins/modules/k8s_rollback.py +++ b/plugins/modules/k8s_rollback.py @@ -24,10 +24,12 @@ description: List of label selectors to use to filter results. type: list elements: str + default: [] field_selectors: description: List of field selectors to use to filter results. type: list elements: str + default: [] extends_documentation_fragment: - kubernetes.core.k8s_auth_options - kubernetes.core.k8s_name_options diff --git a/plugins/modules/k8s_scale.py b/plugins/modules/k8s_scale.py index a7cdfe1e0a..c3e5f84259 100644 --- a/plugins/modules/k8s_scale.py +++ b/plugins/modules/k8s_scale.py @@ -36,6 +36,7 @@ description: List of label selectors to use to filter results. type: list elements: str + default: [] version_added: 2.0.0 continue_on_error: description: diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt new file mode 100644 index 0000000000..95cd652aea --- /dev/null +++ b/tests/sanity/ignore-2.16.txt @@ -0,0 +1,35 @@ +plugins/module_utils/client/discovery.py import-3.6!skip +plugins/module_utils/client/discovery.py import-3.7!skip +plugins/module_utils/client/discovery.py import-3.8!skip +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/resource.py import-3.6!skip +plugins/module_utils/client/resource.py import-3.7!skip +plugins/module_utils/client/resource.py import-3.8!skip +plugins/module_utils/client/resource.py import-3.9!skip +plugins/module_utils/client/resource.py import-3.10!skip +plugins/module_utils/client/resource.py import-3.11!skip +plugins/module_utils/k8sdynamicclient.py import-3.6!skip +plugins/module_utils/k8sdynamicclient.py import-3.7!skip +plugins/module_utils/k8sdynamicclient.py import-3.8!skip +plugins/module_utils/k8sdynamicclient.py import-3.9!skip +plugins/module_utils/k8sdynamicclient.py import-3.10!skip +plugins/module_utils/k8sdynamicclient.py import-3.11!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/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 +tests/sanity/refresh_ignore_files shebang!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 From 15da427a3487b8eea19193628270d28d389db12e Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 25 Jan 2024 15:17:09 -0500 Subject: [PATCH 2/9] Add GH workflows --- .github/workflows/changelog.yaml | 21 +++ .github/workflows/galaxy-import.yaml | 14 ++ .github/workflows/integration-tests.yaml | 144 +++++++++++++++++++++ .github/workflows/linters.yaml | 24 ++++ .github/workflows/sanity-tests.yaml | 15 +++ .github/workflows/unit-tests.yaml | 14 ++ changelogs/fragments/fix_sanity_errors.yml | 1 + 7 files changed, 233 insertions(+) create mode 100644 .github/workflows/changelog.yaml create mode 100644 .github/workflows/galaxy-import.yaml create mode 100644 .github/workflows/integration-tests.yaml create mode 100644 .github/workflows/linters.yaml create mode 100644 .github/workflows/sanity-tests.yaml create mode 100644 .github/workflows/unit-tests.yaml diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000000..b59768b418 --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,21 @@ +--- +name: Changelog +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: + - opened + - reopened + - labeled + - unlabeled + - synchronize + branches: + - main + - stable-* + +jobs: + changelog: + uses: ansible-network/github_actions/.github/workflows/changelog.yml@main diff --git a/.github/workflows/galaxy-import.yaml b/.github/workflows/galaxy-import.yaml new file mode 100644 index 0000000000..9c21824e31 --- /dev/null +++ b/.github/workflows/galaxy-import.yaml @@ -0,0 +1,14 @@ +name: galaxy-import +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + +on: + pull_request: + branches: + - main + - stable-* + +jobs: + galaxy_importer: + uses: ansible-network/github_actions/.github/workflows/galaxy_importer.yml@main diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml new file mode 100644 index 0000000000..be1cc93aa3 --- /dev/null +++ b/.github/workflows/integration-tests.yaml @@ -0,0 +1,144 @@ +name: Integration tests +on: + pull_request: + types: + - opened + - reopened + - labeled + - unlabeled + - synchronize + branches: + - main + - stable-* + +jobs: + splitter: + env: + source_dir: "./source" + runs-on: ubuntu-latest + outputs: + test_targets: ${{ steps.splitter.outputs.test_targets }} + test_targets_json: ${{ steps.splitter.outputs.test_targets_json }} + test_jobs: ${{ steps.splitter.outputs.test_jobs }} + steps: + - name: Checkout the collection repository + uses: actions/checkout@v3 + with: + path: ${{ env.source_dir }} + fetch-depth: "0" + + - name: list changes for pull request + id: splitter + uses: ansible-network/github_actions/.github/actions/ansible_test_splitter@main + with: + collections_to_test: ${{ env.source_dir }} + total_jobs: 8 + + - name: Display splitter output + run: | + echo "test_targets=${{ steps.splitter.outputs.test_targets }}" + echo "test_targets_json=${{ steps.splitter.outputs.test_targets_json }}" + echo "test_jobs=${{ steps.splitter.outputs.test_jobs }}" + shell: bash + integration: + runs-on: ubuntu-latest + timeout-minutes: 60 + needs: + - splitter + if: ${{ needs.splitter.outputs.test_targets != '' }} + env: + source: "./source" + cloud_common: "./cloudcommon" + ansible_posix: "./ansible_posix" + strategy: + fail-fast: false + matrix: + ansible-version: + - milestone + python-version: + - "3.12" + enable-turbo-mode: + - true + - false + workflow-id: ${{ fromJson(needs.splitter.outputs.test_jobs) }} + name: "integration-py${{ matrix.python-version }}-${{ matrix.ansible-version }}-${{ matrix.workflow-id }}" + steps: + - name: Read target + id: read-targets + run: | + import json, os + with open(os.environ.get('GITHUB_OUTPUT'), "a", encoding="utf-8") as fh: + fh.write(f'ansible_test_targets={json.loads(os.environ.get("ALL_TEST_TARGETS")).get(os.environ.get("WORKFLOW_ID"))}\n') + shell: python + env: + ALL_TEST_TARGETS: ${{ needs.splitter.outputs.test_targets_json }} + WORKFLOW_ID: ${{ matrix.workflow-id }} + + - name: Display ansible test targets + run: | + echo "ansible_test_targets -> ${{ steps.read-targets.outputs.ansible_test_targets }}" + + - name: Checkout kubernetes.core repository + uses: actions/checkout@v3 + with: + path: ${{ env.source }} + ref: ${{ github.event.pull_request.head.sha }} + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + # install ansible + - name: Install ansible-core (${{ matrix.ansible-version }}) + run: >- + python3 -m pip install + https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz + --disable-pip-version-check + shell: bash + + - name: Build and install collection + id: install-src + uses: ansible-network/github_actions/.github/actions/build_install_collection@main + with: + install_python_dependencies: true + source_path: ${{ env.source }} + + - name: checkout ansible-collections/cloud.common + uses: ansible-network/github_actions/.github/actions/checkout_dependency@main + with: + repository: ansible-collections/cloud.common + path: ${{ env.cloud_common }} + ref: main + + - name: checkout ansible-collections/ansible.posix + uses: ansible-network/github_actions/.github/actions/checkout_dependency@main + with: + repository: ansible-collections/ansible.posix + path: ${{ env.ansible_posix }} + ref: main + + - name: install cloud.common collection + uses: ansible-network/github_actions/.github/actions/build_install_collection@main + with: + install_python_dependencies: true + source_path: ${{ env.cloud_common }} + + - name: install ansible.posix collection + uses: ansible-network/github_actions/.github/actions/build_install_collection@main + with: + install_python_dependencies: true + source_path: ${{ env.ansible_posix }} + + - name: create kubernetes cluster + uses: helm/kind-action@v1.8.0 + + - name: Run integration tests + uses: ansible-network/github_actions/.github/actions/ansible_test_integration@main + with: + collection_path: ${{ steps.install-src.outputs.collection_path }} + python_version: ${{ matrix.python-version }} + ansible_version: ${{ matrix.ansible-version }} + ansible_test_targets: ${{ steps.read-targets.outputs.ansible_test_targets }} + ansible_test_environment: | + ENABLE_TURBO_MODE=${{ matrix.enable-turbo-mode }} diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml new file mode 100644 index 0000000000..9dd7f0e006 --- /dev/null +++ b/.github/workflows/linters.yaml @@ -0,0 +1,24 @@ +--- +name: Linters +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + branches: + - main + - stable-* + tags: + - '*' + +jobs: + linters: + uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main + ansible-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run ansible-lint + uses: ansible/ansible-lint@v6.21.0 diff --git a/.github/workflows/sanity-tests.yaml b/.github/workflows/sanity-tests.yaml new file mode 100644 index 0000000000..044f6def12 --- /dev/null +++ b/.github/workflows/sanity-tests.yaml @@ -0,0 +1,15 @@ +--- +name: Sanity tests +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + branches: + - main + - stable-* + +jobs: + sanity: + uses: ansible-network/github_actions/.github/workflows/sanity.yml@main diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml new file mode 100644 index 0000000000..19c8519b24 --- /dev/null +++ b/.github/workflows/unit-tests.yaml @@ -0,0 +1,14 @@ +name: Unit tests +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + branches: + - main + - stable-* + +jobs: + unit-source: + uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main diff --git a/changelogs/fragments/fix_sanity_errors.yml b/changelogs/fragments/fix_sanity_errors.yml index 0806f136ac..4abda439fe 100644 --- a/changelogs/fragments/fix_sanity_errors.yml +++ b/changelogs/fragments/fix_sanity_errors.yml @@ -1,3 +1,4 @@ --- trivial: - Fix sanity validate-modules and yamllint failures. + - Add GH workflows. From 9e412914891b73ff7314d02449e86be38d8d8fd6 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 25 Jan 2024 15:25:33 -0500 Subject: [PATCH 3/9] Add ignore statements --- test-requirements.txt | 2 ++ tests/sanity/ignore-2.14.txt | 12 +++--------- tests/sanity/ignore-2.15.txt | 1 + tests/sanity/ignore-2.16.txt | 1 + 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index c9068609da..47283a2f9c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,3 +5,5 @@ pytest pytest-xdist pytest-mock pytest-forked +virtualenv +pytest-ansible diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 6cfa02f6bf..3fa8284805 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -1,18 +1,12 @@ -plugins/module_utils/client/discovery.py import-3.6!skip -plugins/module_utils/client/discovery.py import-3.7!skip -plugins/module_utils/client/discovery.py import-3.8!skip plugins/module_utils/client/discovery.py import-3.9!skip plugins/module_utils/client/discovery.py import-3.10!skip -plugins/module_utils/client/resource.py import-3.6!skip -plugins/module_utils/client/resource.py import-3.7!skip -plugins/module_utils/client/resource.py import-3.8!skip +plugins/module_utils/client/discovery.py import-3.11!skip plugins/module_utils/client/resource.py import-3.9!skip plugins/module_utils/client/resource.py import-3.10!skip -plugins/module_utils/k8sdynamicclient.py import-3.6!skip -plugins/module_utils/k8sdynamicclient.py import-3.7!skip -plugins/module_utils/k8sdynamicclient.py import-3.8!skip +plugins/module_utils/client/resource.py import-3.11!skip plugins/module_utils/k8sdynamicclient.py import-3.9!skip plugins/module_utils/k8sdynamicclient.py import-3.10!skip +plugins/module_utils/k8sdynamicclient.py import-3.11!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 diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 95cd652aea..187efabfdb 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -1,3 +1,4 @@ +plugins/module_utils/version.py pylint!skip plugins/module_utils/client/discovery.py import-3.6!skip plugins/module_utils/client/discovery.py import-3.7!skip plugins/module_utils/client/discovery.py import-3.8!skip diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt index 95cd652aea..187efabfdb 100644 --- a/tests/sanity/ignore-2.16.txt +++ b/tests/sanity/ignore-2.16.txt @@ -1,3 +1,4 @@ +plugins/module_utils/version.py pylint!skip plugins/module_utils/client/discovery.py import-3.6!skip plugins/module_utils/client/discovery.py import-3.7!skip plugins/module_utils/client/discovery.py import-3.8!skip From ea54179b2398a44656faf265306e7f5e546bff8c Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 25 Jan 2024 15:35:12 -0500 Subject: [PATCH 4/9] Add ignore-2.17 and .ansible-lint --- tests/sanity/ignore-2.17.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/sanity/ignore-2.17.txt diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt new file mode 100644 index 0000000000..187efabfdb --- /dev/null +++ b/tests/sanity/ignore-2.17.txt @@ -0,0 +1,36 @@ +plugins/module_utils/version.py pylint!skip +plugins/module_utils/client/discovery.py import-3.6!skip +plugins/module_utils/client/discovery.py import-3.7!skip +plugins/module_utils/client/discovery.py import-3.8!skip +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/resource.py import-3.6!skip +plugins/module_utils/client/resource.py import-3.7!skip +plugins/module_utils/client/resource.py import-3.8!skip +plugins/module_utils/client/resource.py import-3.9!skip +plugins/module_utils/client/resource.py import-3.10!skip +plugins/module_utils/client/resource.py import-3.11!skip +plugins/module_utils/k8sdynamicclient.py import-3.6!skip +plugins/module_utils/k8sdynamicclient.py import-3.7!skip +plugins/module_utils/k8sdynamicclient.py import-3.8!skip +plugins/module_utils/k8sdynamicclient.py import-3.9!skip +plugins/module_utils/k8sdynamicclient.py import-3.10!skip +plugins/module_utils/k8sdynamicclient.py import-3.11!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/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 +tests/sanity/refresh_ignore_files shebang!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 From bb45bb676fc415664e3fe0f6e9baf37382a43f4f Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 25 Jan 2024 15:35:25 -0500 Subject: [PATCH 5/9] Add ignore-2.17 and .ansible-lint --- .ansible-lint | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000000..021b91886b --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,6 @@ +--- +profile: production + +exclude_paths: + - tests/integration + - tests/sanity From d40f4785521a763587fdf83815b7c78862e1bb76 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Fri, 26 Jan 2024 12:15:12 -0500 Subject: [PATCH 6/9] Add docs --- plugins/filter/k8s.py | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/plugins/filter/k8s.py b/plugins/filter/k8s.py index f5e0170e53..8cfc4d1971 100644 --- a/plugins/filter/k8s.py +++ b/plugins/filter/k8s.py @@ -1,12 +1,50 @@ # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type +DOCUMENTATION = r""" + +name: k8s_config_resource_name +short_description: Generate resource name for the given resource of type ConfigMap, Secret +description: + - Generate resource name for the given resource of type ConfigMap, Secret. + - Resource must have a C(metadata.name) key to generate a resource name +options: + _input: + description: + - A valid YAML definition for a ConfigMap or a Secret. + type: dict + required: true +author: + - ansible cloud team + +""" + +EXAMPLES = r""" + # Dump generated name for a configmap into a variable + - set_fact: + generated_name: '{{ definition | kubernetes.core.k8s_config_resource_name }}' + vars: + definition: + apiVersion: v1 + kind: ConfigMap + metadata: + name: myconfigmap + namespace: mynamespace +""" + +RETURN = r""" + _value: + description: Generated resource name. + type: str +""" + + from ansible.errors import AnsibleFilterError from ansible_collections.kubernetes.core.plugins.module_utils.hashes import ( generate_hash, From b01f78b0b79879e77a47703186b605a7cd92c3bb Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Mon, 29 Jan 2024 12:55:17 -0500 Subject: [PATCH 7/9] add ansible-host-pattern --- .github/workflows/unit-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 19c8519b24..33e38cc82d 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -11,4 +11,4 @@ on: jobs: unit-source: - uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main + uses: GomathiselviS/github_actions/.github/workflows/unit_source.yml@add_host_pattern From c255d11c6e057ddb027f5bcc70f90aecaaa54465 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Tue, 30 Jan 2024 13:09:52 -0500 Subject: [PATCH 8/9] ansible-lint fix --- .ansible-lint | 3 +- .github/stale.yml | 1 - .github/workflows/linters.yaml | 2 +- .github/workflows/unit-tests.yaml | 3 +- changelogs/changelog.yaml | 1262 ++++++++++++++--------------- changelogs/config.yaml | 32 +- galaxy.yml | 6 +- meta/runtime.yml | 10 +- plugins/filter/k8s.py | 20 +- plugins/inventory/k8s.py | 40 +- plugins/modules/k8s.py | 8 +- plugins/modules/k8s_drain.py | 3 +- 12 files changed, 656 insertions(+), 734 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 021b91886b..f139e6a02c 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,6 +1,7 @@ --- profile: production - +skip_list: + - meta-runtime[unsupported-version] exclude_paths: - tests/integration - tests/sanity diff --git a/.github/stale.yml b/.github/stale.yml index 230cf78a6d..4c7afd27ec 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -12,7 +12,6 @@ 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: diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 9dd7f0e006..589bfa7864 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -10,7 +10,7 @@ on: - main - stable-* tags: - - '*' + - "*" jobs: linters: diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 33e38cc82d..3f4ed52cd9 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -1,3 +1,4 @@ +--- name: Unit tests concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -11,4 +12,4 @@ on: jobs: unit-source: - uses: GomathiselviS/github_actions/.github/workflows/unit_source.yml@add_host_pattern + uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index f070f51057..1a0ce8fa3e 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1,764 +1,686 @@ -ancestor: null +--- +ancestor: releases: - 0.10.0: + "0.10.0": changes: bugfixes: - - k8s - Add exception handling when retrieving k8s client (https://github.com/ansible-collections/community.kubernetes/pull/54). - - k8s - Fix argspec for 'elements' (https://github.com/ansible-collections/community.kubernetes/issues/13). - - k8s - Use ``from_yaml`` filter with lookup examples in ``k8s`` module documentation - examples (https://github.com/ansible-collections/community.kubernetes/pull/56). - - k8s_service - Fix argspec (https://github.com/ansible-collections/community.kubernetes/issues/33). - - kubectl - Fix documentation in kubectl connection plugin (https://github.com/ansible-collections/community.kubernetes/pull/52). + - k8s - Add exception handling when retrieving k8s client (https://github.com/ansible-collections/community.kubernetes/pull/54). + - k8s - Fix argspec for 'elements' (https://github.com/ansible-collections/community.kubernetes/issues/13). + - k8s - Use ``from_yaml`` filter with lookup examples in ``k8s`` module documentation examples (https://github.com/ansible-collections/community.kubernetes/pull/56). + - k8s_service - Fix argspec (https://github.com/ansible-collections/community.kubernetes/issues/33). + - kubectl - Fix documentation in kubectl connection plugin (https://github.com/ansible-collections/community.kubernetes/pull/52). major_changes: - - k8s_exec - New module for executing commands on pods via Kubernetes API (https://github.com/ansible-collections/community.kubernetes/pull/14). - - k8s_log - New module for retrieving pod logs (https://github.com/ansible-collections/community.kubernetes/pull/16). + - k8s_exec - New module for executing commands on pods via Kubernetes API (https://github.com/ansible-collections/community.kubernetes/pull/14). + - k8s_log - New module for retrieving pod logs (https://github.com/ansible-collections/community.kubernetes/pull/16). minor_changes: - - k8s - Added ``persist_config`` option for persisting refreshed tokens (https://github.com/ansible-collections/community.kubernetes/issues/49). + - k8s - Added ``persist_config`` option for persisting refreshed tokens (https://github.com/ansible-collections/community.kubernetes/issues/49). 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). + - 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). fragments: - - 13-fix-elements-argspec.yaml - - 14-k8s_exec-new-module.yaml - - 16-k8s_log-new-module.yaml - - 33-k8s_service-fix-argspec.yaml - - 49-k8s-add-persist_config-option.yaml - - 51-kubectl-security-disclosure.yaml - - 52-kubectl-connection-docsfix.yaml - - 54-k8s-add-exception-handling.yaml - - 56-k8s-from_yaml-docs-examples.yaml + - 13-fix-elements-argspec.yaml + - 14-k8s_exec-new-module.yaml + - 16-k8s_log-new-module.yaml + - 33-k8s_service-fix-argspec.yaml + - 49-k8s-add-persist_config-option.yaml + - 51-kubectl-security-disclosure.yaml + - 52-kubectl-connection-docsfix.yaml + - 54-k8s-add-exception-handling.yaml + - 56-k8s-from_yaml-docs-examples.yaml modules: - - description: Execute command in Pod - name: k8s_exec - namespace: '' - - description: Fetch logs from Kubernetes resources - name: k8s_log - namespace: '' - release_date: '2020-03-23' - 0.11.0: + - description: Execute command in Pod + name: k8s_exec + namespace: "" + - description: Fetch logs from Kubernetes resources + name: k8s_log + namespace: "" + release_date: "2020-03-23" + "0.11.0": changes: bugfixes: - - Make sure extra files are not included in built collection (https://github.com/ansible-collections/community.kubernetes/pull/85). - - Update GitHub Actions workflow for better CI stability (https://github.com/ansible-collections/community.kubernetes/pull/78). - - k8s_log - Module no longer attempts to parse log as JSON (https://github.com/ansible-collections/community.kubernetes/pull/69). + - Make sure extra files are not included in built collection (https://github.com/ansible-collections/community.kubernetes/pull/85). + - Update GitHub Actions workflow for better CI stability (https://github.com/ansible-collections/community.kubernetes/pull/78). + - k8s_log - Module no longer attempts to parse log as JSON (https://github.com/ansible-collections/community.kubernetes/pull/69). 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). + - 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). minor_changes: - - Rename repository to ``community.kubernetes`` (https://github.com/ansible-collections/community.kubernetes/pull/81). + - Rename repository to ``community.kubernetes`` (https://github.com/ansible-collections/community.kubernetes/pull/81). fragments: - - 61-helm-new-modules.yaml - - 69-k8s_log-dont-parse-as-json.yaml - - 78-github-actions-workflow.yaml - - 81-rename-repository.yaml - - 85-exclude-unnecessary-files-when-building.yaml + - 61-helm-new-modules.yaml + - 69-k8s_log-dont-parse-as-json.yaml + - 78-github-actions-workflow.yaml + - 81-rename-repository.yaml + - 85-exclude-unnecessary-files-when-building.yaml modules: - - description: Manages Kubernetes packages with the Helm package manager - name: helm - namespace: '' - - description: Get information from Helm package deployed inside the cluster - name: helm_info - namespace: '' - - description: Add and remove Helm repository - name: helm_repository - namespace: '' - release_date: '2020-05-04' - 0.11.1: + - description: Manages Kubernetes packages with the Helm package manager + name: helm + namespace: "" + - description: Get information from Helm package deployed inside the cluster + name: helm_info + namespace: "" + - description: Add and remove Helm repository + name: helm_repository + namespace: "" + release_date: "2020-05-04" + "0.11.1": changes: bugfixes: - - Fix suboption docs structure for inventory plugins (https://github.com/ansible-collections/community.kubernetes/pull/103). - - Handle invalid kubeconfig parsing error (https://github.com/ansible-collections/community.kubernetes/pull/119). - - Make sure Service changes run correctly in check_mode (https://github.com/ansible-collections/community.kubernetes/pull/84). - - k8s_info - remove unneccessary k8s_facts deprecation notice (https://github.com/ansible-collections/community.kubernetes/pull/97). - - k8s_scale - Fix scale wait and add tests (https://github.com/ansible-collections/community.kubernetes/pull/100). - - raw - handle condition when definition is none (https://github.com/ansible-collections/community.kubernetes/pull/139). + - Fix suboption docs structure for inventory plugins (https://github.com/ansible-collections/community.kubernetes/pull/103). + - Handle invalid kubeconfig parsing error (https://github.com/ansible-collections/community.kubernetes/pull/119). + - Make sure Service changes run correctly in check_mode (https://github.com/ansible-collections/community.kubernetes/pull/84). + - k8s_info - remove unneccessary k8s_facts deprecation notice (https://github.com/ansible-collections/community.kubernetes/pull/97). + - k8s_scale - Fix scale wait and add tests (https://github.com/ansible-collections/community.kubernetes/pull/100). + - raw - handle condition when definition is none (https://github.com/ansible-collections/community.kubernetes/pull/139). major_changes: - - Add changelog and fragments and document changelog process (https://github.com/ansible-collections/community.kubernetes/pull/131). + - Add changelog and fragments and document changelog process (https://github.com/ansible-collections/community.kubernetes/pull/131). minor_changes: - - Add action groups for playbooks with module_defaults (https://github.com/ansible-collections/community.kubernetes/pull/107). - - Add requires_ansible version constraints to runtime.yml (https://github.com/ansible-collections/community.kubernetes/pull/126). - - Add sanity test ignore file for Ansible 2.11 (https://github.com/ansible-collections/community.kubernetes/pull/130). - - Add test for openshift apply bug (https://github.com/ansible-collections/community.kubernetes/pull/94). - - Add version_added to each new collection module (https://github.com/ansible-collections/community.kubernetes/pull/98). - - Check Python code using flake8 (https://github.com/ansible-collections/community.kubernetes/pull/123). - - Don't require project coverage check on PRs (https://github.com/ansible-collections/community.kubernetes/pull/102). - - Improve k8s Deployment and Daemonset wait conditions (https://github.com/ansible-collections/community.kubernetes/pull/35). - - Minor documentation fixes and use of FQCN in some examples (https://github.com/ansible-collections/community.kubernetes/pull/114). - - Remove action_groups_redirection entry from meta/runtime.yml (https://github.com/ansible-collections/community.kubernetes/pull/127). - - Remove deprecated ANSIBLE_METADATA field (https://github.com/ansible-collections/community.kubernetes/pull/95). - - Use FQCN in module docs and plugin examples (https://github.com/ansible-collections/community.kubernetes/pull/146). - - Use improved kubernetes diffs where possible (https://github.com/ansible-collections/community.kubernetes/pull/105). - - helm - add 'atomic' option (https://github.com/ansible-collections/community.kubernetes/pull/115). - - helm - minor code refactoring (https://github.com/ansible-collections/community.kubernetes/pull/110). - - helm_info and helm_repository - minor code refactor (https://github.com/ansible-collections/community.kubernetes/pull/117). - - k8s - Handle set object retrieved from lookup plugin (https://github.com/ansible-collections/community.kubernetes/pull/118). + - Add action groups for playbooks with module_defaults (https://github.com/ansible-collections/community.kubernetes/pull/107). + - Add requires_ansible version constraints to runtime.yml (https://github.com/ansible-collections/community.kubernetes/pull/126). + - Add sanity test ignore file for Ansible 2.11 (https://github.com/ansible-collections/community.kubernetes/pull/130). + - Add test for openshift apply bug (https://github.com/ansible-collections/community.kubernetes/pull/94). + - Add version_added to each new collection module (https://github.com/ansible-collections/community.kubernetes/pull/98). + - Check Python code using flake8 (https://github.com/ansible-collections/community.kubernetes/pull/123). + - Don't require project coverage check on PRs (https://github.com/ansible-collections/community.kubernetes/pull/102). + - Improve k8s Deployment and Daemonset wait conditions (https://github.com/ansible-collections/community.kubernetes/pull/35). + - Minor documentation fixes and use of FQCN in some examples (https://github.com/ansible-collections/community.kubernetes/pull/114). + - Remove action_groups_redirection entry from meta/runtime.yml (https://github.com/ansible-collections/community.kubernetes/pull/127). + - Remove deprecated ANSIBLE_METADATA field (https://github.com/ansible-collections/community.kubernetes/pull/95). + - Use FQCN in module docs and plugin examples (https://github.com/ansible-collections/community.kubernetes/pull/146). + - Use improved kubernetes diffs where possible (https://github.com/ansible-collections/community.kubernetes/pull/105). + - helm - add 'atomic' option (https://github.com/ansible-collections/community.kubernetes/pull/115). + - helm - minor code refactoring (https://github.com/ansible-collections/community.kubernetes/pull/110). + - helm_info and helm_repository - minor code refactor (https://github.com/ansible-collections/community.kubernetes/pull/117). + - k8s - Handle set object retrieved from lookup plugin (https://github.com/ansible-collections/community.kubernetes/pull/118). fragments: - - 100-k8s_scale-fix-wait.yaml - - 102-dont-require-codecov-check-prs.yaml - - 103-fix-inventory-docs-structure.yaml - - 105-improved-k8s-diffs.yaml - - 107-action-groups-module_defaults.yaml - - 110-helm-minor-refactor.yaml - - 114-minor-docs-fixes.yaml - - 115-helm-add-atomic.yaml - - 117-helm-minor-refactor.yaml - - 118-k8s-lookup-handle-set-object.yaml - - 119-handle-kubeconfig-error.yaml - - 123-flake8.yaml - - 126-requires_ansible-version-constraints.yaml - - 127-remove-action_groups_redirection.yaml - - 130-add-sanity-ignore-211.yaml - - 131-changelog-fragments.yaml - - 139-fix-manifest-ends-with-separator.yml - - 146-fqcn-in-docs.yaml - - 35-wait-conditions.yaml - - 84-check_mode-service-change.yaml - - 94-openshift-apply-test.yaml - - 95-remove-ANSIBLE_METADATA.yaml - - 97-remove-k8s_facts-deprecation.yaml - - 98-add-version_added.yaml - release_date: '2020-07-01' - 0.9.0: + - 100-k8s_scale-fix-wait.yaml + - 102-dont-require-codecov-check-prs.yaml + - 103-fix-inventory-docs-structure.yaml + - 105-improved-k8s-diffs.yaml + - 107-action-groups-module_defaults.yaml + - 110-helm-minor-refactor.yaml + - 114-minor-docs-fixes.yaml + - 115-helm-add-atomic.yaml + - 117-helm-minor-refactor.yaml + - 118-k8s-lookup-handle-set-object.yaml + - 119-handle-kubeconfig-error.yaml + - 123-flake8.yaml + - 126-requires_ansible-version-constraints.yaml + - 127-remove-action_groups_redirection.yaml + - 130-add-sanity-ignore-211.yaml + - 131-changelog-fragments.yaml + - 139-fix-manifest-ends-with-separator.yml + - 146-fqcn-in-docs.yaml + - 35-wait-conditions.yaml + - 84-check_mode-service-change.yaml + - 94-openshift-apply-test.yaml + - 95-remove-ANSIBLE_METADATA.yaml + - 97-remove-k8s_facts-deprecation.yaml + - 98-add-version_added.yaml + release_date: "2020-07-01" + "0.9.0": changes: major_changes: - - k8s - Inventory source migrated from Ansible 2.9 to Kubernetes collection. - - k8s - Lookup plugin migrated from Ansible 2.9 to Kubernetes collection. - - k8s - Module migrated from Ansible 2.9 to Kubernetes collection. - - k8s_auth - Module migrated from Ansible 2.9 to Kubernetes collection. - - k8s_config_resource_name - Filter plugin 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. - - kubectl - Connection plugin migrated from Ansible 2.9 to Kubernetes collection. - - openshift - Inventory source migrated from Ansible 2.9 to Kubernetes collection. + - k8s - Inventory source migrated from Ansible 2.9 to Kubernetes collection. + - k8s - Lookup plugin migrated from Ansible 2.9 to Kubernetes collection. + - k8s - Module migrated from Ansible 2.9 to Kubernetes collection. + - k8s_auth - Module migrated from Ansible 2.9 to Kubernetes collection. + - k8s_config_resource_name - Filter plugin 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. + - kubectl - Connection plugin migrated from Ansible 2.9 to Kubernetes collection. + - openshift - Inventory source migrated from Ansible 2.9 to Kubernetes collection. fragments: - - 4-k8s-prepare-collection-for-release.yaml - release_date: '2020-02-05' + - 4-k8s-prepare-collection-for-release.yaml + release_date: "2020-02-05" 1.0.0: changes: bugfixes: - - Test against stable ansible branch so molecule tests work (https://github.com/ansible-collections/community.kubernetes/pull/168). - - Update openshift requirements in k8s module doc (https://github.com/ansible-collections/community.kubernetes/pull/153). + - Test against stable ansible branch so molecule tests work (https://github.com/ansible-collections/community.kubernetes/pull/168). + - Update openshift requirements in k8s module doc (https://github.com/ansible-collections/community.kubernetes/pull/153). 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). - - k8s_exec - Return rc for the command executed (https://github.com/ansible-collections/community.kubernetes/pull/158). + - 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). + - k8s_exec - Return rc for the command executed (https://github.com/ansible-collections/community.kubernetes/pull/158). minor_changes: - - Ensure check mode results are as expected (https://github.com/ansible-collections/community.kubernetes/pull/155). - - Update base branch to 'main' (https://github.com/ansible-collections/community.kubernetes/issues/148). - - helm - Add support for K8S_AUTH_CONTEXT, K8S_AUTH_KUBECONFIG env (https://github.com/ansible-collections/community.kubernetes/pull/141). - - helm - Allow creating namespaces with Helm (https://github.com/ansible-collections/community.kubernetes/pull/157). - - helm - add aliases context for kube_context (https://github.com/ansible-collections/community.kubernetes/pull/152). - - 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 aliases context for kube_context (https://github.com/ansible-collections/community.kubernetes/pull/152). - - helm_info - add support for K8S_AUTH_KUBECONFIG and K8S_AUTH_CONTEXT environment - variable (https://github.com/ansible-collections/community.kubernetes/issues/140). - - k8s_exec - return RC for the command executed (https://github.com/ansible-collections/community.kubernetes/issues/122). - - k8s_info - Update example using vars (https://github.com/ansible-collections/community.kubernetes/pull/156). + - Ensure check mode results are as expected (https://github.com/ansible-collections/community.kubernetes/pull/155). + - Update base branch to 'main' (https://github.com/ansible-collections/community.kubernetes/issues/148). + - helm - Add support for K8S_AUTH_CONTEXT, K8S_AUTH_KUBECONFIG env (https://github.com/ansible-collections/community.kubernetes/pull/141). + - helm - Allow creating namespaces with Helm (https://github.com/ansible-collections/community.kubernetes/pull/157). + - helm - add aliases context for kube_context (https://github.com/ansible-collections/community.kubernetes/pull/152). + - 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 aliases context for kube_context (https://github.com/ansible-collections/community.kubernetes/pull/152). + - helm_info - add support for K8S_AUTH_KUBECONFIG and K8S_AUTH_CONTEXT environment variable (https://github.com/ansible-collections/community.kubernetes/issues/140). + - k8s_exec - return RC for the command executed (https://github.com/ansible-collections/community.kubernetes/issues/122). + - k8s_info - Update example using vars (https://github.com/ansible-collections/community.kubernetes/pull/156). security_fixes: - - kubectl - connection plugin now redact kubectl_token and kubectl_password - in console log (https://github.com/ansible-collections/community.kubernetes/issues/65). - - kubectl - redacted token and password from console log (https://github.com/ansible-collections/community.kubernetes/pull/159). + - kubectl - connection plugin now redact kubectl_token and kubectl_password in console log (https://github.com/ansible-collections/community.kubernetes/issues/65). + - kubectl - redacted token and password from console log (https://github.com/ansible-collections/community.kubernetes/pull/159). fragments: - - 122_k8s_exec_rc.yml - - 140-kubeconfig-env.yaml - - 141-helm-add-k8s-env-vars.yaml - - 148-update-base-branch-main.yaml - - 152-helm-context-aliases.yml - - 153-update-openshift-requirements.yaml - - 154-helm_plugin-helm_plugin_info-new-modules.yaml - - 155-ensure-check-mode-waits.yaml - - 156-k8s_info-vars-example.yaml - - 157-helm-create-namespace.yaml - - 158-k8s_exec-return-rc.yaml - - 159-kubectl-redact-token-and-password.yaml - - 168-test-stable-ansible.yaml - - 65_kubectl.yml + - 122_k8s_exec_rc.yml + - 140-kubeconfig-env.yaml + - 141-helm-add-k8s-env-vars.yaml + - 148-update-base-branch-main.yaml + - 152-helm-context-aliases.yml + - 153-update-openshift-requirements.yaml + - 154-helm_plugin-helm_plugin_info-new-modules.yaml + - 155-ensure-check-mode-waits.yaml + - 156-k8s_info-vars-example.yaml + - 157-helm-create-namespace.yaml + - 158-k8s_exec-return-rc.yaml + - 159-kubectl-redact-token-and-password.yaml + - 168-test-stable-ansible.yaml + - 65_kubectl.yml modules: - - description: Manage Helm plugins - name: helm_plugin - namespace: '' - - description: Gather information about Helm plugins - name: helm_plugin_info - namespace: '' - release_date: '2020-07-28' + - description: Manage Helm plugins + name: helm_plugin + namespace: "" + - description: Gather information about Helm plugins + name: helm_plugin_info + namespace: "" + release_date: "2020-07-28" 1.1.0: changes: bugfixes: - - common - handle exception raised due to DynamicClient (https://github.com/ansible-collections/community.kubernetes/pull/224). - - helm - add replace parameter (https://github.com/ansible-collections/community.kubernetes/issues/106). - - k8s (inventory) - Set the connection plugin and transport separately (https://github.com/ansible-collections/community.kubernetes/pull/208). - - k8s (inventory) - Specify FQCN for k8s inventory plugin to fix use with Ansible - 2.9 (https://github.com/ansible-collections/community.kubernetes/pull/250). - - k8s_info - add wait functionality (https://github.com/ansible-collections/community.kubernetes/issues/18). + - common - handle exception raised due to DynamicClient (https://github.com/ansible-collections/community.kubernetes/pull/224). + - helm - add replace parameter (https://github.com/ansible-collections/community.kubernetes/issues/106). + - k8s (inventory) - Set the connection plugin and transport separately (https://github.com/ansible-collections/community.kubernetes/pull/208). + - k8s (inventory) - Specify FQCN for k8s inventory plugin to fix use with Ansible 2.9 (https://github.com/ansible-collections/community.kubernetes/pull/250). + - k8s_info - add wait functionality (https://github.com/ansible-collections/community.kubernetes/issues/18). major_changes: - - k8s - Add support for template parameter (https://github.com/ansible-collections/community.kubernetes/pull/230). - - k8s_* - Add support for vaulted kubeconfig and src (https://github.com/ansible-collections/community.kubernetes/pull/193). + - k8s - Add support for template parameter (https://github.com/ansible-collections/community.kubernetes/pull/230). + - k8s_* - Add support for vaulted kubeconfig and src (https://github.com/ansible-collections/community.kubernetes/pull/193). minor_changes: - - Add Makefile and downstream build script for kubernetes.core (https://github.com/ansible-collections/community.kubernetes/pull/197). - - Add execution environment metadata (https://github.com/ansible-collections/community.kubernetes/pull/211). - - Add probot stale bot configuration to autoclose issues (https://github.com/ansible-collections/community.kubernetes/pull/196). - - Added a contribution guide (https://github.com/ansible-collections/community.kubernetes/pull/192). - - Refactor module_utils (https://github.com/ansible-collections/community.kubernetes/pull/223). - - Replace KubernetesAnsibleModule class with dummy class (https://github.com/ansible-collections/community.kubernetes/pull/227). - - Replace KubernetesRawModule class with K8sAnsibleMixin (https://github.com/ansible-collections/community.kubernetes/pull/231). - - common - Do not mark task as changed when diff is irrelevant (https://github.com/ansible-collections/community.kubernetes/pull/228). - - helm - Add appVersion idempotence check to Helm (https://github.com/ansible-collections/community.kubernetes/pull/246). - - helm - Return status in check mode (https://github.com/ansible-collections/community.kubernetes/pull/192). - - helm - Support for single or multiple values files (https://github.com/ansible-collections/community.kubernetes/pull/93). - - helm_* - Support vaulted kubeconfig (https://github.com/ansible-collections/community.kubernetes/pull/229). - - k8s - SelfSubjectAccessReviews supported when 405 response received (https://github.com/ansible-collections/community.kubernetes/pull/237). - - k8s - add testcase for adding multiple resources using template parameter - (https://github.com/ansible-collections/community.kubernetes/issues/243). - - k8s_info - Add support for wait (https://github.com/ansible-collections/community.kubernetes/pull/235). - - k8s_info - update custom resource example (https://github.com/ansible-collections/community.kubernetes/issues/202). - - kubectl plugin - correct console log (https://github.com/ansible-collections/community.kubernetes/issues/200). - - raw - Handle exception raised by underlying APIs (https://github.com/ansible-collections/community.kubernetes/pull/180). + - Add Makefile and downstream build script for kubernetes.core (https://github.com/ansible-collections/community.kubernetes/pull/197). + - Add execution environment metadata (https://github.com/ansible-collections/community.kubernetes/pull/211). + - Add probot stale bot configuration to autoclose issues (https://github.com/ansible-collections/community.kubernetes/pull/196). + - Added a contribution guide (https://github.com/ansible-collections/community.kubernetes/pull/192). + - Refactor module_utils (https://github.com/ansible-collections/community.kubernetes/pull/223). + - Replace KubernetesAnsibleModule class with dummy class (https://github.com/ansible-collections/community.kubernetes/pull/227). + - Replace KubernetesRawModule class with K8sAnsibleMixin (https://github.com/ansible-collections/community.kubernetes/pull/231). + - common - Do not mark task as changed when diff is irrelevant (https://github.com/ansible-collections/community.kubernetes/pull/228). + - helm - Add appVersion idempotence check to Helm (https://github.com/ansible-collections/community.kubernetes/pull/246). + - helm - Return status in check mode (https://github.com/ansible-collections/community.kubernetes/pull/192). + - helm - Support for single or multiple values files (https://github.com/ansible-collections/community.kubernetes/pull/93). + - helm_* - Support vaulted kubeconfig (https://github.com/ansible-collections/community.kubernetes/pull/229). + - k8s - SelfSubjectAccessReviews supported when 405 response received (https://github.com/ansible-collections/community.kubernetes/pull/237). + - k8s - add testcase for adding multiple resources using template parameter (https://github.com/ansible-collections/community.kubernetes/issues/243). + - k8s_info - Add support for wait (https://github.com/ansible-collections/community.kubernetes/pull/235). + - k8s_info - update custom resource example (https://github.com/ansible-collections/community.kubernetes/issues/202). + - kubectl plugin - correct console log (https://github.com/ansible-collections/community.kubernetes/issues/200). + - raw - Handle exception raised by underlying APIs (https://github.com/ansible-collections/community.kubernetes/pull/180). fragments: - - 106-helm_replace.yml - - 180_raw_handle_exception.yml - - 18_k8s_info_wait.yml - - 191_contributing.yml - - 192_helm-status-check-mode.yml - - 193_vault-kubeconfig-support.yml - - 196_probot-stale-bot.yml - - 197_downstream-makefile.yml - - 200_kubectl_fix.yml - - 202_k8s_info.yml - - 208_set-connection-plugin-transport.yml - - 211_execution-env-meta.yml - - 223_refactor-module_utils.yml - - 224_handle-dynamicclient-exception.yml - - 227_replace-kubernetesansiblemodule-class.yml - - 228_dont-mark-changed-if-diff-irrelevant.yml - - 229_helm-vault-support.yml - - 230_k8s-template-parameter.yml - - 231_k8sansiblemixin-module.yml - - 234_k8s-selfsubjectaccessreviews.yml - - 235_k8s_info-wait-support.yml - - 243_template.yml - - 246_helm-appversion-check.yml - - 252_connection-plugin-fqcn-fix.yml - - 93_helm-multiple-values-files.yml - release_date: '2020-10-08' + - 106-helm_replace.yml + - 180_raw_handle_exception.yml + - 18_k8s_info_wait.yml + - 191_contributing.yml + - 192_helm-status-check-mode.yml + - 193_vault-kubeconfig-support.yml + - 196_probot-stale-bot.yml + - 197_downstream-makefile.yml + - 200_kubectl_fix.yml + - 202_k8s_info.yml + - 208_set-connection-plugin-transport.yml + - 211_execution-env-meta.yml + - 223_refactor-module_utils.yml + - 224_handle-dynamicclient-exception.yml + - 227_replace-kubernetesansiblemodule-class.yml + - 228_dont-mark-changed-if-diff-irrelevant.yml + - 229_helm-vault-support.yml + - 230_k8s-template-parameter.yml + - 231_k8sansiblemixin-module.yml + - 234_k8s-selfsubjectaccessreviews.yml + - 235_k8s_info-wait-support.yml + - 243_template.yml + - 246_helm-appversion-check.yml + - 252_connection-plugin-fqcn-fix.yml + - 93_helm-multiple-values-files.yml + release_date: "2020-10-08" 1.1.1: changes: bugfixes: - - k8s - Fix sanity test 'compile' failing because of positional args (https://github.com/ansible-collections/community.kubernetes/issues/260). + - k8s - Fix sanity test 'compile' failing because of positional args (https://github.com/ansible-collections/community.kubernetes/issues/260). fragments: - - 260_k8s-positional-args.yml - release_date: '2020-10-09' + - 260_k8s-positional-args.yml + release_date: "2020-10-09" 1.2.0: changes: bugfixes: - - helm - ``release_values`` makes ansible always show changed state (https://github.com/ansible-collections/community.kubernetes/issues/274) - - 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). - - helm - return values in check mode when release is not present (https://github.com/ansible-collections/community.kubernetes/issues/280). - - 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). - - k8s - fix check_mode always showing changes when using stringData on Secrets - (https://github.com/ansible-collections/community.kubernetes/issues/282). - - k8s - handle ValueError when namespace is not provided (https://github.com/ansible-collections/community.kubernetes/pull/330). - - 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). + - helm - ``release_values`` makes ansible always show changed state (https://github.com/ansible-collections/community.kubernetes/issues/274) + - 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). + - helm - return values in check mode when release is not present (https://github.com/ansible-collections/community.kubernetes/issues/280). + - 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). + - k8s - fix check_mode always showing changes when using stringData on Secrets (https://github.com/ansible-collections/community.kubernetes/issues/282). + - k8s - handle ValueError when namespace is not provided (https://github.com/ansible-collections/community.kubernetes/pull/330). + - 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). minor_changes: - - Adjust the documentation to clarify the fact ``wait_condition.status`` is - a string. - - Adjust the name of parameters of ``helm`` and ``helm_info`` to match the documentation. - No playbook change required. - - 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. - - 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). - - helm - add optional support for helm diff (https://github.com/ansible-collections/community.kubernetes/issues/248). - - helm_template - add helm_template module to support template functionality - (https://github.com/ansible-collections/community.kubernetes/issues/367). - - k8s - add a ``delete_options`` parameter to control garbage collection behavior - when deleting a resource (https://github.com/ansible-collections/community.kubernetes/issues/253). - - k8s - add an example for downloading manifest file and applying (https://github.com/ansible-collections/community.kubernetes/issues/352). - - k8s - check if kubeconfig file is located on remote node or on Ansible Controller - (https://github.com/ansible-collections/community.kubernetes/issues/307). - - k8s - check if src file is located on remote node or on Ansible Controller - (https://github.com/ansible-collections/community.kubernetes/issues/307). - - k8s_exec - add a note about required permissions for the module (https://github.com/ansible-collections/community.kubernetes/issues/339). - - k8s_info - add information about api_version while returning facts (https://github.com/ansible-collections/community.kubernetes/pull/308). - - runtime.yml - update minimum Ansible version required for Kubernetes collection - (https://github.com/ansible-collections/community.kubernetes/issues/314). + - Adjust the documentation to clarify the fact ``wait_condition.status`` is a string. + - Adjust the name of parameters of ``helm`` and ``helm_info`` to match the documentation. No playbook change required. + - 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. + - 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). + - helm - add optional support for helm diff (https://github.com/ansible-collections/community.kubernetes/issues/248). + - helm_template - add helm_template module to support template functionality (https://github.com/ansible-collections/community.kubernetes/issues/367). + - k8s - add a ``delete_options`` parameter to control garbage collection behavior when deleting a resource (https://github.com/ansible-collections/community.kubernetes/issues/253). + - k8s - add an example for downloading manifest file and applying (https://github.com/ansible-collections/community.kubernetes/issues/352). + - k8s - check if kubeconfig file is located on remote node or on Ansible Controller (https://github.com/ansible-collections/community.kubernetes/issues/307). + - k8s - check if src file is located on remote node or on Ansible Controller (https://github.com/ansible-collections/community.kubernetes/issues/307). + - k8s_exec - add a note about required permissions for the module (https://github.com/ansible-collections/community.kubernetes/issues/339). + - k8s_info - add information about api_version while returning facts (https://github.com/ansible-collections/community.kubernetes/pull/308). + - runtime.yml - update minimum Ansible version required for Kubernetes collection (https://github.com/ansible-collections/community.kubernetes/issues/314). fragments: - - 280_helm_status.yml - - 307_remote_src.yml - - 308_k8s_info.yml - - 310-wait_condition.status_is_a_str.yaml - - 314_version.yml - - 319-helm-honors-HELM_-environment-variables.yaml - - 324-adjust-helm-and-helm_info-parameters-names.yaml - - 332_helm_changed_flag_takes_values_in_consideration.yaml - - 334-delete-options.yaml - - 343-secret-check-mode.yaml - - 349-skip-crds.yaml - - 352-k8s.yml - - 355-helm-diff.yaml - - 357_helm_plugin.yml - - 360-k8s_info-wait-timeout.yaml - - 361-k8s_exec-permission-hint.yaml - - 362-helm-has_plugin-fix.yaml - - 368-helm_template.yaml - - handle_valueerror.yml - release_date: '2021-02-17' + - 280_helm_status.yml + - 307_remote_src.yml + - 308_k8s_info.yml + - 310-wait_condition.status_is_a_str.yaml + - 314_version.yml + - 319-helm-honors-HELM_-environment-variables.yaml + - 324-adjust-helm-and-helm_info-parameters-names.yaml + - 332_helm_changed_flag_takes_values_in_consideration.yaml + - 334-delete-options.yaml + - 343-secret-check-mode.yaml + - 349-skip-crds.yaml + - 352-k8s.yml + - 355-helm-diff.yaml + - 357_helm_plugin.yml + - 360-k8s_info-wait-timeout.yaml + - 361-k8s_exec-permission-hint.yaml + - 362-helm-has_plugin-fix.yaml + - 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). + - 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). + - 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). + - 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). + - 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 + - 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' + - description: Apply JSON patch operations to existing objects + name: k8s_json_patch + namespace: "" + release_date: "2021-06-09" 2.0.1: changes: bugfixes: - - inventory - add community.kubernetes to list of plugin choices in k8s inventory - (https://github.com/ansible-collections/kubernetes.core/pull/128). + - inventory - add community.kubernetes to list of plugin choices in k8s inventory (https://github.com/ansible-collections/kubernetes.core/pull/128). fragments: - - 128-update-inventory-plugin-param.yaml - release_date: '2021-06-11' + - 128-update-inventory-plugin-param.yaml + release_date: "2021-06-11" 2.0.2: changes: bugfixes: - - Fix apply for k8s module when an array attribute from definition contains - empty dict (https://github.com/ansible-collections/kubernetes.core/issues/113). - - rename the apply function to fix broken imports in Ansible 2.9 (https://github.com/ansible-collections/kubernetes.core/pull/135). + - Fix apply for k8s module when an array attribute from definition contains empty dict (https://github.com/ansible-collections/kubernetes.core/issues/113). + - rename the apply function to fix broken imports in Ansible 2.9 (https://github.com/ansible-collections/kubernetes.core/pull/135). fragments: - - 129-k8s-fix-apply-array-with-empty-dict.yml - - 135-rename-apply-function.yml - release_date: '2021-06-16' + - 129-k8s-fix-apply-array-with-empty-dict.yml + - 135-rename-apply-function.yml + release_date: "2021-06-16" 2.1.0: changes: minor_changes: - - remove cloud.common as default dependency (https://github.com/ansible-collections/kubernetes.core/pull/148). - - temporarily disable turbo mode (https://github.com/ansible-collections/kubernetes.core/pull/149). + - remove cloud.common as default dependency (https://github.com/ansible-collections/kubernetes.core/pull/148). + - temporarily disable turbo mode (https://github.com/ansible-collections/kubernetes.core/pull/149). fragments: - - 148-remove-cloud-common-dependency.yaml - - 149-disable-turbo-mode.yaml - release_date: '2021-06-23' + - 148-remove-cloud-common-dependency.yaml + - 149-disable-turbo-mode.yaml + release_date: "2021-06-23" 2.1.1: changes: bugfixes: - - check auth params for existence, not whether they are true (https://github.com/ansible-collections/kubernetes.core/pull/151). + - check auth params for existence, not whether they are true (https://github.com/ansible-collections/kubernetes.core/pull/151). fragments: - - 151-check-auth-params-for-existence.yaml - release_date: '2021-06-24' + - 151-check-auth-params-for-existence.yaml + release_date: "2021-06-24" 2.2.0: changes: bugfixes: - - common - import k8sdynamicclient directly to workaround Ansible upstream bug - (https://github.com/ansible-collections/kubernetes.core/issues/162). - - connection plugin - add arguments information into censored command (https://github.com/ansible-collections/kubernetes.core/pull/196). - - fix resource cache not being used (https://github.com/ansible-collections/kubernetes.core/pull/228). - - k8s - Fixes a bug where diff was always returned when using apply or modifying - an existing object, even when diff=no was specified. The module no longer - returns diff unless requested and will now honor diff=no (https://github.com/ansible-collections/kubernetes.core/pull/146). - - k8s_cp - fix k8s_cp uploading when target container's WORKDIR is not '/' (https://github.com/ansible-collections/kubernetes.core/issues/222). - - k8s_exec - add missing deprecation notice to return_code for k8s_exec (https://github.com/ansible-collections/kubernetes.core/pull/233). - - k8s_exec - fix k8s_exec returning rc attribute, to follow ansible's common - return values (https://github.com/ansible-collections/kubernetes.core/pull/230). - - lookup - recommend query instead of lookup (https://github.com/ansible-collections/kubernetes.core/issues/147). - - support the ``template`` param in all collections depending on kubernetes.core - (https://github.com/ansible-collections/kubernetes.core/pull/154). + - common - import k8sdynamicclient directly to workaround Ansible upstream bug (https://github.com/ansible-collections/kubernetes.core/issues/162). + - connection plugin - add arguments information into censored command (https://github.com/ansible-collections/kubernetes.core/pull/196). + - fix resource cache not being used (https://github.com/ansible-collections/kubernetes.core/pull/228). + - k8s - Fixes a bug where diff was always returned when using apply or modifying an existing object, even when diff=no was specified. The module no longer + returns diff unless requested and will now honor diff=no (https://github.com/ansible-collections/kubernetes.core/pull/146). + - k8s_cp - fix k8s_cp uploading when target container's WORKDIR is not '/' (https://github.com/ansible-collections/kubernetes.core/issues/222). + - k8s_exec - add missing deprecation notice to return_code for k8s_exec (https://github.com/ansible-collections/kubernetes.core/pull/233). + - k8s_exec - fix k8s_exec returning rc attribute, to follow ansible's common return values (https://github.com/ansible-collections/kubernetes.core/pull/230). + - lookup - recommend query instead of lookup (https://github.com/ansible-collections/kubernetes.core/issues/147). + - support the ``template`` param in all collections depending on kubernetes.core (https://github.com/ansible-collections/kubernetes.core/pull/154). minor_changes: - - add support for in-memory kubeconfig in addition to file for k8s modules. - (https://github.com/ansible-collections/kubernetes.core/pull/212). - - helm - add support for history_max cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/164). - - k8s - add support for label_selectors options (https://github.com/ansible-collections/kubernetes.core/issues/43). - - k8s - add support for waiting on statefulsets (https://github.com/ansible-collections/kubernetes.core/pull/195). - - k8s_log - Add since-seconds parameter to the k8s_log module (https://github.com/ansible-collections/kubernetes.core/pull/142). - - new lookup plugin to support kubernetes kustomize feature. (https://github.com/ansible-collections/kubernetes.core/issues/39). - - re-enable turbo mode for collection. The default is initially set to off (https://github.com/ansible-collections/kubernetes.core/pull/169). + - add support for in-memory kubeconfig in addition to file for k8s modules. (https://github.com/ansible-collections/kubernetes.core/pull/212). + - helm - add support for history_max cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/164). + - k8s - add support for label_selectors options (https://github.com/ansible-collections/kubernetes.core/issues/43). + - k8s - add support for waiting on statefulsets (https://github.com/ansible-collections/kubernetes.core/pull/195). + - k8s_log - Add since-seconds parameter to the k8s_log module (https://github.com/ansible-collections/kubernetes.core/pull/142). + - new lookup plugin to support kubernetes kustomize feature. (https://github.com/ansible-collections/kubernetes.core/issues/39). + - re-enable turbo mode for collection. The default is initially set to off (https://github.com/ansible-collections/kubernetes.core/pull/169). fragments: - - 142-add-sinceseconds-param-for-logs.yaml - - 146-k8s-add-support-diff-mode.yml - - 147_lookup.yml - - 154-template-param-support.yaml - - 158-k8s-add-support-label_selectors.yml - - 162_import_error.yml - - 164-add-history-max.yaml - - 169-reenable-turbo-mode.yaml - - 195-k8s-add-wait-statefulsets.yml - - 196_kubectl.yaml - - 212-in-memory-kubeconfig.yml - - 223-add-deprecation-notice.yaml - - 223-k8s-cp-uploading.yaml - - 225-kustomize-lookup-plugin.yml - - 228-fix-resource-cache.yml - - 230-k8sexec-has-new-returnvalue.yml + - 142-add-sinceseconds-param-for-logs.yaml + - 146-k8s-add-support-diff-mode.yml + - 147_lookup.yml + - 154-template-param-support.yaml + - 158-k8s-add-support-label_selectors.yml + - 162_import_error.yml + - 164-add-history-max.yaml + - 169-reenable-turbo-mode.yaml + - 195-k8s-add-wait-statefulsets.yml + - 196_kubectl.yaml + - 212-in-memory-kubeconfig.yml + - 223-add-deprecation-notice.yaml + - 223-k8s-cp-uploading.yaml + - 225-kustomize-lookup-plugin.yml + - 228-fix-resource-cache.yml + - 230-k8sexec-has-new-returnvalue.yml modules: - - description: Copy files and directories to and from pod. - name: k8s_cp - namespace: '' - - description: Drain, Cordon, or Uncordon node in k8s cluster - name: k8s_drain - namespace: '' + - description: Copy files and directories to and from pod. + name: k8s_cp + namespace: "" + - description: Drain, Cordon, or Uncordon node in k8s cluster + name: k8s_drain + namespace: "" plugins: lookup: - - description: Build a set of kubernetes resources using a 'kustomization.yaml' - file. - name: kustomize - namespace: null - release_date: '2021-09-15' + - description: Build a set of kubernetes resources using a 'kustomization.yaml' file. + name: kustomize + namespace: + release_date: "2021-09-15" 2.3.0: changes: bugfixes: - - Various modules and plugins - use vendored version of ``distutils.version`` - instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/kubernetes.core/pull/314). - - common - Ensure the label_selectors parameter of _wait_for method is optional. - - helm_template - evaluate release_values after values_files, insuring highest - precedence (now same behavior as in helm module). (https://github.com/ansible-collections/kubernetes.core/pull/348) - - import exception from ``kubernetes.client.rest``. - - k8s_drain - fix error caused by accessing an undefined variable when pods - have local storage (https://github.com/ansible-collections/kubernetes.core/issues/292). - - k8s_info - don't wait on empty List resources (https://github.com/ansible-collections/kubernetes.core/pull/253). - - k8s_scale - fix waiting on statefulset when scaled down to 0 replicas (https://github.com/ansible-collections/kubernetes.core/issues/203). - - module_utils.common - change default opening mode to read-bytes to avoid bad - interpretation of non ascii characters and strings, often present in 3rd party - manifests. - - remove binary file from k8s_cp test suite (https://github.com/ansible-collections/kubernetes.core/pull/298). - - use resource prefix when finding resource and apiVersion is v1 (https://github.com/ansible-collections/kubernetes.core/issues/351). + - Various modules and plugins - use vendored version of ``distutils.version`` instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/kubernetes.core/pull/314). + - common - Ensure the label_selectors parameter of _wait_for method is optional. + - helm_template - evaluate release_values after values_files, insuring highest precedence (now same behavior as in helm module). (https://github.com/ansible-collections/kubernetes.core/pull/348) + - import exception from ``kubernetes.client.rest``. + - k8s_drain - fix error caused by accessing an undefined variable when pods have local storage (https://github.com/ansible-collections/kubernetes.core/issues/292). + - k8s_info - don't wait on empty List resources (https://github.com/ansible-collections/kubernetes.core/pull/253). + - k8s_scale - fix waiting on statefulset when scaled down to 0 replicas (https://github.com/ansible-collections/kubernetes.core/issues/203). + - module_utils.common - change default opening mode to read-bytes to avoid bad interpretation of non ascii characters and strings, often present in 3rd party + manifests. + - remove binary file from k8s_cp test suite (https://github.com/ansible-collections/kubernetes.core/pull/298). + - use resource prefix when finding resource and apiVersion is v1 (https://github.com/ansible-collections/kubernetes.core/issues/351). minor_changes: - - add support for dry run with kubernetes client version >=18.20 (https://github.com/ansible-collections/kubernetes.core/pull/245). - - fixed module_defaults by removing routing hacks from runtime.yml (https://github.com/ansible-collections/kubernetes.core/pull/347). - - helm - add support for timeout cli parameter to allow setting Helm timeout - independent of wait (https://github.com/ansible-collections/kubernetes.core/issues/67). - - helm - add support for wait parameter for helm uninstall command. (https://github.com/ansible-collections/kubernetes/core/issues/33). - - helm - support repo location for helm diff (https://github.com/ansible-collections/kubernetes.core/issues/174). - - helm - when ansible is executed in check mode, return the diff between what's - deployed and what will be deployed. - - helm_info - add release state as a module argument (https://github.com/ansible-collections/kubernetes.core/issues/377). - - helm_plugin - Add plugin_version parameter to the helm_plugin module (https://github.com/ansible-collections/kubernetes.core/issues/157). - - helm_plugin - Add support for helm plugin update using state=update. - - helm_repository - add support for pass-credentials cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/282). - - helm_repository - added support for ``host``, ``api_key``, ``validate_certs``, - and ``ca_cert``. - - helm_template - add show_only and release_namespace as module arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). - - k8s - add no_proxy support to k8s* (https://github.com/ansible-collections/kubernetes.core/pull/272). - - k8s - add support for server_side_apply. (https://github.com/ansible-collections/kubernetes.core/issues/87). - - k8s - add support for user impersonation. (https://github.com/ansible-collections/kubernetes/core/issues/40). - - k8s - allow resource definition using metadata.generateName (https://github.com/ansible-collections/kubernetes.core/issues/35). - - k8s lookup plugin - Enable turbo mode via environment variable (https://github.com/ansible-collections/kubernetes.core/issues/291). - - k8s_drain - Adds ``delete_emptydir_data`` option to ``k8s_drain.delete_options`` - to evict pods with an ``emptyDir`` volume attached (https://github.com/ansible-collections/kubernetes.core/pull/322). - - k8s_exec - select first container from the pod if none specified (https://github.com/ansible-collections/kubernetes.core/issues/358). - - k8s_rollback - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/243). - - k8s_scale - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/244). - - kubectl - wait for dd command to complete before proceeding (https://github.com/ansible-collections/kubernetes.core/pull/321). + - add support for dry run with kubernetes client version >=18.20 (https://github.com/ansible-collections/kubernetes.core/pull/245). + - fixed module_defaults by removing routing hacks from runtime.yml (https://github.com/ansible-collections/kubernetes.core/pull/347). + - helm - add support for timeout cli parameter to allow setting Helm timeout independent of wait (https://github.com/ansible-collections/kubernetes.core/issues/67). + - helm - add support for wait parameter for helm uninstall command. (https://github.com/ansible-collections/kubernetes/core/issues/33). + - helm - support repo location for helm diff (https://github.com/ansible-collections/kubernetes.core/issues/174). + - helm - when ansible is executed in check mode, return the diff between what's deployed and what will be deployed. + - helm_info - add release state as a module argument (https://github.com/ansible-collections/kubernetes.core/issues/377). + - helm_plugin - Add plugin_version parameter to the helm_plugin module (https://github.com/ansible-collections/kubernetes.core/issues/157). + - helm_plugin - Add support for helm plugin update using state=update. + - helm_repository - add support for pass-credentials cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/282). + - helm_repository - added support for ``host``, ``api_key``, ``validate_certs``, and ``ca_cert``. + - helm_template - add show_only and release_namespace as module arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). + - k8s - add no_proxy support to k8s* (https://github.com/ansible-collections/kubernetes.core/pull/272). + - k8s - add support for server_side_apply. (https://github.com/ansible-collections/kubernetes.core/issues/87). + - k8s - add support for user impersonation. (https://github.com/ansible-collections/kubernetes/core/issues/40). + - k8s - allow resource definition using metadata.generateName (https://github.com/ansible-collections/kubernetes.core/issues/35). + - k8s lookup plugin - Enable turbo mode via environment variable (https://github.com/ansible-collections/kubernetes.core/issues/291). + - k8s_drain - Adds ``delete_emptydir_data`` option to ``k8s_drain.delete_options`` to evict pods with an ``emptyDir`` volume attached (https://github.com/ansible-collections/kubernetes.core/pull/322). + - k8s_exec - select first container from the pod if none specified (https://github.com/ansible-collections/kubernetes.core/issues/358). + - k8s_rollback - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/243). + - k8s_scale - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/244). + - kubectl - wait for dd command to complete before proceeding (https://github.com/ansible-collections/kubernetes.core/pull/321). fragments: - - 0-copy_ignore_txt.yml - - 226-add-version-parameter-to-helm_plugin.yml - - 231-helm-add-timeout-parameter.yaml - - 238-helm-add-support-for-helm-uninstall-wait.yaml - - 238-k8s-add-support-for-generate_name.yml - - 245-add-dry-run.yaml - - 250-k8s-add-support-for-impersonation.yaml - - 253-dont-wait-on-list-resources.yaml - - 255-k8s_scale-k8s_rollback-add-support-for-check_mode.yml - - 260-k8s-add-support-for-server_side_apply.yml - - 272-k8s-add-support-no_proxy.yaml - - 282-helm-repository-add-pass-credentials.yaml - - 290-returns-diff-in-check-mode.yaml - - 295-fix-k8s-drain-variable-declaration.yaml - - 298-remove-binary-file.yaml - - 308-fix-for-common-non-ascii-characters-in-resources.yaml - - 313-helm-template-add-support-for-show-only-and-release-namespace.yml - - 321-kubectl_sleep.yml - - 322-Add-delete_emptydir_data-to-drain-delete_options.yaml - - 335-k8s-lookup-add-support-for-turbo-mode.yml - - 347-routing.yml - - 348-helm_template-fix-precedence-of-release-values-over-values-files.yaml - - 358-k8s_exec.yml - - 364-use-resource-prefix.yaml - - 377-helm-info-state.yml - - 389-helm-add-support-chart_repo_url-on-helm_diff.yml - - 391-fix-statefulset-wait.yaml - - _wait_for_label_selector_optional.yaml - - disutils.version.yml - - exception.yml - - helm_repository.yml + - "0-copy_ignore_txt.yml" + - 226-add-version-parameter-to-helm_plugin.yml + - 231-helm-add-timeout-parameter.yaml + - 238-helm-add-support-for-helm-uninstall-wait.yaml + - 238-k8s-add-support-for-generate_name.yml + - 245-add-dry-run.yaml + - 250-k8s-add-support-for-impersonation.yaml + - 253-dont-wait-on-list-resources.yaml + - 255-k8s_scale-k8s_rollback-add-support-for-check_mode.yml + - 260-k8s-add-support-for-server_side_apply.yml + - 272-k8s-add-support-no_proxy.yaml + - 282-helm-repository-add-pass-credentials.yaml + - 290-returns-diff-in-check-mode.yaml + - 295-fix-k8s-drain-variable-declaration.yaml + - 298-remove-binary-file.yaml + - 308-fix-for-common-non-ascii-characters-in-resources.yaml + - 313-helm-template-add-support-for-show-only-and-release-namespace.yml + - 321-kubectl_sleep.yml + - 322-Add-delete_emptydir_data-to-drain-delete_options.yaml + - 335-k8s-lookup-add-support-for-turbo-mode.yml + - 347-routing.yml + - 348-helm_template-fix-precedence-of-release-values-over-values-files.yaml + - 358-k8s_exec.yml + - 364-use-resource-prefix.yaml + - 377-helm-info-state.yml + - 389-helm-add-support-chart_repo_url-on-helm_diff.yml + - 391-fix-statefulset-wait.yaml + - _wait_for_label_selector_optional.yaml + - disutils.version.yml + - exception.yml + - helm_repository.yml modules: - - description: Taint a node in a Kubernetes/OpenShift cluster - name: k8s_taint - namespace: '' - release_date: '2022-03-11' + - description: Taint a node in a Kubernetes/OpenShift cluster + name: k8s_taint + namespace: "" + release_date: "2022-03-11" 2.3.1: changes: bugfixes: - - Catch expectation raised when the process is waiting for resources (https://github.com/ansible-collections/kubernetes.core/issues/407). - - Remove `omit` placeholder when defining resource using template parameter - (https://github.com/ansible-collections/kubernetes.core/issues/431). - - k8s - fix the issue when trying to delete resources using label_selectors - options (https://github.com/ansible-collections/kubernetes.core/issues/433). - - k8s_cp - fix issue when using parameter local_path with file on managed node. - (https://github.com/ansible-collections/kubernetes.core/issues/421). - - k8s_drain - fix error occurring when trying to drain node with disable_eviction - set to yes (https://github.com/ansible-collections/kubernetes.core/issues/416). + - Catch expectation raised when the process is waiting for resources (https://github.com/ansible-collections/kubernetes.core/issues/407). + - Remove `omit` placeholder when defining resource using template parameter (https://github.com/ansible-collections/kubernetes.core/issues/431). + - k8s - fix the issue when trying to delete resources using label_selectors options (https://github.com/ansible-collections/kubernetes.core/issues/433). + - k8s_cp - fix issue when using parameter local_path with file on managed node. (https://github.com/ansible-collections/kubernetes.core/issues/421). + - k8s_drain - fix error occurring when trying to drain node with disable_eviction set to yes (https://github.com/ansible-collections/kubernetes.core/issues/416). fragments: - - 408-fix-wait-on-exception.yml - - 417-fix-k8s-drain-delete-options.yaml - - 422-k8s_cp-fix-issue-when-issue-local_path.yaml - - 432-fix-issue-when-using-template-parameter.yaml - - 434-fix-k8s-delete-using-label_selector.yaml - release_date: '2022-05-02' + - 408-fix-wait-on-exception.yml + - 417-fix-k8s-drain-delete-options.yaml + - 422-k8s_cp-fix-issue-when-issue-local_path.yaml + - 432-fix-issue-when-using-template-parameter.yaml + - 434-fix-k8s-delete-using-label_selector.yaml + release_date: "2022-05-02" 2.4.0: changes: bugfixes: - - Fix dry_run logic - Pass the value dry_run=All instead of dry_run=True to - the client, add conditional check on kubernetes client version as this feature - is supported only for kubernetes >= 18.20.0 (https://github.com/ansible-collections/kubernetes.core/pull/561). - - Fix kubeconfig parameter when multiple config files are provided (https://github.com/ansible-collections/kubernetes.core/issues/435). - - Helm - Fix issue with alternative kubeconfig provided with validate_certs=False - (https://github.com/ansible-collections/kubernetes.core/issues/538). - - Various modules and plugins - use vendored version of ``distutils.version`` - instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/kubernetes.core/pull/314). - - add missing documentation for filter plugin kubernetes.core.k8s_config_resource_name - (https://github.com/ansible-collections/kubernetes.core/issues/558). - - common - Ensure the label_selectors parameter of _wait_for method is optional. - - common - handle ``aliases`` passed from inventory and lookup plugins. - - helm_template - evaluate release_values after values_files, insuring highest - precedence (now same behavior as in helm module). (https://github.com/ansible-collections/kubernetes.core/pull/348) - - import exception from ``kubernetes.client.rest``. - - k8s - Fix issue with check_mode when using server side apply (https://github.com/ansible-collections/kubernetes.core/issues/547). - - k8s - Fix issue with server side apply with kubernetes release '25.3.0' (https://github.com/ansible-collections/kubernetes.core/issues/548). - - k8s_cp - add support for check_mode (https://github.com/ansible-collections/kubernetes.core/issues/380). - - k8s_drain - fix error caused by accessing an undefined variable when pods - have local storage (https://github.com/ansible-collections/kubernetes.core/issues/292). - - k8s_info - don't wait on empty List resources (https://github.com/ansible-collections/kubernetes.core/pull/253). - - k8s_info - fix issue when module returns successful true after the resource - cache has been established during periods where communication to the api-server - is not possible (https://github.com/ansible-collections/kubernetes.core/issues/508). - - k8s_log - Fix module traceback when no resource found (https://github.com/ansible-collections/kubernetes.core/issues/479). - - k8s_log - fix exception raised when the name is not provided for resources - requiring. (https://github.com/ansible-collections/kubernetes.core/issues/514) - - k8s_scale - fix waiting on statefulset when scaled down to 0 replicas (https://github.com/ansible-collections/kubernetes.core/issues/203). - - module_utils.common - change default opening mode to read-bytes to avoid bad - interpretation of non ascii characters and strings, often present in 3rd party - manifests. - - module_utils/k8s/client.py - fix issue when trying to authenticate with host, - client_cert and client_key parameters only. - - remove binary file from k8s_cp test suite (https://github.com/ansible-collections/kubernetes.core/pull/298). - - use resource prefix when finding resource and apiVersion is v1 (https://github.com/ansible-collections/kubernetes.core/issues/351). + - Fix dry_run logic - Pass the value dry_run=All instead of dry_run=True to the client, add conditional check on kubernetes client version as this feature + is supported only for kubernetes >= 18.20.0 (https://github.com/ansible-collections/kubernetes.core/pull/561). + - Fix kubeconfig parameter when multiple config files are provided (https://github.com/ansible-collections/kubernetes.core/issues/435). + - Helm - Fix issue with alternative kubeconfig provided with validate_certs=False (https://github.com/ansible-collections/kubernetes.core/issues/538). + - Various modules and plugins - use vendored version of ``distutils.version`` instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/kubernetes.core/pull/314). + - add missing documentation for filter plugin kubernetes.core.k8s_config_resource_name (https://github.com/ansible-collections/kubernetes.core/issues/558). + - common - Ensure the label_selectors parameter of _wait_for method is optional. + - common - handle ``aliases`` passed from inventory and lookup plugins. + - helm_template - evaluate release_values after values_files, insuring highest precedence (now same behavior as in helm module). (https://github.com/ansible-collections/kubernetes.core/pull/348) + - import exception from ``kubernetes.client.rest``. + - k8s - Fix issue with check_mode when using server side apply (https://github.com/ansible-collections/kubernetes.core/issues/547). + - k8s - Fix issue with server side apply with kubernetes release '25.3.0' (https://github.com/ansible-collections/kubernetes.core/issues/548). + - k8s_cp - add support for check_mode (https://github.com/ansible-collections/kubernetes.core/issues/380). + - k8s_drain - fix error caused by accessing an undefined variable when pods have local storage (https://github.com/ansible-collections/kubernetes.core/issues/292). + - k8s_info - don't wait on empty List resources (https://github.com/ansible-collections/kubernetes.core/pull/253). + - k8s_info - fix issue when module returns successful true after the resource cache has been established during periods where communication to the api-server + is not possible (https://github.com/ansible-collections/kubernetes.core/issues/508). + - k8s_log - Fix module traceback when no resource found (https://github.com/ansible-collections/kubernetes.core/issues/479). + - k8s_log - fix exception raised when the name is not provided for resources requiring. (https://github.com/ansible-collections/kubernetes.core/issues/514) + - k8s_scale - fix waiting on statefulset when scaled down to 0 replicas (https://github.com/ansible-collections/kubernetes.core/issues/203). + - module_utils.common - change default opening mode to read-bytes to avoid bad interpretation of non ascii characters and strings, often present in 3rd party + manifests. + - module_utils/k8s/client.py - fix issue when trying to authenticate with host, client_cert and client_key parameters only. + - remove binary file from k8s_cp test suite (https://github.com/ansible-collections/kubernetes.core/pull/298). + - use resource prefix when finding resource and apiVersion is v1 (https://github.com/ansible-collections/kubernetes.core/issues/351). major_changes: - - refactor K8sAnsibleMixin into module_utils/k8s/ (https://github.com/ansible-collections/kubernetes.core/pull/481). + - refactor K8sAnsibleMixin into module_utils/k8s/ (https://github.com/ansible-collections/kubernetes.core/pull/481). minor_changes: - - Adjust k8s_user_impersonation tests to be compatible with Kubernetes 1.24 - (https://github.com/ansible-collections/kubernetes.core/pull/520). - - add support for dry run with kubernetes client version >=18.20 (https://github.com/ansible-collections/kubernetes.core/pull/245). - - added ignore.txt for Ansible 2.14 devel branch. - - fixed module_defaults by removing routing hacks from runtime.yml (https://github.com/ansible-collections/kubernetes.core/pull/347). - - helm - add support for -set-file, -set-json, -set and -set-string options - when running helm install (https://github.com/ansible-collections/kubernetes.core/issues/533). - - helm - add support for helm dependency update (https://github.com/ansible-collections/kubernetes.core/pull/208). - - helm - add support for post-renderer flag (https://github.com/ansible-collections/kubernetes.core/issues/30). - - helm - add support for timeout cli parameter to allow setting Helm timeout - independent of wait (https://github.com/ansible-collections/kubernetes.core/issues/67). - - helm - add support for wait parameter for helm uninstall command. (https://github.com/ansible-collections/kubernetes/core/issues/33). - - helm - support repo location for helm diff (https://github.com/ansible-collections/kubernetes.core/issues/174). - - helm - when ansible is executed in check mode, return the diff between what's - deployed and what will be deployed. - - helm, helm_plugin, helm_info, helm_plugin_info, kubectl - add support for - in-memory kubeconfig. (https://github.com/ansible-collections/kubernetes.core/issues/492). - - helm_info - add hooks, notes and manifest as part of returned information - (https://github.com/ansible-collections/kubernetes.core/pull/546). - - helm_info - add release state as a module argument (https://github.com/ansible-collections/kubernetes.core/issues/377). - - helm_info - added possibility to get all values by adding get_all_values parameter - (https://github.com/ansible-collections/kubernetes.core/pull/531). - - helm_plugin - Add plugin_version parameter to the helm_plugin module (https://github.com/ansible-collections/kubernetes.core/issues/157). - - helm_plugin - Add support for helm plugin update using state=update. - - helm_repository - Ability to replace (overwrite) the repo if it already exists - by forcing (https://github.com/ansible-collections/kubernetes.core/issues/491). - - helm_repository - add support for pass-credentials cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/282). - - helm_repository - added support for ``host``, ``api_key``, ``validate_certs``, - and ``ca_cert``. - - helm_repository - mark `pass_credentials` as no_log=True to silence false - warning (https://github.com/ansible-collections/kubernetes.core/issues/412). - - helm_template - add name (NAME of release) and disable_hook as optional module - arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). - - helm_template - add show_only and release_namespace as module arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). - - helm_template - add support for -set-file, -set-json, -set and -set-string - options when running helm template (https://github.com/ansible-collections/kubernetes.core/pull/546). - - k8s - add no_proxy support to k8s* (https://github.com/ansible-collections/kubernetes.core/pull/272). - - k8s - add support for server_side_apply. (https://github.com/ansible-collections/kubernetes.core/issues/87). - - k8s - add support for user impersonation. (https://github.com/ansible-collections/kubernetes/core/issues/40). - - k8s - allow resource definition using metadata.generateName (https://github.com/ansible-collections/kubernetes.core/issues/35). - - k8s lookup plugin - Enable turbo mode via environment variable (https://github.com/ansible-collections/kubernetes.core/issues/291). - - k8s, k8s_scale, k8s_service - add support for resource definition as manifest - via. (https://github.com/ansible-collections/kubernetes.core/issues/451). - - k8s_cp - remove dependency with 'find' executable on remote pod when state=from_pod - (https://github.com/ansible-collections/kubernetes.core/issues/486). - - k8s_drain - Adds ``delete_emptydir_data`` option to ``k8s_drain.delete_options`` - to evict pods with an ``emptyDir`` volume attached (https://github.com/ansible-collections/kubernetes.core/pull/322). - - k8s_exec - select first container from the pod if none specified (https://github.com/ansible-collections/kubernetes.core/issues/358). - - k8s_exec - update deprecation warning for `return_code` (https://github.com/ansible-collections/kubernetes.core/issues/417). - - k8s_json_patch - minor typo fix in the example section (https://github.com/ansible-collections/kubernetes.core/issues/411). - - k8s_log - add the ``all_containers`` for retrieving all containers' logs in - the pod(s). - - k8s_log - added the `previous` parameter for retrieving the previously terminated - pod logs (https://github.com/ansible-collections/kubernetes.core/issues/437). - - k8s_log - added the `tail_lines` parameter to limit the number of lines to - be retrieved from the end of the logs (https://github.com/ansible-collections/kubernetes.core/issues/488). - - k8s_rollback - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/243). - - k8s_scale - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/244). - - kubectl - wait for dd command to complete before proceeding (https://github.com/ansible-collections/kubernetes.core/pull/321). - - kubectl.py - replace distutils.spawn.find_executable with shutil.which in - the kubectl connection plugin (https://github.com/ansible-collections/kubernetes.core/pull/456). + - Adjust k8s_user_impersonation tests to be compatible with Kubernetes 1.24 (https://github.com/ansible-collections/kubernetes.core/pull/520). + - add support for dry run with kubernetes client version >=18.20 (https://github.com/ansible-collections/kubernetes.core/pull/245). + - added ignore.txt for Ansible 2.14 devel branch. + - fixed module_defaults by removing routing hacks from runtime.yml (https://github.com/ansible-collections/kubernetes.core/pull/347). + - helm - add support for -set-file, -set-json, -set and -set-string options when running helm install (https://github.com/ansible-collections/kubernetes.core/issues/533). + - helm - add support for helm dependency update (https://github.com/ansible-collections/kubernetes.core/pull/208). + - helm - add support for post-renderer flag (https://github.com/ansible-collections/kubernetes.core/issues/30). + - helm - add support for timeout cli parameter to allow setting Helm timeout independent of wait (https://github.com/ansible-collections/kubernetes.core/issues/67). + - helm - add support for wait parameter for helm uninstall command. (https://github.com/ansible-collections/kubernetes/core/issues/33). + - helm - support repo location for helm diff (https://github.com/ansible-collections/kubernetes.core/issues/174). + - helm - when ansible is executed in check mode, return the diff between what's deployed and what will be deployed. + - helm, helm_plugin, helm_info, helm_plugin_info, kubectl - add support for in-memory kubeconfig. (https://github.com/ansible-collections/kubernetes.core/issues/492). + - helm_info - add hooks, notes and manifest as part of returned information (https://github.com/ansible-collections/kubernetes.core/pull/546). + - helm_info - add release state as a module argument (https://github.com/ansible-collections/kubernetes.core/issues/377). + - helm_info - added possibility to get all values by adding get_all_values parameter (https://github.com/ansible-collections/kubernetes.core/pull/531). + - helm_plugin - Add plugin_version parameter to the helm_plugin module (https://github.com/ansible-collections/kubernetes.core/issues/157). + - helm_plugin - Add support for helm plugin update using state=update. + - helm_repository - Ability to replace (overwrite) the repo if it already exists by forcing (https://github.com/ansible-collections/kubernetes.core/issues/491). + - helm_repository - add support for pass-credentials cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/282). + - helm_repository - added support for ``host``, ``api_key``, ``validate_certs``, and ``ca_cert``. + - helm_repository - mark `pass_credentials` as no_log=True to silence false warning (https://github.com/ansible-collections/kubernetes.core/issues/412). + - helm_template - add name (NAME of release) and disable_hook as optional module arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). + - helm_template - add show_only and release_namespace as module arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). + - helm_template - add support for -set-file, -set-json, -set and -set-string options when running helm template (https://github.com/ansible-collections/kubernetes.core/pull/546). + - k8s - add no_proxy support to k8s* (https://github.com/ansible-collections/kubernetes.core/pull/272). + - k8s - add support for server_side_apply. (https://github.com/ansible-collections/kubernetes.core/issues/87). + - k8s - add support for user impersonation. (https://github.com/ansible-collections/kubernetes/core/issues/40). + - k8s - allow resource definition using metadata.generateName (https://github.com/ansible-collections/kubernetes.core/issues/35). + - k8s lookup plugin - Enable turbo mode via environment variable (https://github.com/ansible-collections/kubernetes.core/issues/291). + - k8s, k8s_scale, k8s_service - add support for resource definition as manifest via. (https://github.com/ansible-collections/kubernetes.core/issues/451). + - k8s_cp - remove dependency with 'find' executable on remote pod when state=from_pod (https://github.com/ansible-collections/kubernetes.core/issues/486). + - k8s_drain - Adds ``delete_emptydir_data`` option to ``k8s_drain.delete_options`` to evict pods with an ``emptyDir`` volume attached (https://github.com/ansible-collections/kubernetes.core/pull/322). + - k8s_exec - select first container from the pod if none specified (https://github.com/ansible-collections/kubernetes.core/issues/358). + - k8s_exec - update deprecation warning for `return_code` (https://github.com/ansible-collections/kubernetes.core/issues/417). + - k8s_json_patch - minor typo fix in the example section (https://github.com/ansible-collections/kubernetes.core/issues/411). + - k8s_log - add the ``all_containers`` for retrieving all containers' logs in the pod(s). + - k8s_log - added the `previous` parameter for retrieving the previously terminated pod logs (https://github.com/ansible-collections/kubernetes.core/issues/437). + - k8s_log - added the `tail_lines` parameter to limit the number of lines to be retrieved from the end of the logs (https://github.com/ansible-collections/kubernetes.core/issues/488). + - k8s_rollback - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/243). + - k8s_scale - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/244). + - kubectl - wait for dd command to complete before proceeding (https://github.com/ansible-collections/kubernetes.core/pull/321). + - kubectl.py - replace distutils.spawn.find_executable with shutil.which in the kubectl connection plugin (https://github.com/ansible-collections/kubernetes.core/pull/456). fragments: - - 0-copy_ignore_txt.yml - - 208-add-dependency-update.yaml - - 226-add-version-parameter-to-helm_plugin.yml - - 231-helm-add-timeout-parameter.yaml - - 238-helm-add-support-for-helm-uninstall-wait.yaml - - 238-k8s-add-support-for-generate_name.yml - - 245-add-dry-run.yaml - - 250-k8s-add-support-for-impersonation.yaml - - 253-dont-wait-on-list-resources.yaml - - 255-k8s_scale-k8s_rollback-add-support-for-check_mode.yml - - 260-k8s-add-support-for-server_side_apply.yml - - 272-k8s-add-support-no_proxy.yaml - - 282-helm-repository-add-pass-credentials.yaml - - 290-returns-diff-in-check-mode.yaml - - 295-fix-k8s-drain-variable-declaration.yaml - - 298-remove-binary-file.yaml - - 30-helm-add-post-renderer-support.yml - - 308-fix-for-common-non-ascii-characters-in-resources.yaml - - 313-helm-template-add-support-for-name-and-disablehook.yml - - 313-helm-template-add-support-for-show-only-and-release-namespace.yml - - 321-kubectl_sleep.yml - - 322-Add-delete_emptydir_data-to-drain-delete_options.yaml - - 335-k8s-lookup-add-support-for-turbo-mode.yml - - 347-routing.yml - - 348-helm_template-fix-precedence-of-release-values-over-values-files.yaml - - 358-k8s_exec.yml - - 364-use-resource-prefix.yaml - - 377-helm-info-state.yml - - 389-helm-add-support-chart_repo_url-on-helm_diff.yml - - 391-fix-statefulset-wait.yaml - - 411_k8s_json_patch.yml - - 412_pass_creds.yml - - 417_deprecation.yml - - 428-fix-kubeconfig-parameter-with-multiple-config-files.yaml - - 437-k8s-add-support-for-previous-logs.yaml - - 456-replace-distutils.yml - - 478-add-support-for-manifest-url.yaml - - 481-refactor-common.yml - - 488-add-support-for-tail-logs.yaml - - 493-k8s_log-fix-module-when-pod-does-exist.yaml - - 497-helm-add-support-for-in-memory-kubeconfig.yml - - 498-k8s-honor-aliases.yaml - - 505-add-from-yaml-all-example.yml - - 509-helm-repo-add-force_update-argument.yaml - - 512-k8s_cp-add-support-for-check_mode-update-command-for-listing-files-into-pod.yaml - - 515-update-sanity-for-2-15.yml - - 522-fix-helm-tests.yml - - 523-helm_info-get-all-values.yaml - - 528-k8s_log-support-all_containers-options.yml - - 532-k8s_crd-fix-integration-test.yml - - 546-helm-install-add-support-for-set-options.yaml - - 549-fix-server-side-apply.yaml - - 552-k8s_cp-fix-issue-when-copying-item-with-space-in-its-name.yml - - 561-fix-dry-run.yml - - 562-helm-fix-issue-when-alternative-kubeconfig-is-provided.yaml - - 571-k8s_info-fix-issue-with-api-server.yaml - - _wait_for_label_selector_optional.yaml - - disutils.version.yml - - exception.yml - - fix-ci-unit-tests.yaml - - helm_repository.yml - - ignore_2.14.yml - - k8s_config_resource_name-add-missing-documentation.yml - - k8s_rollback_reduce_tmeouts.yaml - - k8s_user_impersonation_k8s_1_24.yaml - - minor-tests-duration.yaml + - "0-copy_ignore_txt.yml" + - 208-add-dependency-update.yaml + - 226-add-version-parameter-to-helm_plugin.yml + - 231-helm-add-timeout-parameter.yaml + - 238-helm-add-support-for-helm-uninstall-wait.yaml + - 238-k8s-add-support-for-generate_name.yml + - 245-add-dry-run.yaml + - 250-k8s-add-support-for-impersonation.yaml + - 253-dont-wait-on-list-resources.yaml + - 255-k8s_scale-k8s_rollback-add-support-for-check_mode.yml + - 260-k8s-add-support-for-server_side_apply.yml + - 272-k8s-add-support-no_proxy.yaml + - 282-helm-repository-add-pass-credentials.yaml + - 290-returns-diff-in-check-mode.yaml + - 295-fix-k8s-drain-variable-declaration.yaml + - 298-remove-binary-file.yaml + - 30-helm-add-post-renderer-support.yml + - 308-fix-for-common-non-ascii-characters-in-resources.yaml + - 313-helm-template-add-support-for-name-and-disablehook.yml + - 313-helm-template-add-support-for-show-only-and-release-namespace.yml + - 321-kubectl_sleep.yml + - 322-Add-delete_emptydir_data-to-drain-delete_options.yaml + - 335-k8s-lookup-add-support-for-turbo-mode.yml + - 347-routing.yml + - 348-helm_template-fix-precedence-of-release-values-over-values-files.yaml + - 358-k8s_exec.yml + - 364-use-resource-prefix.yaml + - 377-helm-info-state.yml + - 389-helm-add-support-chart_repo_url-on-helm_diff.yml + - 391-fix-statefulset-wait.yaml + - 411_k8s_json_patch.yml + - 412_pass_creds.yml + - 417_deprecation.yml + - 428-fix-kubeconfig-parameter-with-multiple-config-files.yaml + - 437-k8s-add-support-for-previous-logs.yaml + - 456-replace-distutils.yml + - 478-add-support-for-manifest-url.yaml + - 481-refactor-common.yml + - 488-add-support-for-tail-logs.yaml + - 493-k8s_log-fix-module-when-pod-does-exist.yaml + - 497-helm-add-support-for-in-memory-kubeconfig.yml + - 498-k8s-honor-aliases.yaml + - 505-add-from-yaml-all-example.yml + - 509-helm-repo-add-force_update-argument.yaml + - 512-k8s_cp-add-support-for-check_mode-update-command-for-listing-files-into-pod.yaml + - 515-update-sanity-for-2-15.yml + - 522-fix-helm-tests.yml + - 523-helm_info-get-all-values.yaml + - 528-k8s_log-support-all_containers-options.yml + - 532-k8s_crd-fix-integration-test.yml + - 546-helm-install-add-support-for-set-options.yaml + - 549-fix-server-side-apply.yaml + - 552-k8s_cp-fix-issue-when-copying-item-with-space-in-its-name.yml + - 561-fix-dry-run.yml + - 562-helm-fix-issue-when-alternative-kubeconfig-is-provided.yaml + - 571-k8s_info-fix-issue-with-api-server.yaml + - _wait_for_label_selector_optional.yaml + - disutils.version.yml + - exception.yml + - fix-ci-unit-tests.yaml + - helm_repository.yml + - ignore_2.14.yml + - k8s_config_resource_name-add-missing-documentation.yml + - k8s_rollback_reduce_tmeouts.yaml + - k8s_user_impersonation_k8s_1_24.yaml + - minor-tests-duration.yaml modules: - - description: download a chart from a repository and (optionally) unpack it in - local directory. - name: helm_pull - namespace: '' - release_date: '2023-01-24' + - description: download a chart from a repository and (optionally) unpack it in local directory. + name: helm_pull + namespace: "" + release_date: "2023-01-24" diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 69554b8464..138225941b 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -10,21 +10,21 @@ notesdir: fragments prelude_section_name: release_summary prelude_section_title: Release Summary sections: -- - major_changes - - Major Changes -- - minor_changes - - Minor Changes -- - breaking_changes - - Breaking Changes / Porting Guide -- - deprecated_features - - Deprecated Features -- - removed_features - - Removed Features (previously deprecated) -- - security_fixes - - Security Fixes -- - bugfixes - - Bugfixes -- - known_issues - - Known Issues + - - major_changes + - Major Changes + - - minor_changes + - Minor Changes + - - breaking_changes + - Breaking Changes / Porting Guide + - - deprecated_features + - Deprecated Features + - - removed_features + - Removed Features (previously deprecated) + - - security_fixes + - Security Fixes + - - bugfixes + - Bugfixes + - - known_issues + - Known Issues title: Kubernetes Collection trivial_section_name: trivial diff --git a/galaxy.yml b/galaxy.yml index 3da7e4a773..dc52ea7883 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,8 +9,8 @@ authors: - mmazur (https://github.com/mmazur) - jamescassell (https://github.com/jamescassell) description: Kubernetes Collection for Ansible. -documentation: '' -homepage: '' +documentation: "" +homepage: "" issues: https://github.com/ansible-collections/kubernetes.core/issues license_file: LICENSE namespace: kubernetes @@ -28,4 +28,4 @@ tags: version: 2.4.0 build_ignore: - .DS_Store - - '*.tar.gz' + - "*.tar.gz" diff --git a/meta/runtime.yml b/meta/runtime.yml index 6b6ebf57a8..b9a9637669 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,5 +1,5 @@ --- -requires_ansible: '>=2.9.17' +requires_ansible: ">=2.9.17" action_groups: helm: @@ -29,18 +29,18 @@ plugin_routing: warning_text: Use kubernetes.core.k8s_info instead. k8s_raw: tombstone: - removal_version: 0.1.0 + removal_version: "0.1.0" warning_text: The k8s_raw module was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s instead. openshift_raw: tombstone: - removal_version: 0.1.0 + removal_version: "0.1.0" warning_text: The openshift_raw module was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s instead. openshift_scale: tombstone: - removal_version: 0.1.0 + removal_version: "0.1.0" warning_text: The openshift_scale module was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s_scale instead. lookup: openshift: tombstone: - removal_version: 0.1.0 + removal_version: "0.1.0" warning_text: The openshift lookup plugin was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s instead. diff --git a/plugins/filter/k8s.py b/plugins/filter/k8s.py index 8cfc4d1971..a8ec560b3d 100644 --- a/plugins/filter/k8s.py +++ b/plugins/filter/k8s.py @@ -26,16 +26,16 @@ """ EXAMPLES = r""" - # Dump generated name for a configmap into a variable - - set_fact: - generated_name: '{{ definition | kubernetes.core.k8s_config_resource_name }}' - vars: - definition: - apiVersion: v1 - kind: ConfigMap - metadata: - name: myconfigmap - namespace: mynamespace +# Dump generated name for a configmap into a variable +- set_fact: + generated_name: '{{ definition | kubernetes.core.k8s_config_resource_name }}' + vars: + definition: + apiVersion: v1 + kind: ConfigMap + metadata: + name: myconfigmap + namespace: mynamespace """ RETURN = r""" diff --git a/plugins/inventory/k8s.py b/plugins/inventory/k8s.py index 099730f1b0..462856bb6d 100644 --- a/plugins/inventory/k8s.py +++ b/plugins/inventory/k8s.py @@ -27,7 +27,7 @@ connections: description: - Optional list of cluster connection settings. If no connections are provided, the default - I(~/.kube/config) and active context will be used, and objects will be returned for all namespaces + '~/.kube/config' and active context will be used, and objects will be returned for all namespaces the active user is authorized to access. suboptions: name: @@ -38,7 +38,7 @@ description: - Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the Kubernetes client will attempt to load the default - configuration file from I(~/.kube/config). Can also be specified via K8S_AUTH_KUBECONFIG + configuration file from '~/.kube/config'. Can also be specified via K8S_AUTH_KUBECONFIG environment variable. context: description: @@ -94,24 +94,24 @@ EXAMPLES = """ # File must be named k8s.yaml or k8s.yml -# Authenticate with token, and return all pods and services for all namespaces -plugin: kubernetes.core.k8s -connections: - - host: https://192.168.64.4:8443 - api_key: xxxxxxxxxxxxxxxx - validate_certs: false - -# Use default config (~/.kube/config) file and active context, and return objects for a specific namespace -plugin: kubernetes.core.k8s -connections: - - namespaces: - - testing - -# Use a custom config file, and a specific context. -plugin: kubernetes.core.k8s -connections: - - kubeconfig: /path/to/config - context: 'awx/192-168-64-4:8443/developer' +- name: Authenticate with token, and return all pods and services for all namespaces + plugin: kubernetes.core.k8s + connections: + - host: https://192.168.64.4:8443 + api_key: xxxxxxxxxxxxxxxx + validate_certs: false + +- name: Use default config (~/.kube/config) file and active context, and return objects for a specific namespace + plugin: kubernetes.core.k8s + connections: + - namespaces: + - testing + +- name: Use a custom config file, and a specific context. + plugin: kubernetes.core.k8s + connections: + - kubeconfig: /path/to/config + context: 'awx/192-168-64-4:8443/developer' """ import json diff --git a/plugins/modules/k8s.py b/plugins/modules/k8s.py index 9b284d15d3..a14dfc77bd 100644 --- a/plugins/modules/k8s.py +++ b/plugins/modules/k8s.py @@ -257,10 +257,10 @@ kubernetes.core.k8s: state: present template: - - path: '/testing/deployment_one.j2' - - path: '/testing/deployment_two.j2' - variable_start_string: '[[' - variable_end_string: ']]' + - path: '/testing/deployment_one.j2' + - path: '/testing/deployment_two.j2' + variable_start_string: '[[' + variable_end_string: ']]' - name: fail on validation errors kubernetes.core.k8s: diff --git a/plugins/modules/k8s_drain.py b/plugins/modules/k8s_drain.py index 0f353a6df9..fef2ced783 100644 --- a/plugins/modules/k8s_drain.py +++ b/plugins/modules/k8s_drain.py @@ -104,7 +104,7 @@ state: drain name: foo delete_options: - terminate_grace_period: 900 + terminate_grace_period: 900 - name: Mark node "foo" as schedulable. kubernetes.core.k8s_drain: @@ -115,7 +115,6 @@ kubernetes.core.k8s_drain: state: cordon name: foo - """ RETURN = r""" From e9ae1fee21b1c03c1afc7fac778d7144dc30e87f Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Tue, 30 Jan 2024 13:58:10 -0500 Subject: [PATCH 9/9] Add ignore import --- tests/sanity/ignore-2.16.txt | 3 +++ tests/sanity/ignore-2.17.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt index 187efabfdb..d6a6d72804 100644 --- a/tests/sanity/ignore-2.16.txt +++ b/tests/sanity/ignore-2.16.txt @@ -5,18 +5,21 @@ plugins/module_utils/client/discovery.py import-3.8!skip 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.12!skip plugins/module_utils/client/resource.py import-3.6!skip plugins/module_utils/client/resource.py import-3.7!skip plugins/module_utils/client/resource.py import-3.8!skip plugins/module_utils/client/resource.py import-3.9!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.12!skip plugins/module_utils/k8sdynamicclient.py import-3.6!skip plugins/module_utils/k8sdynamicclient.py import-3.7!skip plugins/module_utils/k8sdynamicclient.py import-3.8!skip plugins/module_utils/k8sdynamicclient.py import-3.9!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.12!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 diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt index 187efabfdb..d6a6d72804 100644 --- a/tests/sanity/ignore-2.17.txt +++ b/tests/sanity/ignore-2.17.txt @@ -5,18 +5,21 @@ plugins/module_utils/client/discovery.py import-3.8!skip 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.12!skip plugins/module_utils/client/resource.py import-3.6!skip plugins/module_utils/client/resource.py import-3.7!skip plugins/module_utils/client/resource.py import-3.8!skip plugins/module_utils/client/resource.py import-3.9!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.12!skip plugins/module_utils/k8sdynamicclient.py import-3.6!skip plugins/module_utils/k8sdynamicclient.py import-3.7!skip plugins/module_utils/k8sdynamicclient.py import-3.8!skip plugins/module_utils/k8sdynamicclient.py import-3.9!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.12!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