extra_settings in awx-operator

328 views
Skip to first unread message

kde...@redhat.com

unread,
Nov 29, 2021, 5:59:07 PM11/29/21
to AWX Project
tl;dr

I'm trying to use the `extra_settings` parameter in the awx-operator (https://github.com/ansible/awx-operator#extra-settings) but I'm having trouble getting it to lay down a settings whose value should be a string when it gets to `/etc/tower/settings.py`

Has anyone else had success forcing `extra_settings` values to be strings or is this a general bug in the operator?

Full story:

I'm testing adding a new setting to awx, but I imagine this would happen with any setting -- awx PR is https://github.com/ansible/awx/pull/11395/files 

So in my CR to create awx added the following:

extra_settings: - setting: DEFAULT_EXECUTION_QUEUE_POD_SPEC_OVERRIDE value: "MY_PRETTY_YAML_PODSPEC_OVERRIDE"
but then when I look at `/etc/tower/settings.py` inside the container, looks to me like this would not parse (because its supposed to be a python file, and the value is not in quotes)

$ cat settings.py | grep POD_SPEC

DEFAULT_EXECUTION_QUEUE_POD_SPEC_OVERRIDE = MY_PRETTY_YAML_PODSPEC_OVERRIDE

I want the value "MY_PRETTY_YAML_PODSPEC_OVERRIDE" to be a string by the time it lands in /etc/tower/settings.py

Alan Rominger

unread,
Nov 30, 2021, 4:02:10 PM11/30/21
to kde...@redhat.com, AWX Project
Could you escape the values in YAML?
Testing with python YAML suggests that:

value: "'MY_PRETTY_YAML_PODSPEC_OVERRIDE'"

should work.

Looking at the operator, I do see how this doesn't do anything for you when it comes to strings:


to better help out, I guess we would have to have some type designator.

Alan
github: AlanCoding


--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/108c932a-f67a-4e2d-b53a-605ba001a1aan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages