Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/charts/tenant-namespace/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
type: application
description: Chart for setting up a tenants namespace with all the goodies
name: tenant-namespace
version: 0.9.2
version: 0.9.3
appVersion: "1.0"
dependencies:
- name: magic-namespace
Expand Down
5 changes: 4 additions & 1 deletion charts/charts/tenant-namespace/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ Create the namespace of the gateway to use
Create a filtered list of admin namespace to tenant certificate refs
*/}}
{{- define "namespace.adminToTenantCertificateRefs" -}}
{{- $root := . -}}
{{- $releaseNamespace := .Release.Namespace -}}
{{- $tenantNamespace := .Values.magicnamespace.namespace -}}
{{ $result := list }}
{{ range $ref := .Values.gateway.httpsListener.certificateRefs }}
{{ if eq $ref.namespace $.Values.magicnamespace.namespace }}
{{ if eq (tpl ($ref.namespace | default $releaseNamespace) $root) $tenantNamespace }}
{{ $result = append $result $ref }}
{{- end -}}
{{- end }}
Expand Down
11 changes: 8 additions & 3 deletions charts/charts/tenant-namespace/templates/gateway.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if .Values.gateway.enabled }}
{{- $root := . -}}
{{- $releaseNamespace := .Release.Namespace -}}
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
Expand Down Expand Up @@ -33,9 +35,12 @@ spec:
tls:
mode: Terminate
certificateRefs:
{{- with .Values.gateway.httpsListener.certificateRefs }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- range .Values.gateway.httpsListener.certificateRefs }}
- group: {{ default "" .group | quote }}
kind: {{ default "Secret" .kind }}
name: {{ .name }}
namespace: {{ tpl (.namespace | default $releaseNamespace) $root }}
{{- end }}
{{- end }}
{{- with .Values.gateway.extraListeners }}
{{- toYaml . | nindent 4 }}
Expand Down