custom_pulp_settings config map requires double quotation
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 88
- Forks
- 66
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
Version
Pulp Operator 1.0.1
Describe the bug
When using custom_pulp_settings on the Operator, that requires quoting. Otherwise python processes complain about syntax errors.
To Reproduce
Steps to reproduce the behavior:
- Add the following ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
name: pulp-custom-config
namespace: pulp-operator
data:
CONTENT_ORIGIN: "https://repo.home-organization.com/"
- Add
pulp_custom_config: pulp-custom-configto the Pulp CRD.
Expected behavior
The new content origin is accepted and properly quoted inserted into the secret at settings.py.
Actual behavior
I get a Syntax error, as this is rendered as
CONTENT_ORIGIN = https://repo.home-organization.com/
within the settings.py
Additional context
This can be worked around using double quotation on the yaml file:
apiVersion: v1
kind: ConfigMap
metadata:
name: pulp-custom-config
namespace: pulp-operator
data:
CONTENT_ORIGIN: '"https://repo.home-organization.com/"'
But that wouldn't be something that I would expect. Additionally I'm a bit puzzled why this was not catched in testing, as it looks to me like you would directly stumble upon this issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the shown ConfigMap and the Pulp CRD setting, then trace how the operator renders custom configuration into settings.py. Check the generated settings.py for the unquoted CONTENT_ORIGIN value. Done means a normal YAML URL is accepted without nested quotation and the rendered Python remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, python
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100