a3ce2d473c
Ship Proxmox, oVirt, VMware, and OpenStack behind one Postgres stack, Makefile helpers (up/clean/helm up|down/push), and a Helm chart with namespace, Let's Encrypt ingresses, migrate inits, and skip-if-seeded jobs.
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
{{- range $name, $ing := .Values.ingresses }}
|
|
{{- if $ing.enabled }}
|
|
{{- $svcName := printf "%s-%s" (include "lab.fullname" $) $ing.service }}
|
|
{{- $className := $ing.className | default $.Values.ingressClassName }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "lab.fullname" $ }}-{{ $name }}
|
|
namespace: {{ include "lab.namespace" $ }}
|
|
labels:
|
|
{{- include "lab.labels" $ | nindent 4 }}
|
|
app.kubernetes.io/component: ingress-{{ $name }}
|
|
annotations:
|
|
{{- if $.Values.certManager.enabled }}
|
|
cert-manager.io/cluster-issuer: {{ include "lab.clusterIssuer" $ | quote }}
|
|
{{- end }}
|
|
{{- with $ing.annotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if $className }}
|
|
ingressClassName: {{ $className | quote }}
|
|
{{- end }}
|
|
{{- if $ing.tls }}
|
|
tls:
|
|
{{- range $ing.tls }}
|
|
- hosts:
|
|
{{- range .hosts }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
secretName: {{ .secretName }}
|
|
{{- end }}
|
|
{{- else if $.Values.certManager.enabled }}
|
|
tls:
|
|
- hosts:
|
|
- {{ $ing.host | quote }}
|
|
secretName: {{ printf "%s-%s-tls" (include "lab.fullname" $) $name }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ $ing.host | quote }}
|
|
http:
|
|
paths:
|
|
- path: {{ $ing.path | default "/" | quote }}
|
|
pathType: {{ $ing.pathType | default "Prefix" }}
|
|
backend:
|
|
service:
|
|
name: {{ $svcName }}
|
|
port:
|
|
number: {{ $ing.port }}
|
|
---
|
|
{{- end }}
|
|
{{- end }}
|