Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling haproxy with redis-ha results in broken deployment yaml #3052

Open
randori-jgross opened this issue Nov 26, 2024 · 0 comments
Open
Labels
argo-cd bug Something isn't working

Comments

@randori-jgross
Copy link

randori-jgross commented Nov 26, 2024

Describe the bug

If redis-ha is deployed with haproxy disabled, the helper for the redis sentinel secrets will be blank.

Given these values:

redis-ha:
  enabled: true
  haproxy:
    enabled: false

This helper:

https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/templates/_helpers.tpl#L57-L60

Will print nothing, leaving deployments with blank secret names:

https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/templates/argocd-repo-server/deployment.yaml#L197

cannot patch "argo-argocd-repo-server" with kind Deployment:
Deployment.apps "argo-argocd-repo-server" is invalid:
[spec.template.spec.containers[0].env[17].valueFrom.secretKeyRef.name: Invalid value: ""  
[spec.template.spec.containers[0].env[18].valueFrom.secretKeyRef.name: Invalid value: ""

cannot patch "argo-argocd-server" with kind Deployment:
Deployment.apps "argo-argocd-server" is invalid: 
[spec.template.spec.containers[0].env[30].valueFrom.secretKeyRef.name: Invalid value: ""
[spec.template.spec.containers[0].env[31].valueFrom.secretKeyRef.name: Invalid value: ""

Is deploying redis-ha without haproxy supported?

Related helm chart

argo-cd

Helm chart version

7.7.5

To Reproduce

Set the above values.yaml and template the helm chart:

helm template -f values.yaml argo/argo-cd | grep REDIS_SENTINEL -A5

With this output:

          - name: REDIS_SENTINEL_USERNAME
            valueFrom:
              secretKeyRef:
                name:
                key: redis-sentinel-username
                optional: true
          - name: REDIS_SENTINEL_PASSWORD
            valueFrom:
              secretKeyRef:
                name:
                key: redis-sentinel-password
                optional: true

Expected behavior

Have a check in the helpers that prohibits this configuration, or if the configuration is valid, then have an {{- else -}} statement that will print the correct values for redis-ha without haproxy.

@randori-jgross randori-jgross added the bug Something isn't working label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argo-cd bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants