Skip to content

Commit

Permalink
Prepare release 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
abikouo committed May 23, 2024
1 parent cbadbe3 commit e653239
Show file tree
Hide file tree
Showing 15 changed files with 94 additions and 1,479 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,44 @@ Kubernetes Collection Release Notes

.. contents:: Topics

v4.0.0
======

Release Summary
---------------

This major release brings several bug fixes. We have also removed support for ``ansible-core<2.15``.

Minor Changes
-------------

- inventory/k8s.py - Defer removal of k8s inventory plugin to version 5.0 (https://github.com/ansible-collections/kubernetes.core/pull/723).
- k8s - The module and K8sService were changed so warnings returned by the K8S API are now displayed to the user.

Breaking Changes / Porting Guide
--------------------------------

- kubernetes.core collection - Support for ansible-core < 2.15.0 has been dropped.

Removed Features (previously deprecated)
----------------------------------------

- k8s - Support for ``merge_type=json`` has been removed in version 4.0.0. Please use ``kubernetes.core.k8s_json_patch`` instead (https://github.com/ansible-collections/kubernetes.core/pull/722).
- k8s_exec - the previously deprecated ``result.return_code`` return value has been removed, consider using ``result.rc`` instead.
- module_utils/common.py - the previously deprecated ``K8sAnsibleMixin`` class has been removed.
- module_utils/common.py - the previously deprecated ``configuration_digest()`` function has been removed.
- module_utils/common.py - the previously deprecated ``get_api_client()`` function has been removed.
- module_utils/common.py - the previously deprecated ``unique_string()`` function has been removed.

Bugfixes
--------

- Resolve Collections util resource discovery fails when complex subresources present (https://github.com/ansible-collections/kubernetes.core/pull/676).
- align `helmdiff_check()` function commandline rendering with the `deploy()` function (https://github.com/ansible-collections/kubernetes.core/pull/670).
- avoid unsafe conditions in integration tests (https://github.com/ansible-collections/kubernetes.core/pull/665).
- helm - use ``reuse-values`` when running ``helm diff`` command (https://github.com/ansible-collections/kubernetes.core/issues/680).
- integrations test helm_kubeconfig - set helm version to v3.10.3 to avoid incompatability with new bitnami charts (https://github.com/ansible-collections/kubernetes.core/pull/670).

v3.1.0
======

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Also needs to be updated in galaxy.yml
VERSION = 3.0.0
VERSION = 4.0.0

TEST_ARGS ?= ""
PYTHON_VERSION ?= `python -c 'import platform; print(".".join(platform.python_version_tuple()[0:2]))'`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ You can also include it in a `requirements.yml` file and install it via `ansible
---
collections:
- name: kubernetes.core
version: 3.0.0
version: 4.0.0
```
### Installing the Kubernetes Python Library
Expand Down
42 changes: 42 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -854,3 +854,45 @@ releases:
- 652-fix-json-patch-action.yml
- 654-helm-expand-user.yml
release_date: '2024-05-16'
4.0.0:
changes:
breaking_changes:
- kubernetes.core collection - Support for ansible-core < 2.15.0 has been dropped.
bugfixes:
- Resolve Collections util resource discovery fails when complex subresources
present (https://github.com/ansible-collections/kubernetes.core/pull/676).
- align `helmdiff_check()` function commandline rendering with the `deploy()`
function (https://github.com/ansible-collections/kubernetes.core/pull/670).
- avoid unsafe conditions in integration tests (https://github.com/ansible-collections/kubernetes.core/pull/665).
- helm - use ``reuse-values`` when running ``helm diff`` command (https://github.com/ansible-collections/kubernetes.core/issues/680).
- integrations test helm_kubeconfig - set helm version to v3.10.3 to avoid incompatability
with new bitnami charts (https://github.com/ansible-collections/kubernetes.core/pull/670).
minor_changes:
- inventory/k8s.py - Defer removal of k8s inventory plugin to version 5.0 (https://github.com/ansible-collections/kubernetes.core/pull/723).
- k8s - The module and K8sService were changed so warnings returned by the K8S
API are now displayed to the user.
release_summary: This major release brings several bug fixes. We have also removed
support for ``ansible-core<2.15``.
removed_features:
- k8s - Support for ``merge_type=json`` has been removed in version 4.0.0. Please
use ``kubernetes.core.k8s_json_patch`` instead (https://github.com/ansible-collections/kubernetes.core/pull/722).
- k8s_exec - the previously deprecated ``result.return_code`` return value has
been removed, consider using ``result.rc`` instead.
- module_utils/common.py - the previously deprecated ``K8sAnsibleMixin`` class
has been removed.
- module_utils/common.py - the previously deprecated ``configuration_digest()``
function has been removed.
- module_utils/common.py - the previously deprecated ``get_api_client()`` function
has been removed.
- module_utils/common.py - the previously deprecated ``unique_string()`` function
has been removed.
fragments:
- 20231206-fix-unsafe-condition-in-integration.yml
- 20240117-fix-helm-diff-cmd-line-rendering.yml
- 20240222-Collections-util-resource-discovery-fails-when-complex-subresources-present.yml
- 20240228-fix-helm-diff-with-reuse-values.yml
- 20240423-k8s-display-warnings-to-users.yml
- increase_ansible_core_version.yaml
- inventory-update_removal_date.yml
- k8s-merge_type-removed.yml
release_date: '2024-05-22'

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions changelogs/fragments/inventory-update_removal_date.yml

This file was deleted.

2 changes: 0 additions & 2 deletions changelogs/fragments/k8s-merge_type-removed.yml

This file was deleted.

2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tags:
- openshift
- okd
- cluster
version: 3.1.0
version: 4.0.0
build_ignore:
- .DS_Store
- "*.tar.gz"
20 changes: 10 additions & 10 deletions plugins/inventory/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@
import json

from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, Constructable
from ansible_collections.kubernetes.core.plugins.module_utils.common import (
HAS_K8S_MODULE_HELPER,
k8s_import_exception,
)
from ansible_collections.kubernetes.core.plugins.module_utils.k8s.client import (
get_api_client,
)
from ansible.plugins.inventory import (BaseInventoryPlugin, Cacheable,
Constructable)

try:
from kubernetes.dynamic.exceptions import DynamicApiError
except ImportError:
pass

HAS_K8S_MODULE_HELPER = True
k8s_import_exception = None
except ImportError as e:
HAS_K8S_MODULE_HELPER = False
k8s_import_exception = e
from ansible_collections.kubernetes.core.plugins.module_utils.k8s.client import \
get_api_client


def format_dynamic_api_exc(exc):
Expand Down
Loading

0 comments on commit e653239

Please sign in to comment.