From 3737395a25f79e3fc51563a48e05687c04d91803 Mon Sep 17 00:00:00 2001 From: shucheng Date: Wed, 25 May 2022 15:09:51 +0800 Subject: [PATCH] update --- templates/NOTES.txt | 2 +- templates/ingress/ingresshost.yaml | 18 +++----------- templates/ingress/ingressroute.yaml | 37 ++++++++++------------------- 3 files changed, 17 insertions(+), 40 deletions(-) diff --git a/templates/NOTES.txt b/templates/NOTES.txt index d32387e..f9b57e2 100644 --- a/templates/NOTES.txt +++ b/templates/NOTES.txt @@ -1,3 +1,3 @@ Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }}.{{ $.Values.global.host }} +Then you should be able to visit the Harbor portal at {{ $.Values.global.host }} For more details, please visit https://github.com/goharbor/harbor diff --git a/templates/ingress/ingresshost.yaml b/templates/ingress/ingresshost.yaml index 3ba76aa..5cae398 100644 --- a/templates/ingress/ingresshost.yaml +++ b/templates/ingress/ingresshost.yaml @@ -3,7 +3,7 @@ apiVersion: bcc.bd-apaas.com/v1alpha1 kind: IngressHost metadata: - name: "{{ template "harbor.ingress" . }}-core" + name: "{{ template "harbor.ingress" . }}" annotations: {{- with .Values.expose.ingress.annotations }} {{- toYaml . | nindent 4 }} @@ -11,18 +11,6 @@ metadata: labels: {{ include "harbor.labels" . | nindent 4 }} spec: - host: "{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}" ---- -apiVersion: bcc.bd-apaas.com/v1alpha1 -kind: IngressHost -metadata: - name: "{{ template "harbor.ingress" . }}-notary" - annotations: - {{- with .Values.expose.ingress.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{ include "harbor.labels" . | nindent 4 }} -spec: - host: "{{ .Values.expose.ingress.hosts.notary }}.{{ $.Values.global.host }}" + host: "{{ $.Values.global.host }}" + {{- end -}} diff --git a/templates/ingress/ingressroute.yaml b/templates/ingress/ingressroute.yaml index 4bc0d14..d689ace 100644 --- a/templates/ingress/ingressroute.yaml +++ b/templates/ingress/ingressroute.yaml @@ -14,45 +14,39 @@ spec: entryPoints: - websecure routes: - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) kind: Rule services: - name: {{ template "harbor.portal" . }} port: {{ template "harbor.portal.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/api/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/api/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/service/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/service/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) kind: Rule middlewares: - name: "{{ template "harbor.ingress" . }}-https" services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/c/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/c/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.notary }}.{{ $.Values.global.host }}`) && PathPrefix(`/`) - kind: Rule - services: - - name: {{ template "harbor.notary-server" . }} - port: 4443 - tls: - certResolver: default + tls: {} --- apiVersion: bcc.bd-apaas.com/v1alpha1 kind: IngressRoute @@ -68,39 +62,34 @@ spec: entryPoints: - web routes: - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) kind: Rule services: - name: {{ template "harbor.portal" . }} port: {{ template "harbor.portal.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/api/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/api/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/service/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/service/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/c/`) + - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/c/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ .Values.expose.ingress.hosts.notary }}.{{ $.Values.global.host }}`) && PathPrefix(`/`) - kind: Rule - services: - - name: {{ template "harbor.notary-server" . }} - port: 4443 {{- end -}} -- 2.26.0