Commit 0f8f5920 authored by 舒成's avatar 舒成

v2.1.1 fix up

parent 79aa2a83
{{- if not .Capabilities.APIVersions.Has "bcc.bd-apaas.com/v1alpha1/IngressRoute" -}}
{{- if .Capabilities.APIVersions.Has "bcc.bd-apaas.com/v1alpha1/IngressRoute" -}}
{{- else }}
{{- if eq .Values.expose.type "ingress" }}
{{- $ingress := .Values.expose.ingress -}}
{{- $tls := .Values.expose.tls -}}
......
{{- $_ := set . "portal_path" "/" -}}
{{- $_ := set . "api_path" "/api/" -}}
{{- $_ := set . "service_path" "/service/" -}}
{{- $_ := set . "v2_path" "/v2/" -}}
{{- $_ := set . "chartrepo_path" "/chartrepo/" -}}
{{- $_ := set . "controller_path" "/c/" -}}
{{- $_ := set . "notary_path" "/" -}}
{{- if .Capabilities.APIVersions.Has "bcc.bd-apaas.com/v1alpha1/IngressRoute" -}}
---
apiVersion: bcc.bd-apaas.com/v1alpha1
......@@ -17,42 +9,42 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{ include "harbor.labels" . | indent 4 }}
{{ include "harbor.labels" . | nindent 4 }}
spec:
entryPoints:
- websecure
routes:
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .portal_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/`)
kind: Rule
services:
- name: {{ template "harbor.portal" . }}
port: {{ template "harbor.portal.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .api_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/api/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .service_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/service/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .v2_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/v2/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .chartrepo_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/chartrepo/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .controller_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/c/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.notary }}`) && PathPrefix(`{{ .notary_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.notary }}`) && PathPrefix(`/`)
kind: Rule
services:
- name: {{ template "harbor.notary-server" . }}
......@@ -65,46 +57,46 @@ kind: IngressRoute
metadata:
name: "{{ template "harbor.ingress" . }}-http"
annotations:
{{- with .Values.ingress.annotations }}
{{- with .Values.expose.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{ include "harbor.labels" . | indent 4 }}
{{ include "harbor.labels" . | nindent 4 }}
spec:
entryPoints:
- web
routes:
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .portal_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/`)
kind: Rule
services:
- name: {{ template "harbor.portal" . }}
port: {{ template "harbor.portal.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .api_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/api/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .service_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/service/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .v2_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/v2/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .chartrepo_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/chartrepo/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`{{ .controller_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.core }}`) && PathPrefix(`/c/`)
kind: Rule
services:
- name: {{ template "harbor.core" . }}
port: {{ template "harbor.core.servicePort" . }}
- match: Host(`{{ .Values.expose.ingress.hosts.notary }}`) && PathPrefix(`{{ .notary_path }}`)
- match: Host(`{{ .Values.expose.ingress.hosts.notary }}`) && PathPrefix(`/`)
kind: Rule
services:
- name: {{ template "harbor.notary-server" . }}
......
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