charts icon indicating copy to clipboard operation
charts copied to clipboard

[bitnami/harbor] Wrong host string with sentinel enabled

Open lwj5 opened this issue 3 years ago • 3 comments

Name and Version

bitnami/harbor 15.0.0

What steps will reproduce the bug?

  1. enabled external Redis sentinel
  2. See Redis host reported in the following configmap as redis.redis:26379/mymaster:6379

Files affected:

  • chartmuseum-cm-envvars.yaml
  • registry-cm.yaml

Are you using any custom parameters or values?

externalRedis:
  host: redis.redis
  password: <trunc>
  sentinel:
    enabled: true
    hosts: redis.redis:26379
    masterSet: mymaster

What is the expected behavior?

If service supports sentinel, use Redis host in configmap as redis.redis:26379/mymaster

Since these services do not chartmuseum https://github.com/helm/chartmuseum/issues/179 resigtry https://github.com/distribution/distribution/issues/2885

We should use Redis host in configmap as redis.redis:6379

What do you see instead?

Cannot connect to Redis

Additional information

lwj5 avatar Jul 26 '22 09:07 lwj5

Try to use

externalRedis:
  host: ""

in your values.yaml. Check also https://github.com/bitnami/charts/issues/11266 and https://github.com/bitnami/charts/issues/11354.

RichardSufliarsky avatar Jul 26 '22 12:07 RichardSufliarsky

@RichardSufliarsky do you mean port: ""? it wouldn't work

if you look at the configmaps {{ printf "%s:%s" ( include "harbor.redis.host" . ) ( include "harbor.redis.port" . ) | quote }} The 2nd colon will always be there anyways.

Unfortunately, I do not have time to fix this chart, so I just edited the values of the affected config maps

lwj5 avatar Jul 26 '22 13:07 lwj5

@RichardSufliarsky do you mean port: ""? it wouldn't work

if you look at the configmaps {{ printf "%s:%s" ( include "harbor.redis.host" . ) ( include "harbor.redis.port" . ) | quote }} The 2nd colon will always be there anyways.

Unfortunately, I do not have time to fix this chart, so I just edited the values of the affected config maps

No, I mean host: "" in externalRedis, but you are right, it won't help. I looked at goharbor's helm chart and there seems to be different config for Sentinel: https://github.com/goharbor/harbor-helm/blob/9c62943736458b63cb8d8f1bd347e8cdfb34a1f9/templates/registry/registry-cm.yaml#L173 And they handle addr correctly: https://github.com/goharbor/harbor-helm/blob/9c62943736458b63cb8d8f1bd347e8cdfb34a1f9/templates/_helpers.tpl#L155

RichardSufliarsky avatar Jul 26 '22 16:07 RichardSufliarsky

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

bitnami-bot avatar Aug 26 '22 01:08 bitnami-bot

not stale

lwj5 avatar Aug 26 '22 06:08 lwj5

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

bitnami-bot avatar Sep 11 '22 01:09 bitnami-bot

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

bitnami-bot avatar Oct 08 '22 01:10 bitnami-bot

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Oct 13 '22 01:10 github-actions[bot]