{{- 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.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/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - 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/`) 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 }}`) && PathPrefix(`/chartrepo/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - 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(`/`) kind: Rule services: - name: {{ template "harbor.notary-server" . }} port: 4443 tls: certResolver: default --- 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.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/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - 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/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - 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(`/c/`) kind: Rule services: - name: {{ template "harbor.core" . }} port: {{ template "harbor.core.servicePort" . }} - match: Host(`{{ .Values.expose.ingress.hosts.notary }}`) && PathPrefix(`/`) kind: Rule services: - name: {{ template "harbor.notary-server" . }} port: 4443 {{- end -}}