feat: implement extra_settings_files#1836
Conversation
|
@rooftopcellist @TheRealHaoLiu |
|
@rooftopcellist @TheRealHaoLiu
Now I've marked this PR as ready for review. I am not sure if the parameter names and dictionary structure are ideally designed, but I think it allows for flexibility of use. Any feedbacks are welcome! Of course feel free to reject this if this is not required for you. Thanks😃 |
12a25b9 to
cb75ae5
Compare
|
if the same setting is set in both extra_settings an in one of the .py files, how does that interaction work? Also, the API blocks changing any setting if that setting is in |
|
@fosterseth
Including any
Note that if two or more
Yes, AFAIK the same logic will be applied for any |
084ea66 to
fa072c4
Compare
|
Conflict resolved and some notes are added that @fosterseth pointed out 😃 |
|
@kurokobo we have reviewed this PR and are ready to merge it, but it looks like there are some conflicts. Could you please rebase? I think that will resolve the CI failure too. |
759c408 to
89013e4
Compare
|
@rooftopcellist |
|
Hmm 🤔
|
|
darn my latest debug artifact gathering for the molecule test does not gather log from init container... >.< |
|
Since it succeeded in #1867, I can't imagine it well, but this PR may be the cause of the CI failure. Before digging into this deeper, could you please try to re-run CI by closing / reopening this PR? |
|
Failed in very early stage 😞 Run ansible-galaxy collection install -r molecule/requirements.yml
Starting galaxy collection install process
Process install dependency map
ERROR! Error when getting collection version metadata for community.general:9.0.0 from default (https://galaxy.ansible.com/api/) (HTTP Code: 530, Message: Code: Unknown)
Error: Process completed with exit code 1. |
|
i rerun it again and it's successful... we been observing flakiness in our CI lately and i been trying to track it down (so far no success...) |
|
@TheRealHaoLiu @rooftopcellist |


SUMMARY
Closes #1834
This PR add a new paramerter
extra_settings_filesfor AWX CR that allows users to add extra settings through python (*.py) files from ConfigMaps or Secrets.This is helpful when users are in following situations that are difficult to solve by existing
extra_settings:extra_settingsis very long and hard to manageextra_settingsextra_settingsas sepalated multiple filesDesign:
*.pyfiles from ConfigMaps or Secrets*.pyfiles under/etc/tower/conf.din following pods/jobs/cronjobs which already havesettngs.pyRestrictions:
,py-,_or.<instance name>-<KEY>-configmap<instance name>-<KEY>-secret-, so any_and.in keys are replacetd with-then the keys are converted to lowercaseISSUE TYPE
ADDITIONAL INFORMATION
Tested by deploying custom Operator:
Example demo ConfigMaps and Secrets:
Since this is just for demonstration purposes, included settings and its value have no meaning.
Example CR:
Results
We can see from the UI that the settings have been changed. This is an excerpt:
To ensure there is no side-effect, I have also confirmed the minimal AWX CR without
extra_settings_filescan be deployed:TODO