Closed deler-aziz closed 1 year ago
Hi @deler-aziz , nice addition, but I think you should add some configuration in the registry config too as well based on this: https://docs.docker.com/registry/configuration/#auth
cmiiw 👍 👍
The easiest solution is to override with environment variable, like so:
REGISTRY_AUTH_HTPASSWD_REALM: basic-realm
REGISTRY_AUTH_HTPASSWD_PATH: /host/path (Maybe we can substitute with the helm values as well)
Or, just make some clear description about how to enable the htpasswd authentication by passing additional extra environments or make it static inside the
registry-deployment.yaml
file.
Wdyt?
Hi @deler-aziz , nice addition, but I think you should add some configuration in the registry config too as well based on this: https://docs.docker.com/registry/configuration/#auth
cmiiw 👍 👍
The easiest solution is to override with environment variable, like so:
REGISTRY_AUTH_HTPASSWD_REALM: basic-realm REGISTRY_AUTH_HTPASSWD_PATH: /host/path (Maybe we can substitute with the helm values as well)
Or, just make some clear description about how to enable the htpasswd authentication by passing additional extra environments or make it static inside the
registry-deployment.yaml
file.Wdyt?
Hi @nurimansyah89 I agree, sounds like a good suggestion. I will push a new commit 👍
Hi there, thank you for using my project and your contribution 😄
Can I have your feedback on the current configuration. Since you are adding basic auth, maybe one day someone will add token auth too. In that case, in your opinion, what's the best configuration ?
registry.basicAuth.*
andregistry.tokenAuth.*
? orregistry.auth.basic.*
andregistry.auth.token.*
?
Sorry for slow response, being hectic on office 😬
I think we should do a better structure, like:
...
registry:
auth:
basic:
... # All the basic auth related
custom:
... # Any custom auth
...
This just my opinion for better readability for using the values. The trade off this structure was it has a multilevel nesting.
Wdyt @Joxit ?
Hi @Joxit and @nurimansyah89
Sorry for the slow response. You have left good feedback thank you for that. This is the new auth structure:
...
registry:
auth:
basic:
enabled: false
realm: Docker registry
htpasswdPath: /etc/docker/registry/auth/htpasswd
secretName: ''
...
Also, I have done some more changes, please check it and if you have any more feedback I will be glad to get it.
Hi @Joxit and @nurimansyah89
Sorry for the slow response. You have left good feedback thank you for that. This is the new auth structure:
... registry: auth: basic: enabled: false realm: Docker registry htpasswdPath: /etc/docker/registry/auth/htpasswd secretName: '' ...
Also, I have done some more changes, please check it and if you have any more feedback I will be glad to get it.
Looks good to me. 👍
Just wait for @Joxit to review them and get merged. Nice work @deler-aziz 👍
Hi there, thank the both of you for your contribution and insights :smile:
Use a secret volume mount for htpasswd (basicAuth)