File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 heritage : deis
2020 app : deis-registry-proxy
2121 spec :
22+ {{- if (.Values.global.use_cni) }}
23+ hostNetwork : true
24+ {{- end}}
2225 containers :
2326 - name : deis-registry-proxy
2427 image : quay.io/{{.Values.org}}/registry-proxy:{{.Values.docker_tag}}
3841 value : $(DEIS_REGISTRY_SERVICE_HOST)
3942 - name : REGISTRY_PORT
4043 value : $(DEIS_REGISTRY_SERVICE_PORT)
44+ - name : BIND_ADDR
45+ {{- if (.Values.global.use_cni) }}
46+ value : {{ default "127.0.0.1:5555" .Values.global.registry_proxy_bind_addr | quote }}
47+ {{- else }}
48+ value : {{ default "80" .Values.global.registry_proxy_bind_addr | quote }}
49+ {{- end }}
50+ {{- if not (.Values.global.use_cni) }}
4151 ports :
4252 - containerPort : 80
4353 hostPort : {{.Values.global.host_port}}
4454{{- end }}
55+ {{- end }}
Original file line number Diff line number Diff line change @@ -15,3 +15,13 @@ global:
1515 registry_location : " on-cluster"
1616 # The host port to which registry proxy binds to
1717 host_port : 5555
18+ # Set the `listen` variable for registry-proxy's NGINX
19+ #
20+ # Valid values are:
21+ # - 80: If you're on flannel or kubenet
22+ # - 127.0.0.1:5555: If you're with CNI
23+ #
24+ # In case of CNI you can not use `hostPort` notation due to https://github.com/kubernetes/kubernetes/issues/23920
25+ # registry_proxy_bind_addr: "80"
26+ # If the Kubernetes cluster uses CNI
27+ # use_cni: true
Original file line number Diff line number Diff line change 33# fail if no hostname is provided
44REGISTRY_HOST=${REGISTRY_HOST:? no host}
55REGISTRY_PORT=${REGISTRY_PORT:- 80}
6+ BIND_ADDR=${BIND_ADDR:- 80}
67
78# we are always listening on port 80
89# https://github.com/nginxinc/docker-nginx/blob/43c112100750cbd1e9f2160324c64988e7920ac9/stable/jessie/Dockerfile#L25
9- PORT=80
1010
1111sed -e " s/%HOST%/$REGISTRY_HOST /g" \
1212 -e " s/%PORT%/$REGISTRY_PORT /g" \
13- -e " s/%BIND_PORT%/$PORT /g" \
13+ -e " s/%BIND_PORT%/$BIND_ADDR /g" \
1414 < /etc/nginx/conf.d/default.conf.in > /etc/nginx/conf.d/default.conf
1515
1616# wait for registry to come online
You can’t perform that action at this time.
0 commit comments