1
0
Fork 0
This repository has been archived on 2025-08-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
pterodactyl-on-k8s/charts/pterodactyl-panel/templates/ingress.yaml
Vojtech Mares eeada0e25d
Some checks are pending
Release Docs / Release Docs (push) Waiting to run
Release / Build and publish a Docker image / build-and-push-image (push) Waiting to run
chore: wip
2024-05-01 07:47:42 +02:00

41 lines
1.1 KiB
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "pterodactyl-panel.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "pterodactyl-panel.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ $fullName }}--nginx
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}