Skip to content

custom_pulp_settings config map requires double quotation #1511

@StopMotionCuber

Description

@StopMotionCuber

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:

  1. Add the following ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
  name: pulp-custom-config
  namespace: pulp-operator
data:
  CONTENT_ORIGIN: "https://repo.home-organization.com/"
  1. Add pulp_custom_config: pulp-custom-config to 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions