From 2133e634a7d156655c4bcdea441dd1a86098b750 Mon Sep 17 00:00:00 2001 From: gaoshiyao Date: Wed, 31 May 2023 19:24:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/ingress/ingresshost.yaml | 2 +- templates/ingress/ingressroute.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/templates/ingress/ingresshost.yaml b/templates/ingress/ingresshost.yaml index 5cae398..606f67e 100644 --- a/templates/ingress/ingresshost.yaml +++ b/templates/ingress/ingresshost.yaml @@ -11,6 +11,6 @@ metadata: labels: {{ include "harbor.labels" . | nindent 4 }} spec: - host: "{{ $.Values.global.host }}" + host: "{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}" {{- end -}} diff --git a/templates/ingress/ingressroute.yaml b/templates/ingress/ingressroute.yaml index d689ace..899be9d 100644 --- a/templates/ingress/ingressroute.yaml +++ b/templates/ingress/ingressroute.yaml @@ -14,34 +14,34 @@ spec: entryPoints: - websecure routes: - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/`) kind: Rule services: - name: {{ template "harbor.portal" . }} port: {{ template "harbor.portal.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/api/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/api/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/service/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/service/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.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.global.host }}`) && PathPrefix(`/chartrepo/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/c/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/c/`) kind: Rule services: - name: {{ template "harbor.core" . }} @@ -62,32 +62,32 @@ spec: entryPoints: - web routes: - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/`) kind: Rule services: - name: {{ template "harbor.portal" . }} port: {{ template "harbor.portal.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/api/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/api/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/service/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/service/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/c/`) + - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/c/`) kind: Rule services: - name: {{ template "harbor.core" . }} -- 2.26.0