[stable/docker-registry] Use static container/daemon port (#10114)

* Use static container/daemon port

This commit ensures the container/daemon port is constant (5000),
while the service port is configurable with the service.port value.

Fixes #10113

Signed-off-by: bzub <bzubrod@gmail.com>

* bump version

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
This commit is contained in:
bzub
2018-12-20 14:58:17 -08:00
committed by Kubernetes Prow Robot
parent 592b164e6d
commit 2a25bedf36
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for Docker Registry
name: docker-registry
version: 1.6.2
version: 1.6.3
appVersion: 2.6.2
home: https://hub.docker.com/_/registry/
icon: https://hub.docker.com/public/images/logos/mini-logo.svg
+1 -1
View File
@@ -15,5 +15,5 @@
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "docker-registry.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.port }}
kubectl port-forward $POD_NAME 8080:5000
{{- end }}
@@ -46,21 +46,21 @@ spec:
- serve
- /etc/docker/registry/config.yml
ports:
- containerPort: {{ .Values.service.port }}
- containerPort: 5000
livenessProbe:
httpGet:
{{- if .Values.tlsSecretName }}
scheme: HTTPS
{{- end }}
path: /
port: {{ .Values.service.port }}
port: 5000
readinessProbe:
httpGet:
{{- if .Values.tlsSecretName }}
scheme: HTTPS
{{- end }}
path: /
port: {{ .Values.service.port }}
port: 5000
resources:
{{ toYaml .Values.resources | indent 12 }}
env:
@@ -20,7 +20,7 @@ spec:
- port: {{ .Values.service.port }}
protocol: TCP
name: {{ .Values.service.name }}
targetPort: {{ .Values.service.port }}
targetPort: 5000
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}