goharbor / harbor-operator

Kubernetes operator for Harbor service components
Apache License 2.0
343 stars 106 forks source link

The redis password has special characters that cannot be resolved by the url, causing the core service to report an error #1054

Closed CoderTH closed 1 year ago

CoderTH commented 1 year ago

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior: A clear and concise description of what you expected to happen and what's the actual behavior. If applicable, add screenshots to help explain your problem.

Steps to reproduce the problem: Please provide the steps to reproduce this problem.

I used the external redis when I created the harbor, and the redis password contains some special strings that urls cannot use, such as @ % : At this time, the core service will panic, the error url is not the correct url, at this time other services are working normally, so I try to run the following code after passing the password again password = url.QueryEscape(password)core service runs normally, The redis password was incorrect. I went into the container and looked at the jobserivce configuration file. I saw that the redis password was the result of two QueryEscape methods, one by me and one by harbor, I guess. I'm not sure if this is a bug, if not, what can I do to get harbor to work when the redis password contains these special characters? Can someone help with that?

I deployed using harbor-operator and saw in this pr https://github.com/goharbor/harbor/pull/18566 that the issue appeared to have been resolved, but I upgraded core service to 2.8.1 alone and still got an error

image image

redis service is normal and can be accessed using password

image

Versions: Please specify the versions of following systems.

Additional context: