Compare commits

4 Commits
2.3.1 ... 2.3.2

Author SHA1 Message Date
Mike Graves
69304d1c3b Release version 2.3.2 (#475)
Release version 2.3.2

SUMMARY

Release version 2.3.2

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
2022-06-10 12:29:55 +00:00
Mike Graves
fdddb6f78f helm_repository: Silence false no_log warning (#423) (#473)
[backport/2.3] helm_repository: Silence false no_log warning (#423)

Depends-on: ansible/ansible-zuul-jobs#1563
helm_repository: Silence false no_log warning
Depends-On: #424
SUMMARY
Apply no_log=True to pass_credentials to silence
false positive warning.
Fixes: #412
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
changelogs/fragments/412_pass_creds.yml
plugins/modules/helm_repository.py
Reviewed-by: Mike Graves mgraves@redhat.com
(cherry picked from commit d311ac7)
SUMMARY


ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION
2022-06-08 17:20:12 +00:00
Mike Graves
e8cf1ef517 Add missing PSF license (#463) (#465)
[backport/2.3] Add missing PSF license (#463)

Add missing PSF license
SUMMARY
Add missing PSF license
Fixes #462
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION
Reviewed-by: Abhijeet Kasurde 
Reviewed-by: Felix Fontein felix@fontein.de
(cherry picked from commit 3729b8b)
2022-05-16 23:34:34 +00:00
Mike Graves
6dbc0d5b6d Remove distutils from connection plugin (#456) (#464)
[backport/2.3] Remove distutils from connection plugin (#456)

Remove distutils from connection plugin
SUMMARY
distutils.spawn.find_executable is deprecated and shutils.which is a
suitable replacement.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION
Reviewed-by: Gonéri Le Bouder goneri@lebouder.net
Reviewed-by: Joseph Torcasso 
(cherry picked from commit 531a9fe)
2022-05-16 16:19:36 +00:00
9 changed files with 77 additions and 14 deletions

View File

@@ -5,6 +5,15 @@ Kubernetes Collection Release Notes
.. contents:: Topics .. contents:: Topics
v2.3.2
======
Minor Changes
-------------
- helm_repository - mark `pass_credentials` as no_log=True to silence false warning (https://github.com/ansible-collections/kubernetes.core/issues/412).
- kubectl.py - replace distutils.spawn.find_executable with shutil.which in the kubectl connection plugin (https://github.com/ansible-collections/kubernetes.core/pull/456).
v2.3.1 v2.3.1
====== ======

View File

@@ -1,5 +1,5 @@
# Also needs to be updated in galaxy.yml # Also needs to be updated in galaxy.yml
VERSION = 2.3.1 VERSION = 2.3.2
TEST_ARGS ?= "" TEST_ARGS ?= ""
PYTHON_VERSION ?= `python -c 'import platform; print(".".join(platform.python_version_tuple()[0:2]))'` PYTHON_VERSION ?= `python -c 'import platform; print(".".join(platform.python_version_tuple()[0:2]))'`

48
PSF-license.txt Normal file
View File

@@ -0,0 +1,48 @@
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------
1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation;
All Rights Reserved" are retained in Python alone or in any derivative version
prepared by Licensee.
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.
4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.

View File

@@ -92,7 +92,7 @@ You can also include it in a `requirements.yml` file and install it via `ansible
--- ---
collections: collections:
- name: kubernetes.core - name: kubernetes.core
version: 2.3.1 version: 2.3.2
``` ```
### Installing the Kubernetes Python Library ### Installing the Kubernetes Python Library

View File

@@ -587,3 +587,14 @@ releases:
- 432-fix-issue-when-using-template-parameter.yaml - 432-fix-issue-when-using-template-parameter.yaml
- 434-fix-k8s-delete-using-label_selector.yaml - 434-fix-k8s-delete-using-label_selector.yaml
release_date: '2022-05-02' release_date: '2022-05-02'
2.3.2:
changes:
minor_changes:
- helm_repository - mark `pass_credentials` as no_log=True to silence false
warning (https://github.com/ansible-collections/kubernetes.core/issues/412).
- 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:
- 412_pass_creds.yml
- 456-replace-distutils.yml
release_date: '2022-06-09'

View File

@@ -25,7 +25,7 @@ tags:
- openshift - openshift
- okd - okd
- cluster - cluster
version: 2.3.1 version: 2.3.2
build_ignore: build_ignore:
- .DS_Store - .DS_Store
- '*.tar.gz' - '*.tar.gz'

View File

@@ -171,9 +171,9 @@ DOCUMENTATION = r"""
aliases: [ kubectl_verify_ssl ] aliases: [ kubectl_verify_ssl ]
""" """
import distutils.spawn
import os import os
import os.path import os.path
import shutil
import subprocess import subprocess
from ansible.parsing.yaml.loader import AnsibleLoader from ansible.parsing.yaml.loader import AnsibleLoader
@@ -219,14 +219,9 @@ class Connection(ConnectionBase):
# Note: kubectl runs commands as the user that started the container. # Note: kubectl runs commands as the user that started the container.
# It is impossible to set the remote user for a kubectl connection. # It is impossible to set the remote user for a kubectl connection.
cmd_arg = "{0}_command".format(self.transport) cmd_arg = "{0}_command".format(self.transport)
if cmd_arg in kwargs: self.transport_cmd = kwargs.get(cmd_arg, shutil.which(self.transport))
self.transport_cmd = kwargs[cmd_arg] if not self.transport_cmd:
else: raise AnsibleError("{0} command not found in PATH".format(self.transport))
self.transport_cmd = distutils.spawn.find_executable(self.transport)
if not self.transport_cmd:
raise AnsibleError(
"{0} command not found in PATH".format(self.transport)
)
def _build_exec_cmd(self, cmd): def _build_exec_cmd(self, cmd):
"""Build the local kubectl exec command to run cmd on remote_host""" """Build the local kubectl exec command to run cmd on remote_host"""

View File

@@ -3,7 +3,7 @@
# Implements multiple version numbering conventions for the # Implements multiple version numbering conventions for the
# Python Module Distribution Utilities. # Python Module Distribution Utilities.
# #
# PSF License (see licenses/PSF-license.txt or https://opensource.org/licenses/Python-2.0) # PSF License (see PSF-license.txt or https://opensource.org/licenses/Python-2.0)
# #
"""Provides classes to represent module version numbers (one class for """Provides classes to represent module version numbers (one class for

View File

@@ -228,7 +228,7 @@ def main():
repo_state=dict( repo_state=dict(
default="present", choices=["present", "absent"], aliases=["state"] default="present", choices=["present", "absent"], aliases=["state"]
), ),
pass_credentials=dict(type="bool", default=False), pass_credentials=dict(type="bool", default=False, no_log=True),
# Generic auth key # Generic auth key
host=dict(type="str", fallback=(env_fallback, ["K8S_AUTH_HOST"])), host=dict(type="str", fallback=(env_fallback, ["K8S_AUTH_HOST"])),
ca_cert=dict( ca_cert=dict(