mirror of
https://github.com/bitnami/charts.git
synced 2026-08-10 14:15:55 +08:00
122 lines
3.3 KiB
YAML
122 lines
3.3 KiB
YAML
{{- if eq .Values.service.type "Ingress" }}
|
|
{{- $ingress := .Values.service.ingress -}}
|
|
{{- $tls := .Values.service.tls -}}
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: "{{ template "harbor.ingress" . }}"
|
|
labels: {{ include "harbor.labels" . | nindent 4 }}
|
|
annotations:
|
|
{{ toYaml $ingress.annotations | nindent 4 }}
|
|
spec:
|
|
{{- if $tls.enabled }}
|
|
tls:
|
|
{{- if $tls.secretName }}
|
|
- secretName: "{{ $tls.secretName }}"
|
|
{{- else }}
|
|
- secretName: "{{ template "harbor.ingress" . }}"
|
|
{{- end }}
|
|
{{- if $ingress.hosts.core }}
|
|
hosts:
|
|
- {{ $ingress.hosts.core }}
|
|
{{- end }}
|
|
{{- if .Values.notary.enabled }}
|
|
{{- if $tls.notarySecretName }}
|
|
- secretName: "{{ $tls.notarySecretName }}"
|
|
{{- else if $tls.secretName }}
|
|
- secretName: "{{ $tls.secretName }}"
|
|
{{- else }}
|
|
- secretName: "{{ template "harbor.ingress" . }}"
|
|
{{- end }}
|
|
{{- if $ingress.hosts.notary }}
|
|
hosts:
|
|
- {{ $ingress.hosts.notary }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if eq .Values.service.ingress.controller "gce" }}
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: /*
|
|
backend:
|
|
serviceName: {{ template "harbor.portal" . }}
|
|
servicePort: 80
|
|
- path: /api/*
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /service/*
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /v2/*
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /chartrepo/*
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /c/*
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
{{- if $ingress.hosts.core }}
|
|
host: {{ $ingress.hosts.core }}
|
|
{{- end }}
|
|
{{- if .Values.notary.enabled }}
|
|
- http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: {{ template "harbor.notary-server" . }}
|
|
servicePort: 4443
|
|
{{- if $ingress.hosts.notary }}
|
|
host: {{ $ingress.hosts.notary }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- else }}
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: {{ template "harbor.portal" . }}
|
|
servicePort: 80
|
|
- path: /api/
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /service/
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /v2/
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /chartrepo/
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
- path: /c/
|
|
backend:
|
|
serviceName: {{ template "harbor.core" . }}
|
|
servicePort: 80
|
|
{{- if $ingress.hosts.core }}
|
|
host: {{ $ingress.hosts.core }}
|
|
{{- end }}
|
|
{{- if .Values.notary.enabled }}
|
|
- http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: {{ template "harbor.notary-server" . }}
|
|
servicePort: 4443
|
|
{{- if $ingress.hosts.notary }}
|
|
host: {{ $ingress.hosts.notary }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }} |