Remove the rewrite ingress rule

This commit removes the rewrite ingrss rule in Harbor chart and redirect the requests sent to registry to UI direclty
This commit is contained in:
Wenkai Yin 2018-07-31 16:48:34 +08:00
parent 3c0bd20d7e
commit 9f34bd5b17

View File

@ -2,7 +2,7 @@
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
name: "{{ template "harbor.fullname" . }}-ingress-ui-notary" name: "{{ template "harbor.fullname" . }}-ingress"
labels: labels:
{{ include "harbor.labels" . | indent 4 }} {{ include "harbor.labels" . | indent 4 }}
annotations: annotations:
@ -34,35 +34,4 @@ spec:
backend: backend:
serviceName: {{ template "harbor.notaryServiceName" . }} serviceName: {{ template "harbor.notaryServiceName" . }}
servicePort: 4443 servicePort: 4443
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "{{ template "harbor.fullname" . }}-ingress-registry"
labels:
{{ include "harbor.labels" . | indent 4 }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
nginx.ingress.kubernetes.io/rewrite-target: /registryproxy/v2
ingress.kubernetes.io/rewrite-target: /registryproxy/v2
spec:
{{ if eq .Values.externalProtocol "https" }}
tls:
- hosts:
- "{{ .Values.externalDomain }}"
{{ if eq .Values.ingress.tls.secretName "" }}
secretName: "{{ template "harbor.fullname" . }}-ingress"
{{ else }}
secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
{{ end }}
rules:
- host: "{{ .Values.externalDomain }}"
http:
paths:
- path: /v2
backend:
serviceName: {{ template "harbor.fullname" . }}-ui
servicePort: 80
{{ end }} {{ end }}