Commit 2133e634 authored by gaoshiyao's avatar gaoshiyao

路由

parent 88e459b2
...@@ -11,6 +11,6 @@ metadata: ...@@ -11,6 +11,6 @@ metadata:
labels: labels:
{{ include "harbor.labels" . | nindent 4 }} {{ include "harbor.labels" . | nindent 4 }}
spec: spec:
host: "{{ $.Values.global.host }}" host: "{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}"
{{- end -}} {{- end -}}
...@@ -14,34 +14,34 @@ spec: ...@@ -14,34 +14,34 @@ spec:
entryPoints: entryPoints:
- websecure - websecure
routes: routes:
- match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/`)
kind: Rule kind: Rule
services: services:
- name: {{ template "harbor.portal" . }} - name: {{ template "harbor.portal" . }}
port: {{ template "harbor.portal.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
middlewares: middlewares:
- name: "{{ template "harbor.ingress" . }}-https" - name: "{{ template "harbor.ingress" . }}-https"
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
...@@ -62,32 +62,32 @@ spec: ...@@ -62,32 +62,32 @@ spec:
entryPoints: entryPoints:
- web - web
routes: routes:
- match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) - match: Host(`{{ $.Values.expose.ingress.hosts.core }}.{{ $.Values.global.host }}`) && PathPrefix(`/`)
kind: Rule kind: Rule
services: services:
- name: {{ template "harbor.portal" . }} - name: {{ template "harbor.portal" . }}
port: {{ template "harbor.portal.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }} 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 kind: Rule
services: services:
- name: {{ template "harbor.core" . }} - name: {{ template "harbor.core" . }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment