pulp-operator icon indicating copy to clipboard operation
pulp-operator copied to clipboard

APIRoot path wrong formatted - has a new line after /pulp/

Open catalinpan opened this issue 7 months ago • 1 comments

Version 1.0.0 and 1.0.1

Describe the bug API enters in crashloop after deployment, pulp config looks like below

is_nginx_ingress: true
web:
    replicas: 0

To Reproduce API Deployment looks like below after is deployed by the operator.

          livenessProbe:
            failureThreshold: 10
            httpGet:
              path: |-
                /pulp/
                api/v3/status/
              port: 24817
              scheme: HTTP
            initialDelaySeconds: 3
            periodSeconds: 20
            successThreshold: 1
            timeoutSeconds: 10
          name: api
          ports:
            - containerPort: 24817
              protocol: TCP
          readinessProbe:
            exec:
              command:
                - /usr/bin/readyz.py
                - |-
                  /pulp/
                  api/v3/status/
            failureThreshold: 1
            initialDelaySeconds: 3
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 10

Ingress path looks like below after is deployed by the operator.

          - backend:
              service:
                name: pulp-api-svc
                port:
                  name: api-24817
            path: |-
              /pulp/
              api/v3/

API pod crashloop error

"GET /pulp/%0Aapi/v3/status/ HTTP/1.1" 404 9370

Expected behavior Path should not have a new line, should look like below.

path:  /pulp/api/v3/

Additional context

catalinpan avatar Apr 30 '25 23:04 catalinpan

Hi @catalinpan,

I could not reproduce this error after configuring Pulp CR with:

is_nginx_ingress: true
web:
    replicas: 0

I suspect that this error happened because a configuration in custom_pulp_settings ConfigMap. The closest I got was with the following configuration:

apiVersion: v1
kind: ConfigMap
metadata:
  name: settings
data:
  api_root: |
    "/pulp/"

even though it defined the probes the same way you provided, this did not result in an Ingress path like yours, the operator failed to update ingress:

invalid location modifier \"/pulp/\" in /tmp/nginx/nginx-cfg621149528:1656

git-hyagi avatar Jul 04 '25 14:07 git-hyagi