Helm falls back to the "default" namespace when --namespace is omitted, so a forgotten flag (or a Kustomize helmCharts entry without namespace) silently deployed into the wrong place. Render the namespace through one helper that fails on an empty or implicit "default" namespace, with allowDefaultNamespace as an explicit opt-in. scripts/check-chart.sh lints the chart, asserts every namespaced resource carries the passed namespace, and checks both failure and opt-in paths. CI runs it instead of the plain template call. Bump the chart to 0.2.1.
35 lines
969 B
YAML
35 lines
969 B
YAML
{{- if .Values.ingress.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "audiomanager.fullname" . }}
|
|
namespace: {{ include "audiomanager.namespace" . }}
|
|
labels:
|
|
{{- include "audiomanager.labels" . | nindent 4 }}
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.ingress.className }}
|
|
ingressClassName: {{ . }}
|
|
{{- end }}
|
|
{{- if .Values.ingress.tls.enabled }}
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.ingress.host | quote }}
|
|
secretName: {{ .Values.ingress.tls.secretName }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ .Values.ingress.host | quote }}
|
|
http:
|
|
paths:
|
|
- path: {{ .Values.ingress.path }}
|
|
pathType: {{ .Values.ingress.pathType }}
|
|
backend:
|
|
service:
|
|
name: {{ include "audiomanager.fullname" . }}
|
|
port:
|
|
name: http
|
|
{{- end }}
|