Commit Graph

730 Commits

Author SHA1 Message Date
Mike Graves
4f1623fe9c Add deprecation notice 2022-06-17 10:39:52 -04:00
Mike Graves
adf3503d4e Migrate k8s_taint to refactored code (#477)
Migrate k8s_taint to refactored code

Depends-on: #476
SUMMARY

This changes the k8s_taint module to use the newly refactored code.

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
2022-06-15 14:41:10 +00:00
Mike Graves
beb53652db Ensure CoreExceptions are handled gracefully (#476)
Ensure CoreExceptions are handled gracefully

SUMMARY

CoreExceptions, when raised, should have a reasonably helpful and
actionable message associated with them. This adds a final check in
module execution to gracefully fail from these exceptions. A new
fail_from_exception method is added both to simplify exiting the module,
and to ensure that any chained exceptions are available when using -vvv.

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Joseph Torcasso <None>
2022-06-15 13:26:24 +00:00
Mike Graves
92785f58da Port changes from main to refactored branch (#472)
Port changes from main to refactored branch

Depends-on: ansible/ansible-zuul-jobs#1563
SUMMARY

This PR contains several commits that complete the rebase of the 2.x-refactor branch onto main. Most of the changes here had to be manually backported after rebasing as the original changes were to code that will be deprecated. In addition, rather than trying to manually sort out conflicts and changes to the sanity ignores, I rewrote the refresh_ignore_files script to fully automate the management of ignore files. Previously, these files were both manually edited and auto-generated. This should no longer be the case, and these files should never be manually edited going forward.
For the purposes of reviewing and history, I kept all changes in separate commits tied to the original commit being backported.

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Jill R <None>
2022-06-09 15:20:48 +00:00
Mike Graves
25644ac192 Move diff and wait to perform_action (#375)
This primarily moves the diff and wait logic from the various service
methods to perform_action to eliminate code duplication. I also moved
the diff_objects function out of the service object and moved most of
the find_resource logic to a new resource client method. We ended up
with several modules creating a service object just to use one of these
methods, so it seemed to make sense to make these more accessible.
2022-05-26 08:56:56 -04:00
Alina Buzachis
3bf147580f Migrate k8s (#311)
* Use refactored module_utils

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix runner

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix runner

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Update runner.py

* black runner

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix units

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix ResourceTimeout

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Attempt to fix 'Create custom resource'

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Update svc.find_resource(..., fail=True)

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Attempt to fix integration tests

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix apiVersion for Job

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix crd

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add exception = None

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix apiVersion for definition

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix assert

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix returned results

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Update runner to return results accordingly

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix assert

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add validate-missing

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Update client.py

* Fix failures

* Fix black formatting

Co-authored-by: Mike Graves <mgraves@redhat.com>
2022-05-26 08:15:45 -04:00
Bikouo Aubin
193a0cb68c Fix kubeconfig parameter when multiple config files are provided (#468)
Fix kubeconfig parameter when multiple config files are provided

SUMMARY

#435

ISSUE TYPE


Bugfix Pull Request

Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-05-25 15:04:02 +00:00
Alina Buzachis
58a0fb1605 Refactor k8s_exec to use new module_utils code (#328)
* Refactor k8s_exec to use new module_utils code

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix client

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2022-05-24 14:58:57 -04:00
Mike Graves
b62ea00ebf Refactor k8s_cluster_info to use new module_utils code (#325)
Refactor k8s_cluster_info to use new module_utils code

SUMMARY

Refactor k8s_cluster_info to use new module_utils code

ISSUE TYPE
COMPONENT NAME

k8s_cluster_info
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-05-24 14:56:59 -04:00
Alina Buzachis
349e9f473a Refactor k8s_service to use new module_utils code (#327)
Refactor k8s_service to use new module_utils code

SUMMARY

Refactor k8s_service to use new module_utils code

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

k8s_service

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-05-24 14:56:57 -04:00
Alina Buzachis
61faa1079e [backport/2.2] Update k8s_scale to use module_utils refactored code 2022-05-24 14:53:37 -04:00
Mike Graves
08a3d951d0 Move module dependency functions outside of module (#342)
Move module dependency functions outside of module

SUMMARY

This moves the has_at_least and requires functions that had been on the
module to top level functions. The functions on the module now call
these with a few added bits of functionality.
Moving these functions to the top level and removing their requirement
on having a module makes them usable in situations where we may not yet
have a module, such as during client creation.

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-05-24 14:28:30 -04:00
Mike Graves
8171c994df [backport/2.2] Migrate k8s_cp module to new refactored code (#329)
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
2022-05-24 14:28:27 -04:00
Alina Buzachis
f5a0dd5946 Update k8s_rollback to use refactored module_utils (#338)
Update k8s_rollback to use refactored module_utils

SUMMARY

Update k8s_rollback to use refactored module_utils

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

k8s_rollback

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: None <None>
2022-05-24 13:46:34 -04:00
Alina Buzachis
9aa20f0fbe Migrate k8s_info (#310)
* Use refactored module_utils

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Update k8s_info.py

* Fix assertion

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2022-05-24 13:31:46 -04:00
Mike Graves
afa6a74178 Migrate json_patch to use new refactored code (#339)
Migrate json_patch to use new refactored code

SUMMARY

Migrate json_patch to use new refactored code

ISSUE TYPE

COMPONENT NAME

k8s_json_patch
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-05-24 13:29:59 -04:00
Mike Graves
e2e3f71ecf [backport/2.2] Migrate k8s_log to new refactored code (#336) 2022-05-24 13:29:57 -04:00
Mike Graves
346e303084 [backport/2.x] Migrate k8s_drain to use refactored code (#330) 2022-05-24 12:17:37 -04:00
Alina Buzachis
d68da5bbdd k8s runner (#309)
k8s runner

SUMMARY

k8s runner
Requires: #307

ISSUE TYPE

New Module Pull Request

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: None <None>
2022-05-24 11:57:54 -04:00
Alina Buzachis
e2f54d3431 K8sService class (#307)
K8sService class

SUMMARY

This refactors the perform_action() logic from common.py into a separate K8sService class.
TODO:

 Unit tests.

ISSUE TYPE

New Module Pull Request

COMPONENT NAME

service.py

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-05-24 11:57:01 -04:00
Mike Graves
f168a3f67f Add new waiter (#306)
Add new waiter

SUMMARY

This refactors the waiter logic from common.py into a separate module.

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-05-24 11:56:20 -04:00
Alina Buzachis
7fb89a7b6f Initial work K8S client class (#276)
Initial work K8S client class

SUMMARY

Initial work on K8SClient Class.

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-05-24 11:55:40 -04:00
Mike Graves
42644ee26e Add resource definition refactor (#278)
Add resource definition refactor

SUMMARY

This refactors most of the logic around creating a list of functional
resource definitions based on input parameters for the module.

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: None <None>
2022-05-24 11:54:59 -04:00
Mike Graves
2a9d894c90 Add new AnsibleK8SModule class (#269)
* Add new AnsibleK8SModule class

This class is intended to replace part of the K8SAnsibleMixin class and
is part of a larger refactoring effort.

* Fix sanity errors

* Fix unit tests

* Add mock to test requirements
2022-05-24 11:53:58 -04:00
Mike Graves
3729b8bb5b 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 <None>
Reviewed-by: Felix Fontein <felix@fontein.de>
2022-05-16 16:19:39 +00:00
Mike Graves
531a9fe3ac Remove distutils from connection plugin (#456)
Remove distutils from connection plugin

Depends-On: ansible/ansible-zuul-jobs#1527
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 <None>
2022-05-11 18:56:27 +00:00
Mike Graves
77dd2496d0 Bring docs changes over from latest release (#455)
Bring docs changes over from latest release

Depends-On: ansible/ansible-zuul-jobs#1526
SUMMARY

Brings docs generation changes over from 2.3.1 release.

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
2022-05-10 15:14:23 +00:00
Christian von Stebut
95e2add65b Helm template add name and disable hook (#405)
Helm template add name and disable hook

SUMMARY
This PR adds "disable_hook" and "name" (NAME of the release)  as optional arguments to the helm_template module.
It contains the rest of my planned work towards #313.
ISSUE TYPE


Feature Pull Request

COMPONENT NAME

plugins/modules/helm_template.py
changelogs/fragments/313-helm-template-add-support-for-name-and-disablehook.yml
tests/unit/modules/test_helm_template.py
integration/targets/helm/tasks/tests_chart.yml
ADDITIONAL INFORMATION


The PR contains unit tests and an integration test for the new parameters added in this and the previous PR.
I limited the execution of the integration test to the local test chart, because the testing of the "show_only" parameter requires a known chart structure. As I think I do not have to test the workings of "helm template ..." itself, I hope this is sufficient.
Please adjust / comment as necessary.

Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-04-29 13:43:09 +00:00
Mike Graves
b5cfc854cb Change line in doc fragment yaml (#439)
Change line in doc fragment yaml

SUMMARY

For whatever reason, the one line in this doc fragment leads to sanity
failures in the redhat.openshift collection, which uses this fragment.
The downstream build process for that collection creates yaml that
appears to be valid, but that fails to lint. I'm not sure exactly which
tool the problem is in, but the easiest solution is to just remove the
single quotes here.

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Abhijeet Kasurde <None>
2022-04-28 14:14:29 +00:00
Joshua Eason
5662fa777c Adding previous container log support (#436)
Adding previous container log support

Signed-off-by: Joshua Eason josh.eason@anchore.com
SUMMARY
Adds support for the previous parameter in kubectl logs. This allows for the retrieval of the previously terminated containers logs which is useful for troubleshooting.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
k8s_log
ADDITIONAL INFORMATION
Adds the previous parameter (bool) to k8s_log module. This matches the documentation for kubectl logs --previous parameter. This parameter allows for retrieving the previously terminated containers logs.
Output of the module is identical with the exception being the logs returned are from the previously terminated container.

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Joshua Eason <None>
2022-04-26 15:31:44 +00:00
Wissem BEN CHAABANE
4fa1fb966b Add helm dependency update (#208)
Add helm dependency update

SUMMARY

Execute the helm dependency update under the hood when found dependencies block in Chart.yaml file.
Support the execution of:

Standalone dependency update by executing: helm dependency update CHART
Inline dependency update when specifying the helm chart_repo_url by adding --dependency-update to the helm install command.


ISSUE TYPE


Feature Pull Request #191

COMPONENT NAME

helm, helm_template
ADDITIONAL INFORMATION





There is a doc generated for history_max option for the helm module. I think that is not generated in the previous PR #164.


There is others changes affect the docs/ folder when I run the collection_prep_add_docs -p .  command. These changes are added in the last commit  64eab40. I let you decide rather we keep the commit or remove it.


The --dependency-update insertion option is tested used a local helm chart repository create via docker. So here are the tasks that test this feature.  Maybe if we create a GitHub repository for the helm chart, we can add this test code in the CI pipeline.


# Test The update dependency with chart_repo_url
- name: "Test chart without dependencies block and chart_repo_url defined"
  block:
    - name: "Test chart without dependencies block and chart_repo_url defined"
      helm:
        binary_path: "{{ helm_binary }}"
        name: test
        chart_ref: "ingress-nginx"
        chart_repo_url: https://kubernetes.github.io/ingress-nginx
        chart_version: "{{ chart_source_version | default(omit) }}"
        namespace: "{{ helm_namespace }}"
        create_namespace: yes
      register: release

    - assert:
        that:
          - "'--dependency-update' not in release.command"
          - "'upgrade' in release.command"
        success_msg: "Command does not contains '--dependency-update' options"
        fail_msg: "Command contains '--dependency-update' options"

- name: "Test chart with dependencies block and chart_repo_url defined and replace True"
  block:
    - name: "Test chart with dependencies block and chart_repo_url defined and replace True"
      helm:
        binary_path: "{{ helm_binary }}"
        name: test1
        chart_ref: "dep_up"
        chart_repo_url: http://repo:8080/charts
        chart_version: "{{ chart_source_version | default(omit) }}"
        namespace: "{{ helm_namespace }}"
        create_namespace: yes
        replace: true
      register: release
    - debug: var=release
    - assert:
        that:
          - "'--dependency-update' in release.command"
          - "'install' in release.command"
        success_msg: "Command contains '--dependency-update' options with helm install command"
        fail_msg: "Command not contains '--dependency-update' with helm install command"

- name: "Test chart with dependencies block and chart_repo_url defined and replace False fails"
  block:
    - name: "Test chart with dependencies block and chart_repo_url defined and replace False fails"
      helm:
        binary_path: "{{ helm_binary }}"
        name: test2
        chart_ref: "dep_up"
        chart_repo_url: http://repo:8080/charts
        chart_version: "{{ chart_source_version | default(omit) }}"
        namespace: "{{ helm_namespace }}"
        create_namespace: yes
        replace: false
      register: release
      ignore_errors: true

    - assert:
        that:
          - release.failed
          - release.msg == "'--dependency-update' hasn't been supported yet with 'helm upgrade'. Please use 'helm install' instead by adding 'replace' option"
        success_msg: "Command build fail when adding  '--dependency-update' with the helm upgrade command"

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Wissem BEN CHAABANE <benchaaben.wissem@gmail.com>
Reviewed-by: Bikouo Aubin <None>
2022-04-26 11:54:37 +00:00
Bikouo Aubin
f2f4b66d77 k8s - fix issue when try to delete resources using label_selectors option (#434)
k8s - fix issue when try to delete resources using label_selectors

SUMMARY

The kubernetes dynamic client has label_selector parameter for the delete method, however based on the documentation of REST API we cannot delete resources using labelSelector option, this fix update the way the resources are deleted. The list of resources are deleted one after another like in the kubectl go client.
Fixes #428

ISSUE TYPE


Bugfix Pull Request

Reviewed-by: Abhijeet Kasurde <None>
2022-04-25 13:37:20 +00:00
Mandar Kulkarni
67c808d934 Update bindep.txt for adding rhel-9 (#438)
Update bindep.txt for adding rhel-9

SUMMARY

Add RHEL9 build for openshift-clients RPM.

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

bindep.txt

Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-04-22 12:38:44 +00:00
Bikouo Aubin
882e672bc5 Remove omit from template resource (#432)
Remove ``omit`` value from template args

SUMMARY

While defining resource using template parameter, the code does not remove the omit value if any.
This fix adds a post process to remove any omit value from the resource definition.
fixes #431

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

k8s*

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Abhijeet Kasurde <None>
2022-04-14 06:15:12 +00:00
abikouo
1d05cf54f0 k8s_cp - fix issue when using local_path (#422)
k8s_cp - fix issue when using local_path

SUMMARY

When copying from local path to pod, the file is found on the controller node instead of the managed node.
This PR aims to resolve this issue.
Fixes #421

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

k8s_cp

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-04-04 08:10:50 +00:00
Abhijeet Kasurde
764e4499b5 k8s_json_patch: Minor typo fix in Example section (#425)
k8s_json_patch: Minor typo fix in Example section

SUMMARY
Fixes: #411
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
changelogs/fragments/411_k8s_json_patch.yml
plugins/modules/k8s_json_patch.py

Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-04-01 00:59:55 +00:00
Mohammed Naser
2c96b70702 Added support for Helm post-renderer (#403)
Added support for Helm post-renderer

SUMMARY

Add support for Helm post renderer
Fixes: #30

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

helm
ADDITIONAL INFORMATION

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Mohammed Naser <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-03-31 18:55:45 +00:00
Abhijeet Kasurde
c475117bee Copy ignore-2.13.txt to ignore-2.14.txt (#427)
Copy ignore-2.13.txt to ignore-2.14.txt

SUMMARY
Address CI tests for 2.14.0.dev0
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
changelogs/fragments/ignore_2.14.yml
tests/sanity/ignore-2.14.txt
2022-03-31 09:10:01 +00:00
Abhijeet Kasurde
d311ac718e helm_repository: Silence false no_log warning (#423)
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>
2022-03-30 17:09:16 +00:00
Mike Graves
7c71436f3b Upgrade black version (#424)
Upgrade black version

SUMMARY

Move off of beta version of black and pin to current calendar year
version.
The only manual changes here are to tox.ini. Everything else is from running the new version of black.

ISSUE TYPE

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Abhijeet Kasurde <None>
2022-03-30 15:02:46 +00:00
Abhijeet Kasurde
0299aa8807 k8s_exec: Update deprecation warning (#419)
k8s_exec: Update deprecation warning

SUMMARY
return_code is deprecated in favor of rc, update the
deprecation warning to tell user about the reason behind
this.
Fixes: #417
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
changelogs/fragments/417_deprecation.yml
plugins/modules/k8s_exec.py

Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-03-23 14:14:37 +00:00
abikouo
f418353e44 continue waiting when an exception is raised (#408)
Continue waiting when an exception is raised

SUMMARY
When an exception is raised and the wait_timeout is not reached, we should continue waiting as this may occurs due to temporary issue on cluster

Fixes #407

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Abhijeet Kasurde <None>
2022-03-23 14:12:26 +00:00
abikouo
074f0a6555 fix issue when using k8s_drain with disable_eviction set to yes (#418)
fix issue when using k8s_drain with disable_eviction set to yes

SUMMARY

fixes #416

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

k8s_drain
ADDITIONAL INFORMATION

Reviewed-by: Abhijeet Kasurde <None>
2022-03-23 09:26:06 +00:00
Mike Graves
d68dec3b90 Fix waiting on StatefulSet scale down (#391)
Fix waiting on StatefulSet scale down

SUMMARY

When scaling a StatefulSet down to 0 replicas the wait will fail
because some properties of the status (readyReplicas, updatedReplicas)
will not exist. These are probably defined as omitempty in the API and
since the value is zero are not present in the response.

Fixes #203
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

k8s_scale
ADDITIONAL INFORMATION

Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
2022-03-11 17:32:12 +00:00
Mike Graves
30e84faa24 Fix validation errors in plugin documentation (#399)
Fix validation errors in plugin documentation

Depends-On: ansible/ansible-zuul-jobs#1385
SUMMARY

This fixes validation errors in plugin documentation now that ansible
test for 2.13 is running validate-modules on all plugins. The kubectl
connection plugin validation is ignored because there seems to be a
requirement for the author field to have a github username, which we do
not have.

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

plugins/connection/kubectl
plugins/inventory/k8s
plugins/lookup/k8s
plugins/lookup/kustomize
ADDITIONAL INFORMATION

Reviewed-by: None <None>
2022-03-11 14:37:01 +00:00
abikouo
fd61f8b15d Move integration test suite from molecule to ansible-test (#392)
Move integration test suite from molecule to ansible-test

SUMMARY

molecule has been replaced with ansible-test
some test cases have been updated

k8s_apply : remove duplicated tasks increasing the running time of the test
helm: use different namespaces for different test cases in order to wait for the namespace deletion before moving to the next test.
all: remove wait: yes at the end of each test when deleting namespace, the role used to create namespace will ensure that it is deleted before if existing.


ISSUE TYPE


Feature Pull Request

COMPONENT NAME

integration testing

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
Reviewed-by: None <None>
2022-03-11 08:03:00 +00:00
Major Hayden
db78d3a505 Docs: Small fix for k8s example (#397)
Docs: Small fix for k8s example

SUMMARY
Update the k8s example to use kubernetes.core.k8s instead of the bare k8s and fix the indentation.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
kubernetes.core
ADDITIONAL INFORMATION
Just a small documentation fix. 😉

Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-03-08 16:06:10 +00:00
Christian von Stebut
73499d9a09 helm_template: add optional show_only and release_namespace arguments (#388)
helm_template: add optional show_only and release_namespace arguments

SUMMARY

This PR adds the "show_only" and "release_namespace" as optional arguments to the helm_template module.
It does some work towards #313.

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

changelogs/fragments/313-helm-template-add-support-for-show-only-and-release-namespace.yml
plugins/modules/helm_template.py
tests/unit/modules/test_helm_template.py
ADDITIONAL INFORMATION


The PR does include unit tests instead of integration test.
Reasoning:
The existing integration tests already include a task based on helm_template. So we know that the module does a proper job of using the command line generated inside the module to call helm.
As I trust helm itself to "do its job" correctly, all that should be necessary is to test the correct generation of the command line itself. The included unit tests hopefully do a proper job.
With regards of the pretty long testing times for the module, I really prefer unit tests, if at all possible.
Please let me know if this fits.

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-03-01 18:57:17 +00:00
abikouo
7031829897 helm - add support for repo location when running helm diff (#389)
helm - add support for repo location when running helm diff

SUMMARY

closes #174

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

helm

Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
Reviewed-by: Mike Graves <mgraves@redhat.com>
2022-02-22 15:52:08 +00:00
abikouo
44c8cff78b k8s_cp turbo mode compliance (#254)
k8s_cp turbo mode compliance

SUMMARY

closes #237

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
2022-02-22 12:01:19 +00:00