diff --git a/charts/neuron-helm-chart/templates/_helpers.tpl b/charts/neuron-helm-chart/templates/_helpers.tpl index debe970..bd6d70b 100644 --- a/charts/neuron-helm-chart/templates/_helpers.tpl +++ b/charts/neuron-helm-chart/templates/_helpers.tpl @@ -331,7 +331,7 @@ Expand the name of the chart. Expand the namespace of the chart. */}} {{- define "neuron-node-problem-detector-and-recovery.namespace" -}} -{{- default .Release.Namespace .Values.npd.namespaceOverride | trunc 63 | trimSuffix "-" -}} +{{- default .Release.Namespace .Values.npd.namespace.name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* diff --git a/charts/neuron-helm-chart/templates/npd-daemonset.yaml b/charts/neuron-helm-chart/templates/npd-daemonset.yaml index 8dc4537..112125e 100644 --- a/charts/neuron-helm-chart/templates/npd-daemonset.yaml +++ b/charts/neuron-helm-chart/templates/npd-daemonset.yaml @@ -1,4 +1,5 @@ {{- if .Values.npd.enabled }} +--- apiVersion: apps/v1 kind: DaemonSet metadata: diff --git a/charts/neuron-helm-chart/templates/npd-namespace.yaml b/charts/neuron-helm-chart/templates/npd-namespace.yaml new file mode 100644 index 0000000..1137650 --- /dev/null +++ b/charts/neuron-helm-chart/templates/npd-namespace.yaml @@ -0,0 +1,9 @@ +{{- if and .Values.npd.enabled .Values.npd.namespace.create }} +apiVersion: v1 +kind: Namespace +metadata: + name: {{ include "neuron-node-problem-detector-and-recovery.namespace" . }} + labels: + app: {{ include "neuron-node-problem-detector-and-recovery.fullname" . }} + {{- include "neuron-node-problem-detector-and-recovery.labels" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/neuron-helm-chart/values.yaml b/charts/neuron-helm-chart/values.yaml index 46e0124..681b388 100644 --- a/charts/neuron-helm-chart/values.yaml +++ b/charts/neuron-helm-chart/values.yaml @@ -155,7 +155,9 @@ npd: name: node-problem-detector-config imagePullSecrets: [] nameOverride: node-problem-detector - namespaceOverride: neuron-healthcheck-system + namespace: + name: neuron-healthcheck-system + create: false fullnameOverride: node-problem-detector selectorLabelsOverride: {} serviceAccount: