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