Closed Bregor closed 7 years ago
Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it.
BTW, maybe only the use_cni
variable makes sense?
I mean:
env:
...
- name: BIND_ADDR
{{- if (.Values.global.registry_use_cni)}}
value: "127.0.0.1:5555"
{{- else }}
value: "80"
{{- end }}
@mboersma what do you think which way is preferrable:
use_cni: <bool>
and registry_proxy_bind_addr: <string>
use_cni: <bool>
which will setup bind address automagically?@Bregor I think we might need the flexibility of allowing registry_proxy_bind_addr
to be set separately. It's tempting to make the defaults be 127.0.0.1:5555 and 80, but I can imagine where someone might have things configured differently. Maybe this?
{{- if (.Values.global.registry_use_cni)}}
value: {{ default "127.0.0.1:5555" .Values.global.registry_proxy_bind_addr }}
{{- else }}
value: {{ default "80" .Values.global.registry_proxy_bind_addr }}
{{- end }}
Jenkins, test this please.
Artifacts that can be used for testing:
quay.io/deisci/registry-proxy:git-4cc19e2
--version v1.1.2-20170502212804-sha.4cc19e2
from https://charts.deis.com/registry-proxy-pr
--version v2.13.1-20170502213112-sha.80618ff
from https://charts.deis.com/workflow-pr
@mboersma thanks, rewrote with your proposal, rebased, squashed and pushed
Jenkins, OK to test
I did the negative test on minikube
to ensure nothing is broken in the non-CNI case. Looks good!
Thank you for the great addition, @Bregor !
Great! @vdice thanks for support and patience :)
Variables added:
global.use_cni
- Boolean, disabled by defaultglobal.registry_proxy_bind_addr
- String, default80
Proofing image:
quay.io/evilmartians/deis-registry-proxy:cni
Steps to setup:
PR for https://github.com/deis/workflow is on a way.