{{- if and (eq .Values.registry.external false) (and (eq .Values.ui.proxy false) .Values.registry.ingress.enabled) -}} {{- $fullName := include "docker-registry.fullname" . -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} labels: {{ include "docker-registry.labels" . | indent 4 }} {{- with .Values.registry.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if .Values.registry.ingress.tls }} tls: {{- range .Values.registry.ingress.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range .Values.registry.ingress.hosts }} - host: {{ .host | quote }} http: paths: - path: / backend: serviceName: {{ $fullName }} servicePort: registry {{- end }} {{- end -}}