fix(kubernetes): skip the proxied addon Ingress in a tenant without ingress

An empty _namespace.ingress means no ingress-nginx serves the tenant,
which tenant-root now reports when the root Tenant has ingress off. The
Ingress would carry ingressClassName "", which the API rejects, and the
release would fail to install where it used to leave an unserved
Ingress behind.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
This commit is contained in:
Alexey Artamonov committed 2026-11-11 18:20:38 +03:00
1 parent b26001b6f9
commit c61e6a842e
2 files changed
+18 -1

No files matched your search

@@ -3,7 +3,7 @@
on an etcd-less tenant the chart collapses to the awaiting-etcd beacon,
so no addon controller exists and the Service would select nothing. */}}
{{- if and .Values.addons.ingressNginx.enabled .Values._namespace.etcd (eq .Values.addons.ingressNginx.exposeMethod "Proxied") }}
{{- if .Values.addons.ingressNginx.hosts }}
{{- if and .Values.addons.ingressNginx.hosts $ingress }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
@@ -79,3 +79,20 @@ tests:
asserts:
- hasDocuments:
count: 0
# An empty _namespace.ingress means no ingress-nginx serves this tenant, and
# the API rejects the ingressClassName "" the Ingress would carry.
- it: renders the Service but no Ingress when the tenant has no ingress
set:
_namespace:
ingress: ""
addons:
ingressNginx:
enabled: true
exposeMethod: Proxied
hosts: ["app.example.com"]
asserts:
- hasDocuments:
count: 1
- isKind:
of: Service