feat: implement extra_settings_files #125
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
This PR implements
extra_settings_files
, which is almost the same as my PR for AWX Operator ansible/awx-operator#1836Required module (
split_settings
) to load additional*.py
files is already installed in galaxy images: https://github.com/ansible/galaxy_ng/blob/c52e9b4e5548ca38946d7cc1bd8624459def1ec1/requirements/requirements.common.txt#L127-L128Design:
*.py
files from ConfigMaps or Secrets*.py
files under/etc/pulp/conf.d
in following pods which already havesettngs.py
Restrictions:
Completely the same as described in ansible/awx-operator#1836
ADDITIONAL INFORMATION
Tested with and without
extra_settings_files
:Without
extra_settings_files
Ensure there is no
/etc/pulp/conf.d
$ kubectl -n galaxy exec -it deployment/galaxy-api -- ls -l /etc/pulp total 4 drwxrwxr-x. 2 galaxy root 6 May 1 13:01 certs drwxrwxr-x. 1 galaxy root 118 May 24 12:53 keys -rw-r--r--. 1 root root 1531 May 24 12:52 settings.py
Even if there is no actual directory and files,
include()
does not cause error sinceoptional()
is used to load files.With
extra_settings_files
Result:
I can confirm that additional settings in
*.py
take effects, e.g. browsing existing collections without logging in to the Galaxy byGALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_ACCESS = True
.