harbor-operator/templates/ingress.yaml
2022-12-15 06:43:56 +02:00

65 lines
1.7 KiB
YAML

{{ if .Values.ingress.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: harbor
annotations:
ingress.kubernetes.io/proxy-body-size: "0"
ingress.kubernetes.io/ssl-redirect: "true"
external-dns.alpha.kubernetes.io/target: "{{ .Values.ingress.target }}"
kubernetes.io/ingress.class: "{{ .Values.ingress.class }}"
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
tls:
- hosts:
- "{{ .Values.ingress.tls.host }}"
rules:
- host: "{{ .Values.ingress.host }}"
http:
paths:
- path: /api/
pathType: Prefix
backend:
service:
name: harbor-core
port:
name: http
- path: /service/
pathType: Prefix
backend:
service:
name: harbor-core
port:
number: 80
- path: /v2/
pathType: Prefix
backend:
service:
name: harbor-core
port:
number: 80
- path: /chartrepo/
pathType: Prefix
backend:
service:
name: harbor-core
port:
number: 80
- path: /c/
pathType: Prefix
backend:
service:
name: harbor-core
port:
number: 80
- path: /
pathType: Prefix
backend:
service:
name: harbor-portal
port:
number: 80
{{ end }}