mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
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>
(cherry picked from commit c61e6a842e)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
d2af75feb1
commit
cdfc45a243
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
|
||||
Reference in new issue
Block a user