Merge pull request #5177 from ywk253100/180622_ingress_rule

Update ingress rule for Harbor chart
This commit is contained in:
Wenkai Yin 2018-06-26 10:29:08 +08:00 committed by GitHub
commit e51d6cc707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
name: "{{ template "harbor.fullname" . }}-ingress" name: "{{ template "harbor.fullname" . }}-ingress-ui-notary"
labels: labels:
{{ include "harbor.labels" . | indent 4 }} {{ include "harbor.labels" . | indent 4 }}
annotations: annotations:
@ -22,10 +22,6 @@ spec:
backend: backend:
serviceName: {{ template "harbor.fullname" . }}-ui serviceName: {{ template "harbor.fullname" . }}-ui
servicePort: 80 servicePort: 80
- path: /v2
backend:
serviceName: {{ template "harbor.fullname" . }}-registry
servicePort: 5000
- host: "{{ template "harbor.notaryFQDN" . }}" - host: "{{ template "harbor.notaryFQDN" . }}"
http: http:
paths: paths:
@ -33,3 +29,30 @@ 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
spec:
{{ if not .Values.insecureRegistry }}
tls:
- hosts:
- "{{ .Values.externalDomain }}"
secretName: "{{ template "harbor.fullname" . }}-ingress"
{{ end }}
rules:
- host: "{{ .Values.externalDomain }}"
http:
paths:
- path: /v2
backend:
serviceName: {{ template "harbor.fullname" . }}-ui
servicePort: 80