cozystack/packages/system/cozystack-api/templates/api-ingress.yaml
Andrei Kvapil 45bd323c6e
[platform] Get rid of lookups
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-11-24 20:09:03 +01:00

33 lines
982 B
YAML

{{- $cozystack := .Values.cozystack | default dict }}
{{- $publishing := $cozystack.publishing | default dict }}
{{- $host := $publishing.host | default "" }}
{{- $exposeServices := $publishing.exposedServices | default list }}
{{- $exposeIngress := $publishing.ingressClassName | default "tenant-root" }}
{{- if not $host }}
{{- fail "ERROR: cozystack.publishing.host is required" }}
{{- end }}
{{- if has "api" $exposeServices }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
name: kubernetes
namespace: default
spec:
ingressClassName: {{ $exposeIngress }}
rules:
- host: api.{{ $host }}
http:
paths:
- backend:
service:
name: kubernetes
port:
number: 443
path: /
pathType: Prefix
{{- end }}