mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
Update python kubernetes library to 24.2.0 , helm/kind-action to 1.8.0
This commit is contained in:
2
.github/workflows/integration-tests.yaml
vendored
2
.github/workflows/integration-tests.yaml
vendored
@@ -131,7 +131,7 @@ jobs:
|
||||
source_path: ${{ env.ansible_posix }}
|
||||
|
||||
- name: create kubernetes cluster
|
||||
uses: helm/kind-action@v1.4.0
|
||||
uses: helm/kind-action@v1.8.0
|
||||
|
||||
- name: Run integration tests
|
||||
uses: ansible-network/github_actions/.github/actions/ansible_test_integration@main
|
||||
|
||||
@@ -20,13 +20,13 @@ PEP440 is the schema used to describe the versions of Ansible.
|
||||
|
||||
## Python Support
|
||||
|
||||
* Collection supports 3.6+
|
||||
* Collection supports 3.9+
|
||||
|
||||
Note: Python2 is deprecated from [1st January 2020](https://www.python.org/doc/sunset-python-2/). Please switch to Python3.
|
||||
|
||||
## Kubernetes Version Support
|
||||
|
||||
This collection supports Kubernetes versions >=1.19.
|
||||
This collection supports Kubernetes versions >= 1.24.
|
||||
|
||||
## Included content
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ DOCUMENTATION = """
|
||||
to access.
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
"""
|
||||
|
||||
|
||||
@@ -114,8 +114,8 @@ DOCUMENTATION = """
|
||||
aliases: [ verify_ssl ]
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
"""
|
||||
|
||||
|
||||
@@ -796,8 +796,8 @@ class K8sAnsibleMixin(object):
|
||||
self.resource_definitions = [implicit_definition]
|
||||
|
||||
def check_library_version(self):
|
||||
if LooseVersion(self.kubernetes_version) < LooseVersion("12.0.0"):
|
||||
self.fail_json(msg="kubernetes >= 12.0.0 is required")
|
||||
if LooseVersion(self.kubernetes_version) < LooseVersion("24.2.0"):
|
||||
self.fail_json(msg="kubernetes >= 24.2.0 is required")
|
||||
|
||||
def flatten_list_kind(self, list_resource, definitions):
|
||||
flattened = []
|
||||
|
||||
@@ -35,7 +35,7 @@ class AnsibleK8SModule:
|
||||
|
||||
if self.settings["check_k8s"]:
|
||||
self.requires("kubernetes")
|
||||
self.has_at_least("kubernetes", "12.0.0", warn=True)
|
||||
self.has_at_least("kubernetes", "24.2.0", warn=True)
|
||||
|
||||
if self.settings["check_pyyaml"]:
|
||||
self.requires("pyyaml")
|
||||
|
||||
@@ -195,8 +195,8 @@ options:
|
||||
version_added: 2.5.0
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
- "jsonpatch"
|
||||
"""
|
||||
|
||||
@@ -34,8 +34,8 @@ extends_documentation_fragment:
|
||||
- kubernetes.core.k8s_auth_options
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
"""
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ extends_documentation_fragment:
|
||||
- kubernetes.core.k8s_auth_options
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
|
||||
options:
|
||||
namespace:
|
||||
|
||||
@@ -97,8 +97,8 @@ options:
|
||||
type: int
|
||||
|
||||
requirements:
|
||||
- python >= 3.6
|
||||
- kubernetes >= 12.0.0
|
||||
- python >= 3.9
|
||||
- kubernetes >= 24.2.0
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
||||
@@ -26,8 +26,8 @@ extends_documentation_fragment:
|
||||
- kubernetes.core.k8s_auth_options
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
|
||||
notes:
|
||||
|
||||
@@ -59,8 +59,8 @@ extends_documentation_fragment:
|
||||
- kubernetes.core.k8s_wait_options
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
"""
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ extends_documentation_fragment:
|
||||
- kubernetes.core.k8s_wait_options
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
- "jsonpatch"
|
||||
"""
|
||||
|
||||
@@ -83,8 +83,8 @@ options:
|
||||
version_added: '2.4.0'
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
"""
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ extends_documentation_fragment:
|
||||
- kubernetes.core.k8s_auth_options
|
||||
- kubernetes.core.k8s_name_options
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
"""
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ options:
|
||||
version_added: 2.0.0
|
||||
|
||||
requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "python >= 3.9"
|
||||
- "kubernetes >= 24.2.0"
|
||||
- "PyYAML >= 3.11"
|
||||
"""
|
||||
|
||||
|
||||
@@ -83,8 +83,8 @@ options:
|
||||
type: bool
|
||||
|
||||
requirements:
|
||||
- python >= 3.6
|
||||
- kubernetes >= 12.0.0
|
||||
- python >= 3.9
|
||||
- kubernetes >= 24.2.0
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
||||
@@ -60,8 +60,8 @@ options:
|
||||
default: false
|
||||
type: bool
|
||||
requirements:
|
||||
- python >= 3.6
|
||||
- kubernetes >= 12.0.0
|
||||
- python >= 3.9
|
||||
- kubernetes >= 24.2.0
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
kubernetes>=12.0.0
|
||||
kubernetes>=24.2.0
|
||||
requests-oauthlib
|
||||
jsonpatch
|
||||
|
||||
@@ -10,7 +10,7 @@ from ansible_collections.kubernetes.core.plugins.module_utils.k8s.core import (
|
||||
AnsibleK8SModule,
|
||||
)
|
||||
|
||||
MINIMAL_K8S_VERSION = "12.0.0"
|
||||
MINIMAL_K8S_VERSION = "24.2.0"
|
||||
UNSUPPORTED_K8S_VERSION = "11.0.0"
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ dependencies = [
|
||||
def test_requires_fails_with_message(
|
||||
monkeypatch, stdin, dependency, version, msg, capfd
|
||||
):
|
||||
monkeypatch.setattr(kubernetes, "__version__", "12.0.0")
|
||||
monkeypatch.setattr(kubernetes, "__version__", "24.2.0")
|
||||
module = AnsibleK8SModule(argument_spec={})
|
||||
with pytest.raises(SystemExit):
|
||||
module.requires(dependency, version)
|
||||
|
||||
Reference in New Issue
Block a user