diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index d0c89994bbe7..7f4c6c9b7de7 100644 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: prometheus -version: 11.2.3 +version: 11.3.0 appVersion: 2.18.1 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/README.md b/stable/prometheus/README.md index cc06eabdb9f0..a55f34c93357 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -377,7 +377,8 @@ Parameter | Description | Default `serverFiles.prometheus.yml` | Prometheus server scrape configuration | example configuration `extraScrapeConfigs` | Prometheus server additional scrape configuration | "" `alertRelabelConfigs` | Prometheus server [alert relabeling configs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs) for H/A prometheus | "" -`networkPolicy.enabled` | Enable NetworkPolicy | `false` | +`networkPolicy.enabled` | Enable NetworkPolicy | `false` +`forceNamespace` | Force resources to be namespaced | `null` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/stable/prometheus/templates/_helpers.tpl b/stable/prometheus/templates/_helpers.tpl index 140550a38a08..f2e032914d03 100644 --- a/stable/prometheus/templates/_helpers.tpl +++ b/stable/prometheus/templates/_helpers.tpl @@ -236,3 +236,14 @@ Create the name of the service account to use for the server component {{ default "default" .Values.serviceAccounts.server.name }} {{- end -}} {{- end -}} + +{{/* +Define the prometheus.namespace template if set with forceNamespace or .Release.Namespace is set +*/}} +{{- define "prometheus.namespace" -}} +{{- if .Values.forceNamespace -}} +{{ printf "namespace: %s" .Values.forceNamespace }} +{{- else -}} +{{ printf "namespace: %s" .Release.Namespace }} +{{- end -}} +{{- end -}} diff --git a/stable/prometheus/templates/alertmanager-clusterrolebinding.yaml b/stable/prometheus/templates/alertmanager-clusterrolebinding.yaml index 925afcd33317..03102fb18549 100644 --- a/stable/prometheus/templates/alertmanager-clusterrolebinding.yaml +++ b/stable/prometheus/templates/alertmanager-clusterrolebinding.yaml @@ -8,7 +8,7 @@ metadata: subjects: - kind: ServiceAccount name: {{ template "prometheus.serviceAccountName.alertmanager" . }} - namespace: {{ .Release.Namespace }} +{{ include "prometheus.namespace" . | indent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/stable/prometheus/templates/alertmanager-configmap.yaml b/stable/prometheus/templates/alertmanager-configmap.yaml index 6f6efcece921..cb09bf0674d5 100644 --- a/stable/prometheus/templates/alertmanager-configmap.yaml +++ b/stable/prometheus/templates/alertmanager-configmap.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "prometheus.alertmanager.labels" . | nindent 4 }} name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} data: {{- $root := . -}} {{- range $key, $value := .Values.alertmanagerFiles }} diff --git a/stable/prometheus/templates/alertmanager-deployment.yaml b/stable/prometheus/templates/alertmanager-deployment.yaml index 0afb8f675f9b..bb130579cc66 100644 --- a/stable/prometheus/templates/alertmanager-deployment.yaml +++ b/stable/prometheus/templates/alertmanager-deployment.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "prometheus.alertmanager.labels" . | nindent 4 }} name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: selector: matchLabels: diff --git a/stable/prometheus/templates/alertmanager-ingress.yaml b/stable/prometheus/templates/alertmanager-ingress.yaml index 9883054fb97b..b199b7029718 100644 --- a/stable/prometheus/templates/alertmanager-ingress.yaml +++ b/stable/prometheus/templates/alertmanager-ingress.yaml @@ -20,6 +20,7 @@ metadata: {{ $key }}: {{ $value }} {{- end }} name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: rules: {{- range .Values.alertmanager.ingress.hosts }} diff --git a/stable/prometheus/templates/alertmanager-networkpolicy.yaml b/stable/prometheus/templates/alertmanager-networkpolicy.yaml index 0bcbd27d4100..e44ade60ead3 100644 --- a/stable/prometheus/templates/alertmanager-networkpolicy.yaml +++ b/stable/prometheus/templates/alertmanager-networkpolicy.yaml @@ -3,6 +3,7 @@ apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} kind: NetworkPolicy metadata: name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} labels: {{- include "prometheus.alertmanager.labels" . | nindent 4 }} spec: diff --git a/stable/prometheus/templates/alertmanager-pdb.yaml b/stable/prometheus/templates/alertmanager-pdb.yaml index c38df77a7725..41a92f3648cb 100644 --- a/stable/prometheus/templates/alertmanager-pdb.yaml +++ b/stable/prometheus/templates/alertmanager-pdb.yaml @@ -3,6 +3,7 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} labels: {{- include "prometheus.alertmanager.labels" . | nindent 4 }} spec: diff --git a/stable/prometheus/templates/alertmanager-pvc.yaml b/stable/prometheus/templates/alertmanager-pvc.yaml index 400aba5b4677..4fdab16608ee 100644 --- a/stable/prometheus/templates/alertmanager-pvc.yaml +++ b/stable/prometheus/templates/alertmanager-pvc.yaml @@ -11,6 +11,7 @@ metadata: labels: {{- include "prometheus.alertmanager.labels" . | nindent 4 }} name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: accessModes: {{ toYaml .Values.alertmanager.persistentVolume.accessModes | indent 4 }} diff --git a/stable/prometheus/templates/alertmanager-service-headless.yaml b/stable/prometheus/templates/alertmanager-service-headless.yaml index 8d619e891797..8c402c408835 100644 --- a/stable/prometheus/templates/alertmanager-service-headless.yaml +++ b/stable/prometheus/templates/alertmanager-service-headless.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml .Values.alertmanager.statefulSet.headless.labels | indent 4 }} {{- end }} name: {{ template "prometheus.alertmanager.fullname" . }}-headless +{{ include "prometheus.namespace" . | indent 2 }} spec: clusterIP: None ports: diff --git a/stable/prometheus/templates/alertmanager-service.yaml b/stable/prometheus/templates/alertmanager-service.yaml index 79196432c1c3..9edc9ac656c4 100644 --- a/stable/prometheus/templates/alertmanager-service.yaml +++ b/stable/prometheus/templates/alertmanager-service.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml .Values.alertmanager.service.labels | indent 4 }} {{- end }} name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: {{- if .Values.alertmanager.service.clusterIP }} clusterIP: {{ .Values.alertmanager.service.clusterIP }} diff --git a/stable/prometheus/templates/alertmanager-serviceaccount.yaml b/stable/prometheus/templates/alertmanager-serviceaccount.yaml index d23fcb8d9963..a5d996a85720 100644 --- a/stable/prometheus/templates/alertmanager-serviceaccount.yaml +++ b/stable/prometheus/templates/alertmanager-serviceaccount.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "prometheus.alertmanager.labels" . | nindent 4 }} name: {{ template "prometheus.serviceAccountName.alertmanager" . }} +{{ include "prometheus.namespace" . | indent 2 }} annotations: {{ toYaml .Values.serviceAccounts.alertmanager.annotations | indent 4 }} {{- end -}} diff --git a/stable/prometheus/templates/alertmanager-statefulset.yaml b/stable/prometheus/templates/alertmanager-statefulset.yaml index 14a775ac3dca..e2e5c9131d84 100644 --- a/stable/prometheus/templates/alertmanager-statefulset.yaml +++ b/stable/prometheus/templates/alertmanager-statefulset.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "prometheus.alertmanager.labels" . | nindent 4 }} name: {{ template "prometheus.alertmanager.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: serviceName: {{ template "prometheus.alertmanager.fullname" . }}-headless selector: diff --git a/stable/prometheus/templates/node-exporter-daemonset.yaml b/stable/prometheus/templates/node-exporter-daemonset.yaml index aee32dab3f0e..4d6e3334cc95 100644 --- a/stable/prometheus/templates/node-exporter-daemonset.yaml +++ b/stable/prometheus/templates/node-exporter-daemonset.yaml @@ -9,6 +9,7 @@ metadata: labels: {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} name: {{ template "prometheus.nodeExporter.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: selector: matchLabels: diff --git a/stable/prometheus/templates/node-exporter-role.yaml b/stable/prometheus/templates/node-exporter-role.yaml index 49a6874b37bf..a6134a2c3013 100644 --- a/stable/prometheus/templates/node-exporter-role.yaml +++ b/stable/prometheus/templates/node-exporter-role.yaml @@ -6,7 +6,7 @@ metadata: name: {{ template "prometheus.nodeExporter.fullname" . }} labels: {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - namespace: {{ .Release.Namespace }} +{{ include "prometheus.namespace" . | indent 2 }} rules: - apiGroups: ['extensions'] resources: ['podsecuritypolicies'] diff --git a/stable/prometheus/templates/node-exporter-rolebinding.yaml b/stable/prometheus/templates/node-exporter-rolebinding.yaml index e56e5ff41441..42c90d023be9 100644 --- a/stable/prometheus/templates/node-exporter-rolebinding.yaml +++ b/stable/prometheus/templates/node-exporter-rolebinding.yaml @@ -6,7 +6,7 @@ metadata: name: {{ template "prometheus.nodeExporter.fullname" . }} labels: {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - namespace: {{ .Release.Namespace }} +{{ include "prometheus.namespace" . | indent 2 }} roleRef: kind: Role name: {{ template "prometheus.nodeExporter.fullname" . }} @@ -14,6 +14,6 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus.serviceAccountName.nodeExporter" . }} - namespace: {{ .Release.Namespace }} +{{ include "prometheus.namespace" . | indent 2 }} {{- end }} {{- end }} diff --git a/stable/prometheus/templates/node-exporter-service.yaml b/stable/prometheus/templates/node-exporter-service.yaml index 55c683b6abae..b1833da7332e 100644 --- a/stable/prometheus/templates/node-exporter-service.yaml +++ b/stable/prometheus/templates/node-exporter-service.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml .Values.nodeExporter.service.labels | indent 4 }} {{- end }} name: {{ template "prometheus.nodeExporter.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: {{- if .Values.nodeExporter.service.clusterIP }} clusterIP: {{ .Values.nodeExporter.service.clusterIP }} diff --git a/stable/prometheus/templates/node-exporter-serviceaccount.yaml b/stable/prometheus/templates/node-exporter-serviceaccount.yaml index ee4d6607bf30..0cf91afbade9 100644 --- a/stable/prometheus/templates/node-exporter-serviceaccount.yaml +++ b/stable/prometheus/templates/node-exporter-serviceaccount.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} name: {{ template "prometheus.serviceAccountName.nodeExporter" . }} +{{ include "prometheus.namespace" . | indent 2 }} annotations: {{ toYaml .Values.serviceAccounts.nodeExporter.annotations | indent 4 }} {{- end -}} diff --git a/stable/prometheus/templates/pushgateway-clusterrolebinding.yaml b/stable/prometheus/templates/pushgateway-clusterrolebinding.yaml index bcbaccb29b00..afdaaf1816a9 100644 --- a/stable/prometheus/templates/pushgateway-clusterrolebinding.yaml +++ b/stable/prometheus/templates/pushgateway-clusterrolebinding.yaml @@ -8,7 +8,7 @@ metadata: subjects: - kind: ServiceAccount name: {{ template "prometheus.serviceAccountName.pushgateway" . }} - namespace: {{ .Release.Namespace }} +{{ include "prometheus.namespace" . | indent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/stable/prometheus/templates/pushgateway-deployment.yaml b/stable/prometheus/templates/pushgateway-deployment.yaml index 8148ef4f8f26..a9afc8ace719 100644 --- a/stable/prometheus/templates/pushgateway-deployment.yaml +++ b/stable/prometheus/templates/pushgateway-deployment.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "prometheus.pushgateway.labels" . | nindent 4 }} name: {{ template "prometheus.pushgateway.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: selector: {{- if .Values.schedulerName }} diff --git a/stable/prometheus/templates/pushgateway-ingress.yaml b/stable/prometheus/templates/pushgateway-ingress.yaml index 60c6d7455ee7..0c877d5656e4 100644 --- a/stable/prometheus/templates/pushgateway-ingress.yaml +++ b/stable/prometheus/templates/pushgateway-ingress.yaml @@ -17,6 +17,7 @@ metadata: labels: {{- include "prometheus.pushgateway.labels" . | nindent 4 }} name: {{ template "prometheus.pushgateway.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: rules: {{- range .Values.pushgateway.ingress.hosts }} diff --git a/stable/prometheus/templates/pushgateway-networkpolicy.yaml b/stable/prometheus/templates/pushgateway-networkpolicy.yaml index e8f6ab829276..c8d1fb37e893 100644 --- a/stable/prometheus/templates/pushgateway-networkpolicy.yaml +++ b/stable/prometheus/templates/pushgateway-networkpolicy.yaml @@ -3,6 +3,7 @@ apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} kind: NetworkPolicy metadata: name: {{ template "prometheus.pushgateway.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} labels: {{- include "prometheus.pushgateway.labels" . | nindent 4 }} spec: diff --git a/stable/prometheus/templates/pushgateway-pdb.yaml b/stable/prometheus/templates/pushgateway-pdb.yaml index e9910a5c88b7..50beb486d622 100644 --- a/stable/prometheus/templates/pushgateway-pdb.yaml +++ b/stable/prometheus/templates/pushgateway-pdb.yaml @@ -3,6 +3,7 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "prometheus.pushgateway.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} labels: {{- include "prometheus.pushgateway.labels" . | nindent 4 }} spec: diff --git a/stable/prometheus/templates/pushgateway-pvc.yaml b/stable/prometheus/templates/pushgateway-pvc.yaml index ba16a37af238..227e7a964e36 100644 --- a/stable/prometheus/templates/pushgateway-pvc.yaml +++ b/stable/prometheus/templates/pushgateway-pvc.yaml @@ -10,6 +10,7 @@ metadata: labels: {{- include "prometheus.pushgateway.labels" . | nindent 4 }} name: {{ template "prometheus.pushgateway.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: accessModes: {{ toYaml .Values.pushgateway.persistentVolume.accessModes | indent 4 }} diff --git a/stable/prometheus/templates/pushgateway-service.yaml b/stable/prometheus/templates/pushgateway-service.yaml index e84771d8bb45..f05f17c42fdc 100644 --- a/stable/prometheus/templates/pushgateway-service.yaml +++ b/stable/prometheus/templates/pushgateway-service.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml .Values.pushgateway.service.labels | indent 4}} {{- end }} name: {{ template "prometheus.pushgateway.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: {{- if .Values.pushgateway.service.clusterIP }} clusterIP: {{ .Values.pushgateway.service.clusterIP }} diff --git a/stable/prometheus/templates/pushgateway-serviceaccount.yaml b/stable/prometheus/templates/pushgateway-serviceaccount.yaml index 2049c30e91f8..8c0b876f375c 100644 --- a/stable/prometheus/templates/pushgateway-serviceaccount.yaml +++ b/stable/prometheus/templates/pushgateway-serviceaccount.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "prometheus.pushgateway.labels" . | nindent 4 }} name: {{ template "prometheus.serviceAccountName.pushgateway" . }} +{{ include "prometheus.namespace" . | indent 2 }} annotations: {{ toYaml .Values.serviceAccounts.pushgateway.annotations | indent 4 }} {{- end -}} diff --git a/stable/prometheus/templates/server-clusterrolebinding.yaml b/stable/prometheus/templates/server-clusterrolebinding.yaml index 1196ce3f2d13..5beebfc8db4c 100644 --- a/stable/prometheus/templates/server-clusterrolebinding.yaml +++ b/stable/prometheus/templates/server-clusterrolebinding.yaml @@ -8,7 +8,7 @@ metadata: subjects: - kind: ServiceAccount name: {{ template "prometheus.serviceAccountName.server" . }} - namespace: {{ .Release.Namespace }} +{{ include "prometheus.namespace" . | indent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/stable/prometheus/templates/server-configmap.yaml b/stable/prometheus/templates/server-configmap.yaml index ac79fdf2fb68..0838bb3ad3a7 100644 --- a/stable/prometheus/templates/server-configmap.yaml +++ b/stable/prometheus/templates/server-configmap.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "prometheus.server.labels" . | nindent 4 }} name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} data: {{- $root := . -}} {{- range $key, $value := .Values.serverFiles }} diff --git a/stable/prometheus/templates/server-deployment.yaml b/stable/prometheus/templates/server-deployment.yaml index 42e3fc9b224e..e91e7b52b2c0 100644 --- a/stable/prometheus/templates/server-deployment.yaml +++ b/stable/prometheus/templates/server-deployment.yaml @@ -10,6 +10,7 @@ metadata: labels: {{- include "prometheus.server.labels" . | nindent 4 }} name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: selector: matchLabels: diff --git a/stable/prometheus/templates/server-ingress.yaml b/stable/prometheus/templates/server-ingress.yaml index 16f0a2af7483..b3a51fa3a5d8 100644 --- a/stable/prometheus/templates/server-ingress.yaml +++ b/stable/prometheus/templates/server-ingress.yaml @@ -21,6 +21,7 @@ metadata: {{ $key }}: {{ $value }} {{- end }} name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: rules: {{- range .Values.server.ingress.hosts }} diff --git a/stable/prometheus/templates/server-networkpolicy.yaml b/stable/prometheus/templates/server-networkpolicy.yaml index 9e10129deb57..c8870e9ff1d0 100644 --- a/stable/prometheus/templates/server-networkpolicy.yaml +++ b/stable/prometheus/templates/server-networkpolicy.yaml @@ -4,6 +4,7 @@ apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} kind: NetworkPolicy metadata: name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} labels: {{- include "prometheus.server.labels" . | nindent 4 }} spec: diff --git a/stable/prometheus/templates/server-pdb.yaml b/stable/prometheus/templates/server-pdb.yaml index b2447fdba2b2..364cb5b49187 100644 --- a/stable/prometheus/templates/server-pdb.yaml +++ b/stable/prometheus/templates/server-pdb.yaml @@ -3,6 +3,7 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} labels: {{- include "prometheus.server.labels" . | nindent 4 }} spec: diff --git a/stable/prometheus/templates/server-pvc.yaml b/stable/prometheus/templates/server-pvc.yaml index 9d1cb371bfd8..fc40c32074e2 100644 --- a/stable/prometheus/templates/server-pvc.yaml +++ b/stable/prometheus/templates/server-pvc.yaml @@ -12,6 +12,7 @@ metadata: labels: {{- include "prometheus.server.labels" . | nindent 4 }} name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: accessModes: {{ toYaml .Values.server.persistentVolume.accessModes | indent 4 }} diff --git a/stable/prometheus/templates/server-service-headless.yaml b/stable/prometheus/templates/server-service-headless.yaml index 3edc58c00f40..001ec321d15e 100644 --- a/stable/prometheus/templates/server-service-headless.yaml +++ b/stable/prometheus/templates/server-service-headless.yaml @@ -13,6 +13,7 @@ metadata: {{ toYaml .Values.server.statefulSet.headless.labels | indent 4 }} {{- end }} name: {{ template "prometheus.server.fullname" . }}-headless +{{ include "prometheus.namespace" . | indent 2 }} spec: clusterIP: None ports: diff --git a/stable/prometheus/templates/server-service.yaml b/stable/prometheus/templates/server-service.yaml index 6ecfc7164bb2..68f988927308 100644 --- a/stable/prometheus/templates/server-service.yaml +++ b/stable/prometheus/templates/server-service.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml .Values.server.service.labels | indent 4 }} {{- end }} name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: {{- if .Values.server.service.clusterIP }} clusterIP: {{ .Values.server.service.clusterIP }} diff --git a/stable/prometheus/templates/server-serviceaccount.yaml b/stable/prometheus/templates/server-serviceaccount.yaml index 9ca20b2905e0..9c0502ab7aa3 100644 --- a/stable/prometheus/templates/server-serviceaccount.yaml +++ b/stable/prometheus/templates/server-serviceaccount.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "prometheus.server.labels" . | nindent 4 }} name: {{ template "prometheus.serviceAccountName.server" . }} +{{ include "prometheus.namespace" . | indent 2 }} annotations: {{ toYaml .Values.serviceAccounts.server.annotations | indent 4 }} {{- end }} diff --git a/stable/prometheus/templates/server-statefulset.yaml b/stable/prometheus/templates/server-statefulset.yaml index 29a5a3d24f96..37d9e7de3531 100644 --- a/stable/prometheus/templates/server-statefulset.yaml +++ b/stable/prometheus/templates/server-statefulset.yaml @@ -13,6 +13,7 @@ metadata: {{ toYaml .Values.server.statefulSet.labels | nindent 4 }} {{- end}} name: {{ template "prometheus.server.fullname" . }} +{{ include "prometheus.namespace" . | indent 2 }} spec: serviceName: {{ template "prometheus.server.fullname" . }}-headless selector: diff --git a/stable/prometheus/templates/server-vpa.yaml b/stable/prometheus/templates/server-vpa.yaml index ef3604eb0e0f..8f55b9b6042c 100644 --- a/stable/prometheus/templates/server-vpa.yaml +++ b/stable/prometheus/templates/server-vpa.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "prometheus.server.labels" . | nindent 4 }} name: {{ template "prometheus.server.fullname" . }}-vpa +{{ include "prometheus.namespace" . | indent 2 }} spec: targetRef: {{- if .Values.server.statefulSet.enabled }} diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index ecd5165e5737..b3af346e6376 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -1541,3 +1541,6 @@ networkPolicy: ## Enable creation of NetworkPolicy resources. ## enabled: false + +# Force namespace of namespaced resources +forceNamespace: null