Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #800/aee84743 backport][stable-5] helm_registry_auth module to authenticate in OCI registry #836

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Dec 17, 2024

This is a backport of PR #800 as merged into main (aee8474).

SUMMARY

The new module helm_registry_auth module support login and logout to OCI registry (helm registry login and helm registry logout command)

It's addressed issue #578

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

helm_registry_auth

ADDITIONAL INFORMATION

Similar was started as #601 but it wasn't completed for a while. Module in this PR is already used in my lab environment.

PR include a changelog, documentation and integration tests.

* new module helm_registry_auth

* Initial integration tests

* final update copyright and integration test before pr

* update link to pr in changelog fragment

* reformat plugins/module_utils/helm.py with black

to fix linters in actions

* attempt to fix unit test

unit test was missing initially

* fix https://pycqa.github.io/isort/ linter

* next attemp to fix unit-test

* remove unused and unsupported helm_args_common

* remove unused imports and fix other linters errors

* another fix for unit test

* fix issue introducied by commit ff02893

* add binary_path to arg_spec

* return helm_cmd in the output of check mode

remove changlog fragment

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* remove changed from module return

Co-authored-by: Bikouo Aubin <[email protected]>

* remove redundant code

Co-authored-by: Bikouo Aubin <[email protected]>

* Update plugins/modules/helm_registry_auth.py

Co-authored-by: Bikouo Aubin <[email protected]>

* consider support of logout when user is not logged in

Co-authored-by: Bikouo Aubin <[email protected]>

* consider support helm < 3.0.0

* Revert "consider support helm < 3.0.0"

This reverts commit f20004d.

* reintroduce support of helm version less than 3.8.0

reference: https://helm.sh/docs/topics/registries/#enabling-oci-support-prior-to-v380

* revert reintroducing support of helm < 3.8.0

reason: didn't find a quick way to deal with tests

* update documentation with the recent module updates

* Update plugins/modules/helm_registry_auth.py

Co-authored-by: Bikouo Aubin <[email protected]>

* add test of logout impendency

Co-authored-by: Bikouo Aubin <[email protected]>

* fix linters

* fix intendations in the integration tests

* create tests/integration/targets/helm_registry_auth/aliases

* fix integration test (typo)

* fix integration tests (test wrong cred)

* add stderr when module fail

* another attempt to fix integration test

* fix assertion in integration test to be not affceted by the #830

---------

Co-authored-by: Bikouo Aubin <[email protected]>
(cherry picked from commit aee8474)
Copy link

@abikouo abikouo added skip-changelog test-all-the-targets In order to tell to the integration test splitter to test all targets labels Dec 17, 2024
@yurnov
Copy link
Contributor

yurnov commented Dec 17, 2024

Hi @abikouo,

could you please just re-run the CI test (probably by pushing an empty commit).

The test failed due to network issue:

Run python3 -m pip install https://github.com/ansible/ansible/archive/stable-2.16.tar.gz --disable-pip-version-check
Collecting https://github.com/ansible/ansible/archive/stable-2.16.tar.gz
  ERROR: HTTP error 504 while getting https://github.com/ansible/ansible/archive/stable-2.16.tar.gz
ERROR: Could not install requirement https://github.com/ansible/ansible/archive/stable-2.16.tar.gz because of HTTP error 504 Server Error: Gateway Time-out for url: https://github.com/ansible/ansible/archive/stable-2.16.tar.gz for URL https://github.com/ansible/ansible/archive/stable-2.16.tar.gz
Error: Process completed with exit code 1.

I think that next attempt should be fine, just need to run it once again

@abikouo abikouo merged commit 05a942e into stable-5 Dec 17, 2024
61 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog test-all-the-targets In order to tell to the integration test splitter to test all targets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants