Add self-contained API simulators lab with Compose and Helm.
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.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
{{- 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 }}
|
||||
Reference in New Issue
Block a user