diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index ea46ac6721..af19a6952d 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -12,7 +12,7 @@ sources: - https://github.com/coreos/kube-prometheus - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 8.15.0 +version: 8.15.1 appVersion: 0.38.1 tillerVersion: ">=2.12.0" home: https://github.com/coreos/prometheus-operator diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index 2f902cf635..fd75418315 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -174,6 +174,7 @@ The following tables list the configurable parameters of the prometheus-operator | `global.rbac.pspAnnotations` | Add annotations to the PSP configurations | `{}` | | `kubeTargetVersionOverride` | Provide a target gitVersion of K8S, in case .Capabilites.KubeVersion is not available (e.g. `helm template`) |`""`| | `nameOverride` | Provide a name in place of `prometheus-operator` |`""`| +| `namespaceOverride` | Override the deployment namespace | `""` (`Release.Namespace`) | | `kubeTargetVersionOverride` | Provide a k8s version |`""`| ### Prometheus Operator @@ -456,6 +457,7 @@ For a full list of configurable values please refer to the [Grafana chart](https | `grafana.ingress.hosts` | Ingress accepted hostnames for Grafana| `[]` | | `grafana.ingress.labels` | Custom labels for Grafana Ingress | `{}` | | `grafana.ingress.tls` | Ingress TLS configuration for Grafana | `[]` | +| `grafana.namespaceOverride` | Override the deployment namespace of grafana | `""` (`Release.Namespace`) | | `grafana.rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires rbac.pspEnabled) | `true` | | `grafana.service.portName` | Allow to customize Grafana service portname. Will be used by servicemonitor as well | `service` | | `grafana.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the grafana instance. | `` | @@ -479,6 +481,7 @@ For a full list of configurable values please refer to the [Grafana chart](https | `coreDns.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` | | `coreDns.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping CoreDns. | `` | | `coreDns.serviceMonitor.relabelings` | The `relabel_configs` for scraping CoreDNS. | `` | +| `kube-state-metrics.namespaceOverride` | Override the deployment namespace of kube-state-metrics | `""` (`Release.Namespace`) | | `kube-state-metrics.podSecurityPolicy.enabled` | Create pod security policy resource for kube-state-metrics. | `true` | | `kube-state-metrics.rbac.create` | Create RBAC components in kube-state-metrics. See `global.rbac.create` | `true` | | `kubeApiServer.enabled` | Deploy `serviceMonitor` to scrape the Kubernetes API server | `true` | @@ -569,6 +572,7 @@ For a full list of configurable values please refer to the [Grafana chart](https | `nodeExporter.serviceMonitor.metricRelabelings` | Metric relablings for the `prometheus-node-exporter` ServiceMonitor | `[]` | | `nodeExporter.serviceMonitor.relabelings` | The `relabel_configs` for scraping the `prometheus-node-exporter`. | `` | | `prometheus-node-exporter.extraArgs` | Additional arguments for the node exporter container | `["--collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)", "--collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$"]` | +| `prometheus-node-exporter.namespaceOverride` | Override the deployment namespace of node exporter | `""` (`Release.Namespace`) | | `prometheus-node-exporter.podLabels` | Additional labels for pods in the DaemonSet | `{"jobLabel":"node-exporter"}` | diff --git a/stable/prometheus-operator/templates/NOTES.txt b/stable/prometheus-operator/templates/NOTES.txt index ce7dce22ab..4ef1bc3c8d 100644 --- a/stable/prometheus-operator/templates/NOTES.txt +++ b/stable/prometheus-operator/templates/NOTES.txt @@ -1,5 +1,5 @@ The Prometheus Operator has been installed. Check its status by running: - kubectl --namespace {{ $.Release.Namespace }} get pods -l "release={{ $.Release.Name }}" + kubectl --namespace {{ template "prometheus-operator.namespace" . }} get pods -l "release={{ $.Release.Name }}" Visit https://github.com/coreos/prometheus-operator for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator. \ No newline at end of file diff --git a/stable/prometheus-operator/templates/_helpers.tpl b/stable/prometheus-operator/templates/_helpers.tpl index f4a8f2bae0..a7c481de58 100644 --- a/stable/prometheus-operator/templates/_helpers.tpl +++ b/stable/prometheus-operator/templates/_helpers.tpl @@ -80,3 +80,14 @@ heritage: {{ $.Release.Service | quote }} {{ default "default" .Values.alertmanager.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts +*/}} +{{- define "prometheus-operator.namespace" -}} + {{- if .Values.namespaceOverride -}} + {{- .Values.namespaceOverride -}} + {{- else -}} + {{- .Release.Namespace -}} + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml b/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml index 19ae3cb463..d82b297f68 100644 --- a/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml +++ b/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: Alertmanager metadata: name: {{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{ include "prometheus-operator.labels" . | indent 4 }} @@ -20,7 +20,7 @@ spec: {{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }} externalUrl: "http://{{ index .Values.alertmanager.ingress.hosts 0 }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" {{- else }} - externalUrl: http://{{ template "prometheus-operator.fullname" . }}-alertmanager.{{ $.Release.Namespace }}:{{ .Values.alertmanager.service.port }} + externalUrl: http://{{ template "prometheus-operator.fullname" . }}-alertmanager.{{ template "prometheus-operator.namespace" . }}:{{ .Values.alertmanager.service.port }} {{- end }} {{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }} nodeSelector: diff --git a/stable/prometheus-operator/templates/alertmanager/ingress.yaml b/stable/prometheus-operator/templates/alertmanager/ingress.yaml index 66bb34abbb..41bdcd03a5 100644 --- a/stable/prometheus-operator/templates/alertmanager/ingress.yaml +++ b/stable/prometheus-operator/templates/alertmanager/ingress.yaml @@ -11,7 +11,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $serviceName }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- if .Values.alertmanager.ingress.annotations }} annotations: {{ toYaml .Values.alertmanager.ingress.annotations | indent 4 }} diff --git a/stable/prometheus-operator/templates/alertmanager/ingressperreplica.yaml b/stable/prometheus-operator/templates/alertmanager/ingressperreplica.yaml index 6755ca1fc9..678dec914e 100644 --- a/stable/prometheus-operator/templates/alertmanager/ingressperreplica.yaml +++ b/stable/prometheus-operator/templates/alertmanager/ingressperreplica.yaml @@ -6,7 +6,7 @@ apiVersion: v1 kind: List metadata: name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-ingressperreplica - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} items: {{ range $i, $e := until $count }} - kind: Ingress @@ -17,7 +17,7 @@ items: {{ end -}} metadata: name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-{{ $i }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ include "prometheus-operator.name" $ }}-alertmanager {{ include "prometheus-operator.labels" $ | indent 8 }} diff --git a/stable/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml b/stable/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml index 6cf4d166bc..963b7c6ac2 100644 --- a/stable/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml +++ b/stable/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml @@ -3,7 +3,7 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/alertmanager/psp-role.yaml b/stable/prometheus-operator/templates/alertmanager/psp-role.yaml index 6d863660cb..c3f8b4b42f 100644 --- a/stable/prometheus-operator/templates/alertmanager/psp-role.yaml +++ b/stable/prometheus-operator/templates/alertmanager/psp-role.yaml @@ -3,7 +3,7 @@ kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml b/stable/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml index bce7349cec..797150336a 100644 --- a/stable/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml +++ b/stable/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{ include "prometheus-operator.labels" . | indent 4 }} @@ -14,5 +14,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- end }} diff --git a/stable/prometheus-operator/templates/alertmanager/psp.yaml b/stable/prometheus-operator/templates/alertmanager/psp.yaml index cbc0bb8567..7c9949c2db 100644 --- a/stable/prometheus-operator/templates/alertmanager/psp.yaml +++ b/stable/prometheus-operator/templates/alertmanager/psp.yaml @@ -3,7 +3,7 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: {{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{- if .Values.global.rbac.pspAnnotations }} diff --git a/stable/prometheus-operator/templates/alertmanager/secret.yaml b/stable/prometheus-operator/templates/alertmanager/secret.yaml index 86905530f7..a543bbf60d 100644 --- a/stable/prometheus-operator/templates/alertmanager/secret.yaml +++ b/stable/prometheus-operator/templates/alertmanager/secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: alertmanager-{{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- if .Values.alertmanager.secret.annotations }} annotations: {{ toYaml .Values.alertmanager.secret.annotations | indent 4 }} diff --git a/stable/prometheus-operator/templates/alertmanager/service.yaml b/stable/prometheus-operator/templates/alertmanager/service.yaml index 8313ec9ee7..8324e3b662 100644 --- a/stable/prometheus-operator/templates/alertmanager/service.yaml +++ b/stable/prometheus-operator/templates/alertmanager/service.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager self-monitor: {{ .Values.alertmanager.serviceMonitor.selfMonitor | quote }} diff --git a/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml b/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml index 1b3e55cf74..378e0351c0 100644 --- a/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/alertmanager/servicemonitor.yaml b/stable/prometheus-operator/templates/alertmanager/servicemonitor.yaml index c3b628aeab..6e90d327d7 100644 --- a/stable/prometheus-operator/templates/alertmanager/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/alertmanager/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-alertmanager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{ include "prometheus-operator.labels" . | indent 4 }} @@ -15,7 +15,7 @@ spec: self-monitor: "true" namespaceSelector: matchNames: - - {{ $.Release.Namespace | quote }} + - {{ printf "%s" (include "prometheus-operator.namespace" .) | quote }} endpoints: - port: {{ .Values.alertmanager.alertmanagerSpec.portName }} {{- if .Values.alertmanager.serviceMonitor.interval }} diff --git a/stable/prometheus-operator/templates/alertmanager/serviceperreplica.yaml b/stable/prometheus-operator/templates/alertmanager/serviceperreplica.yaml index 838d6a24be..d876c8385a 100644 --- a/stable/prometheus-operator/templates/alertmanager/serviceperreplica.yaml +++ b/stable/prometheus-operator/templates/alertmanager/serviceperreplica.yaml @@ -5,14 +5,14 @@ apiVersion: v1 kind: List metadata: name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-serviceperreplica - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} items: {{- range $i, $e := until $count }} - apiVersion: v1 kind: Service metadata: name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-{{ $i }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ include "prometheus-operator.name" $ }}-alertmanager {{ include "prometheus-operator.labels" $ | indent 8 }} diff --git a/stable/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml index 4dd430ca80..fa3ad9cd71 100644 --- a/stable/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-coredns - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-coredns {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml index 401dd9e36e..f4945771e0 100644 --- a/stable/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-apiserver - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-apiserver {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml index 52a344df62..7edc60bada 100644 --- a/stable/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-kube-controller-manager {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml index 8d22f8586c..19ce523deb 100644 --- a/stable/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-kube-dns - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-kube-dns {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml index 53221a1eab..4c716606a4 100644 --- a/stable/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-kube-etcd - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-kube-etcd {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml index 7e0db18cfd..16bc28bb64 100644 --- a/stable/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-kube-proxy - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-kube-proxy {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml index 01a2bee2ae..08795f4120 100644 --- a/stable/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-kube-scheduler {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml b/stable/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml index 73e0161b38..3630361b80 100644 --- a/stable/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-kube-state-metrics - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-kube-state-metrics {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml index 503933e426..d9ce902254 100644 --- a/stable/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-kubelet - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-kubelet {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml b/stable/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml index be5e00dd6c..82efdbf749 100644 --- a/stable/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-node-exporter - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-node-exporter {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml b/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml index 97934ac2c4..7fb8efa854 100644 --- a/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml +++ b/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml @@ -10,7 +10,7 @@ items: kind: ConfigMap metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "1" diff --git a/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml b/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml index 1ad3dc2b63..40198b56d8 100644 --- a/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml +++ b/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ template "prometheus-operator.fullname" . }}-grafana-datasource - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- if .Values.grafana.sidecar.datasources.annotations }} annotations: {{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml index 1d67b33629..627def907d 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "apiserver" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml index 04f7008305..ab5bc59e26 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "cluster-total" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml index c4eebdb81d..985a7290e7 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "controller-manager" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml index 4379c9cfe4..e0c5b74a6b 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml index ec4e91b591..032672eee3 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-coredns" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml index 4ff6b0cc89..f9f9627dc5 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml index cbea3588b5..2823e136a3 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml index 0e467efd73..41d131f424 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-node" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml index b598df35a8..b3a557d5f0 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml index ca358a0aca..4e3cbe9e99 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml index e40dcc41dd..608ebf068e 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml index 901147b126..9adb763d76 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "kubelet" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml index 219ce22a6a..1a7e962725 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "namespace-by-pod" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml index 7cea4a3417..67f20234bf 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "namespace-by-workload" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml index 921503a558..0aca3933ac 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "node-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml index c1dfdf2669..1cffc373bf 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "node-rsrc-use" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml index c208025f59..4277340de7 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml index e74ee3141c..f5db115655 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml index 697e859383..a26cf9f0b1 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "pod-total" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml index ca0d3f0019..6af1b5bfc2 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus-remote-write" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml index da175552b1..ff7cc859fb 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml index 6b1f5565e7..e64d85e7cf 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "proxy" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml index f7a3fd088e..54a9b4e872 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "scheduler" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml index 003decda44..75d930e190 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml b/stable/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml index aa71d5e434..a2addf8c3a 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "workload-total" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/etcd.yaml b/stable/prometheus-operator/templates/grafana/dashboards/etcd.yaml index ad78359093..f264e405cd 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/etcd.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/etcd.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml b/stable/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml index 938bcf4cc0..ea8b5c93df 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml b/stable/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml index 04b407e600..d70eaf8428 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-node-rsrc-use" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml index 1b51646361..2ceb1ebb7e 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml index 7b3914df43..6b2f1124ad 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml index 863c89b127..01a33e239a 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml index e334663db1..5fb05151ab 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml index 5b8d27be3b..e0d7e32af9 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/nodes.yaml b/stable/prometheus-operator/templates/grafana/dashboards/nodes.yaml index 780b480125..997c59d14d 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/nodes.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/nodes.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml b/stable/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml index c701deca16..ac0a0eebeb 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/pods.yaml b/stable/prometheus-operator/templates/grafana/dashboards/pods.yaml index 7698ff1517..dce3215569 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/pods.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/pods.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "pods" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/dashboards/statefulset.yaml b/stable/prometheus-operator/templates/grafana/dashboards/statefulset.yaml index 3476901f3c..1d73658942 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/statefulset.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/statefulset.yaml @@ -8,7 +8,7 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack apiVersion: v1 kind: ConfigMap metadata: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }} labels: {{- if $.Values.grafana.sidecar.dashboards.label }} diff --git a/stable/prometheus-operator/templates/grafana/servicemonitor.yaml b/stable/prometheus-operator/templates/grafana/servicemonitor.yaml index cbbbba8bbf..daf72b335f 100644 --- a/stable/prometheus-operator/templates/grafana/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/grafana/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-grafana - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-grafana {{ include "prometheus-operator.labels" . | indent 4 }} @@ -14,7 +14,7 @@ spec: app.kubernetes.io/instance: {{ $.Release.Name | quote }} namespaceSelector: matchNames: - - {{ $.Release.Namespace | quote }} + - {{ printf "%s" (include "prometheus-operator.namespace" .) | quote }} endpoints: - port: {{ .Values.grafana.service.portName }} {{- if .Values.grafana.serviceMonitor.interval }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml index 63bb2cc18b..a1313b9a99 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: {{ template "prometheus-operator.fullname" . }}-admission - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded @@ -17,5 +17,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus-operator.fullname" . }}-admission - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml index cec33d5627..21f417131b 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml @@ -3,7 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "prometheus-operator.fullname" . }}-admission-create - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": pre-install,pre-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded @@ -35,8 +35,8 @@ spec: imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.pullPolicy }} args: - create - - --host={{ template "prometheus-operator.operator.fullname" . }},{{ template "prometheus-operator.operator.fullname" . }}.{{ $.Release.Namespace }}.svc - - --namespace={{ $.Release.Namespace }} + - --host={{ template "prometheus-operator.operator.fullname" . }},{{ template "prometheus-operator.operator.fullname" . }}.{{ template "prometheus-operator.namespace" . }}.svc + - --namespace={{ template "prometheus-operator.namespace" . }} - --secret-name={{ template "prometheus-operator.fullname" . }}-admission resources: {{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.resources | indent 12 }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml index 48072fa3ce..0037e135c8 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml @@ -3,7 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "prometheus-operator.fullname" . }}-admission-patch - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded @@ -36,7 +36,7 @@ spec: args: - patch - --webhook-name={{ template "prometheus-operator.fullname" . }}-admission - - --namespace={{ $.Release.Namespace }} + - --namespace={{ template "prometheus-operator.namespace" . }} - --secret-name={{ template "prometheus-operator.fullname" . }}-admission - --patch-failure-policy={{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }} resources: diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml index b27c92bf14..782157802a 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml @@ -3,7 +3,7 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: {{ template "prometheus-operator.fullname" . }}-admission - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml index f5941fc7f0..5ead639f57 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: {{ template "prometheus-operator.fullname" . }}-admission - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml index 416cd3898a..aa6a4fc017 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "prometheus-operator.fullname" . }}-admission - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded @@ -17,5 +17,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus-operator.fullname" . }}-admission - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml index 440644f8ea..b3052e0daa 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "prometheus-operator.fullname" . }}-admission - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml index 97214ca3ea..30319453f4 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml @@ -25,7 +25,7 @@ webhooks: - UPDATE clientConfig: service: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ template "prometheus-operator.operator.fullname" $ }} path: /admission-prometheusrules/mutate {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml index 6616f212d7..3d26f46798 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml @@ -25,7 +25,7 @@ webhooks: - UPDATE clientConfig: service: - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} name: {{ template "prometheus-operator.operator.fullname" $ }} path: /admission-prometheusrules/validate {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml b/stable/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml index 6dacccc572..7329701f1f 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml @@ -3,7 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "prometheus-operator.fullname" . }}-operator-cleanup - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} annotations: "helm.sh/hook": pre-delete "helm.sh/hook-weight": "3" diff --git a/stable/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml b/stable/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml index 22568f329e..f2ac0d9961 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml @@ -13,5 +13,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus-operator.operator.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/deployment.yaml b/stable/prometheus-operator/templates/prometheus-operator/deployment.yaml index 86316f9653..dbb169e325 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/deployment.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/deployment.yaml @@ -1,9 +1,10 @@ +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} {{- if .Values.prometheusOperator.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "prometheus-operator.fullname" . }}-operator - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-operator {{ include "prometheus-operator.labels" . | indent 4 }} @@ -52,7 +53,7 @@ spec: {{- with $.Values.prometheusOperator.namespaces }} {{ $ns := .additional }} {{- if .releaseNamespace }} - {{- $ns = append $ns $.Release.Namespace }} + {{- $ns = append $ns $namespace }} {{- end }} - --namespaces={{ $ns | join "," }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml b/stable/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml index e51250bd37..0740412753 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml @@ -13,5 +13,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus-operator.operator.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/psp.yaml b/stable/prometheus-operator/templates/prometheus-operator/psp.yaml index 31d8849392..a48c89b99d 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/psp.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/psp.yaml @@ -3,7 +3,7 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: {{ template "prometheus-operator.fullname" . }}-operator - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-operator {{- if .Values.global.rbac.pspAnnotations }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/service.yaml b/stable/prometheus-operator/templates/prometheus-operator/service.yaml index 2a47686cda..b5d75b0fc7 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/service.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/service.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "prometheus-operator.fullname" . }}-operator - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-operator {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml b/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml index d2055c7a44..637ed3fe09 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "prometheus-operator.operator.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-operator {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml b/stable/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml index ec8d0d7e9a..dfda03ab7c 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-operator - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-operator {{ include "prometheus-operator.labels" . | indent 4 }} @@ -28,5 +28,5 @@ spec: release: {{ $.Release.Name | quote }} namespaceSelector: matchNames: - - {{ $.Release.Namespace | quote }} + - {{ printf "%s" (include "prometheus-operator.namespace" .) | quote }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml b/stable/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml index 5e19878a0d..33227dc567 100644 --- a/stable/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml +++ b/stable/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-relabel-confg - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- if .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations }} annotations: {{ toYaml .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml b/stable/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml index b495f8ad19..61ba8c0076 100644 --- a/stable/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml +++ b/stable/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-confg - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- if .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations }} annotations: {{ toYaml .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml b/stable/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml index 957b23a104..bc631fc83c 100644 --- a/stable/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml +++ b/stable/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml @@ -8,7 +8,7 @@ items: kind: PrometheusRule metadata: name: {{ template "prometheus-operator.name" $ }}-{{ $prometheusRuleName }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" $ }} {{ include "prometheus-operator.labels" $ | indent 8 }} @@ -25,7 +25,7 @@ items: kind: PrometheusRule metadata: name: {{ template "prometheus-operator.name" $ }}-{{ .name }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" $ }} {{ include "prometheus-operator.labels" $ | indent 8 }} diff --git a/stable/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml b/stable/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml index 66efb095fa..1158b3467c 100644 --- a/stable/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml +++ b/stable/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus-scrape-confg - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- if .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations }} annotations: {{ toYaml .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/clusterrolebinding.yaml b/stable/prometheus-operator/templates/prometheus/clusterrolebinding.yaml index cbae4e257b..c319523308 100644 --- a/stable/prometheus-operator/templates/prometheus/clusterrolebinding.yaml +++ b/stable/prometheus-operator/templates/prometheus/clusterrolebinding.yaml @@ -13,6 +13,6 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus/ingress.yaml b/stable/prometheus-operator/templates/prometheus/ingress.yaml index b17ec4fb60..2a9c4e6080 100644 --- a/stable/prometheus-operator/templates/prometheus/ingress.yaml +++ b/stable/prometheus-operator/templates/prometheus/ingress.yaml @@ -15,7 +15,7 @@ metadata: {{ toYaml .Values.prometheus.ingress.annotations | indent 4 }} {{- end }} name: {{ $serviceName }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-prometheus {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml b/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml index bbfab9610b..57283b221f 100644 --- a/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml +++ b/stable/prometheus-operator/templates/prometheus/ingressperreplica.yaml @@ -6,7 +6,7 @@ apiVersion: v1 kind: List metadata: name: {{ include "prometheus-operator.fullname" $ }}-prometheus-ingressperreplica - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} items: {{ range $i, $e := until $count }} - kind: Ingress @@ -17,7 +17,7 @@ items: {{ end -}} metadata: name: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ include "prometheus-operator.name" $ }}-prometheus {{ include "prometheus-operator.labels" $ | indent 8 }} diff --git a/stable/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml b/stable/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml index c0bb5995ff..2853ac73b4 100644 --- a/stable/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml +++ b/stable/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml @@ -3,7 +3,7 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-prometheus {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/podmonitors.yaml b/stable/prometheus-operator/templates/prometheus/podmonitors.yaml index a0e547e0a3..88789557ed 100644 --- a/stable/prometheus-operator/templates/prometheus/podmonitors.yaml +++ b/stable/prometheus-operator/templates/prometheus/podmonitors.yaml @@ -7,7 +7,7 @@ items: kind: PodMonitor metadata: name: {{ .name }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" $ }}-prometheus {{ include "prometheus-operator.labels" $ | indent 8 }} diff --git a/stable/prometheus-operator/templates/prometheus/prometheus.yaml b/stable/prometheus-operator/templates/prometheus/prometheus.yaml index e5443fbf20..894b346ddb 100644 --- a/stable/prometheus-operator/templates/prometheus/prometheus.yaml +++ b/stable/prometheus-operator/templates/prometheus/prometheus.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: Prometheus metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-prometheus {{ include "prometheus-operator.labels" . | indent 4 }} @@ -17,7 +17,7 @@ spec: {{- if .Values.prometheus.prometheusSpec.alertingEndpoints }} {{ toYaml .Values.prometheus.prometheusSpec.alertingEndpoints | indent 6 }} {{- else if .Values.alertmanager.enabled }} - - namespace: {{ $.Release.Namespace }} + - namespace: {{ template "prometheus-operator.namespace" . }} name: {{ template "prometheus-operator.fullname" . }}-alertmanager port: {{ .Values.alertmanager.alertmanagerSpec.portName }} {{- if .Values.alertmanager.alertmanagerSpec.routePrefix }} @@ -54,7 +54,7 @@ spec: {{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}" {{- else }} - externalUrl: http://{{ template "prometheus-operator.fullname" . }}-prometheus.{{ $.Release.Namespace }}:{{ .Values.prometheus.service.port }} + externalUrl: http://{{ template "prometheus-operator.fullname" . }}-prometheus.{{ template "prometheus-operator.namespace" . }}:{{ .Values.prometheus.service.port }} {{- end }} {{- if .Values.prometheus.prometheusSpec.nodeSelector }} nodeSelector: diff --git a/stable/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml b/stable/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml index 596273c46b..cf26f49d11 100644 --- a/stable/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml +++ b/stable/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml @@ -13,6 +13,6 @@ roleRef: subjects: - kind: ServiceAccount name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} {{- end }} diff --git a/stable/prometheus-operator/templates/prometheus/psp.yaml b/stable/prometheus-operator/templates/prometheus/psp.yaml index e31dd7da30..6a238f88b9 100644 --- a/stable/prometheus-operator/templates/prometheus/psp.yaml +++ b/stable/prometheus-operator/templates/prometheus/psp.yaml @@ -3,7 +3,7 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-prometheus {{- if .Values.global.rbac.pspAnnotations }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml index 974346dfb8..1c6db4095d 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml @@ -7,12 +7,12 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.alertmanager }} {{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }} {{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }} -{{- $namespace := .Release.Namespace }} +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml index b958a55e2d..97a9825d8d 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "etcd" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml index 9cecf35e08..4ccd9441cf 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml index 2db65338b5..4bc2cc7df5 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "k8s.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml index 8f2aa9fbfb..010d344616 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver-slos" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml index 06d6351415..1b00134e87 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml index d93547b175..0b96327635 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-general.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml index e41fc46b0b..1ff4cb076f 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-recording.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml index 53d730a43d..ec718ceffa 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-scheduler.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml index 56a1891323..6f281bcbe6 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-state-metrics" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml index f21f36c4ca..9d9fa95093 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubelet.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml index 8e64868d67..3ae09119ae 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml @@ -10,7 +10,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml index 105bd542f8..0247f5ebc5 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-resources" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml index 2d755596db..f2573966a1 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml @@ -10,7 +10,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml index f975a51636..7583a599b8 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-apiserver" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml index e758e35b0d..6214d77510 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-controller-manager" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml index ff8193d78d..bb7a283869 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-kubelet" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml index e2b84b5d95..84e3b1abd8 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-scheduler" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml index 83b348f7e4..fc455f375a 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml index b52853545a..7adf85db36 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-exporter.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml index 75e0b27916..7b6c601ba3 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-exporter" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml index 0bba952b61..b4b206d860 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-network" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml index 35a11ac52e..75ab27edf6 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml index 492966e9e1..98f2d3bc00 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml @@ -6,12 +6,12 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheusOperator }} {{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }} -{{- $namespace := .Release.Namespace }} +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml b/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml index bbd51e219f..71883f7efa 100644 --- a/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml @@ -6,12 +6,12 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheus }} {{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }} -{{- $namespace := .Release.Namespace }} +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml index f1a7400042..5444023970 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml @@ -7,12 +7,12 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack {{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.alertmanager }} {{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }} {{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }} -{{- $namespace := .Release.Namespace }} +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/etcd.yaml b/stable/prometheus-operator/templates/prometheus/rules/etcd.yaml index dedad1ab6d..6abda2d31b 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/etcd.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/etcd.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "etcd" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/general.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/general.rules.yaml index 74823b8844..d220cb3898 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/general.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/general.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml index 5f8917cee5..71c75fcc4f 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "k8s.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml index a576d56da2..5e565317b9 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml index 741f5a7bcb..09a7c754ae 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-alerting.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml index 26089fcf33..fc0f48305f 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-recording.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml index 5d52b74d88..3861fa6398 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-scheduler.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml index 41beceab02..7391f16ba3 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml @@ -8,12 +8,12 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack {{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }} {{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }} {{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }} -{{- $namespace := .Release.Namespace }} +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-absent" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml index 3e8a8b2981..fa82f0811f 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml @@ -10,7 +10,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml index cc1bee7347..ee51ebd072 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-resources" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml index 2962407fc2..715924b863 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml @@ -10,7 +10,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml index a12a3c0fa9..36a1193145 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/node-network.yaml b/stable/prometheus-operator/templates/prometheus/rules/node-network.yaml index 10e1640362..1de2a621c1 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/node-network.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/node-network.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-network" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/node-time.yaml b/stable/prometheus-operator/templates/prometheus/rules/node-time.yaml index 00b9d4b170..b53a6af2c6 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/node-time.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/node-time.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-time" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/node.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/node.rules.yaml index 8273441eab..bd2c50fe5a 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/node.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/node.rules.yaml @@ -9,7 +9,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml b/stable/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml index fa109c40db..9975be3691 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml @@ -6,12 +6,12 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheusOperator }} {{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }} -{{- $namespace := .Release.Namespace }} +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml b/stable/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml index 82f19dadea..9cd2eea08c 100644 --- a/stable/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml +++ b/stable/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml @@ -6,12 +6,12 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheus }} {{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }} -{{- $namespace := .Release.Namespace }} +{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus.rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ .Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }} {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/service.yaml b/stable/prometheus-operator/templates/prometheus/service.yaml index be9cb25938..e38b4813a7 100644 --- a/stable/prometheus-operator/templates/prometheus/service.yaml +++ b/stable/prometheus-operator/templates/prometheus/service.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-prometheus self-monitor: {{ .Values.prometheus.serviceMonitor.selfMonitor | quote }} diff --git a/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml b/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml index ba6e49e88b..273e79f6e3 100644 --- a/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-prometheus {{ include "prometheus-operator.labels" . | indent 4 }} diff --git a/stable/prometheus-operator/templates/prometheus/servicemonitor.yaml b/stable/prometheus-operator/templates/prometheus/servicemonitor.yaml index e2b6044a51..26addda30a 100644 --- a/stable/prometheus-operator/templates/prometheus/servicemonitor.yaml +++ b/stable/prometheus-operator/templates/prometheus/servicemonitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "prometheus-operator.fullname" . }}-prometheus - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" . }}-prometheus {{ include "prometheus-operator.labels" . | indent 4 }} @@ -15,7 +15,7 @@ spec: self-monitor: "true" namespaceSelector: matchNames: - - {{ $.Release.Namespace | quote }} + - {{ printf "%s" (include "prometheus-operator.namespace" .) | quote }} endpoints: - port: {{ .Values.prometheus.prometheusSpec.portName }} {{- if .Values.prometheus.serviceMonitor.interval }} diff --git a/stable/prometheus-operator/templates/prometheus/servicemonitors.yaml b/stable/prometheus-operator/templates/prometheus/servicemonitors.yaml index cdfef1a3d0..95e55d308d 100644 --- a/stable/prometheus-operator/templates/prometheus/servicemonitors.yaml +++ b/stable/prometheus-operator/templates/prometheus/servicemonitors.yaml @@ -7,7 +7,7 @@ items: kind: ServiceMonitor metadata: name: {{ .name }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ template "prometheus-operator.name" $ }}-prometheus {{ include "prometheus-operator.labels" $ | indent 8 }} diff --git a/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml b/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml index a57c0b2db3..791057b725 100644 --- a/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml +++ b/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml @@ -5,14 +5,14 @@ apiVersion: v1 kind: List metadata: name: {{ include "prometheus-operator.fullname" $ }}-prometheus-serviceperreplica - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} items: {{- range $i, $e := until $count }} - apiVersion: v1 kind: Service metadata: name: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }} - namespace: {{ $.Release.Namespace }} + namespace: {{ template "prometheus-operator.namespace" . }} labels: app: {{ include "prometheus-operator.name" $ }}-prometheus {{ include "prometheus-operator.labels" $ | indent 8 }} diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index 6ddd481633..a484b34df3 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -6,6 +6,10 @@ ## nameOverride: "" +## Override the deployment namespace +## +namespaceOverride: "" + ## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6 ## kubeTargetVersionOverride: "" @@ -474,6 +478,7 @@ alertmanager: ## grafana: enabled: true + namespaceOverride: "" ## Deploy default dashboards. ## @@ -1040,6 +1045,7 @@ kubeStateMetrics: ## Configuration for kube-state-metrics subchart ## kube-state-metrics: + namespaceOverride: "" rbac: create: true podSecurityPolicy: @@ -1085,6 +1091,7 @@ nodeExporter: ## Configuration for prometheus-node-exporter subchart ## prometheus-node-exporter: + namespaceOverride: "" podLabels: ## Add the 'node-exporter' label to be used by serviceMonitor to match standard common usage in rules and grafana dashboards ##