{{- if .Capabilities.APIVersions.Has "bcc.bd-apaas.com/v1alpha1" -}} --- apiVersion: bcc.bd-apaas.com/v1alpha1 kind: IngressRoute metadata: name: "{{ template "harbor.ingress" . }}" annotations: {{- with .Values.expose.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} labels: {{ include "harbor.labels" . | nindent 4 }} spec: entryPoints: - websecure routes: - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) kind: Rule services: - name: {{ template "harbor.portal" . }} port: {{ template "harbor.portal.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/api/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/service/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - 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.global.host }}`) && PathPrefix(`/chartrepo/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/c/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} tls: {} --- apiVersion: bcc.bd-apaas.com/v1alpha1 kind: IngressRoute metadata: name: "{{ template "harbor.ingress" . }}-http" annotations: {{- with .Values.expose.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} labels: {{ include "harbor.labels" . | nindent 4 }} spec: entryPoints: - web routes: - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/`) kind: Rule services: - name: {{ template "harbor.portal" . }} port: {{ template "harbor.portal.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/api/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/service/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/v2/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/chartrepo/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - match: Host(`{{ $.Values.global.host }}`) && PathPrefix(`/c/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} {{- end -}}