mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
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:
parent
3c0bd20d7e
commit
9f34bd5b17
@ -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 }}
|
Loading…
Reference in New Issue
Block a user