diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 5480d3cd1d..77e998c7af 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 7.4.1 +version: 7.4.2 appVersion: 2.5.0 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/templates/alertmanager-networkpolicy.yaml b/stable/prometheus/templates/alertmanager-networkpolicy.yaml index 9f5a7cae25..eb95db6ec7 100644 --- a/stable/prometheus/templates/alertmanager-networkpolicy.yaml +++ b/stable/prometheus/templates/alertmanager-networkpolicy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.networkPolicy.enabled }} +{{- if and .Values.alertmanager.enabled .Values.networkPolicy.enabled -}} apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} kind: NetworkPolicy metadata: @@ -23,4 +23,4 @@ spec: component: "{{ .Values.server.name }}" - ports: - port: 9093 -{{- end }} +{{- end -}} diff --git a/stable/prometheus/templates/alertmanager-serviceaccount.yaml b/stable/prometheus/templates/alertmanager-serviceaccount.yaml index 3194374873..26164045a6 100644 --- a/stable/prometheus/templates/alertmanager-serviceaccount.yaml +++ b/stable/prometheus/templates/alertmanager-serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceAccounts.alertmanager.create }} +{{- if and .Values.alertmanager.enabled .Values.serviceAccounts.alertmanager.create -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -9,4 +9,4 @@ metadata: heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "prometheus.serviceAccountName.alertmanager" . }} -{{- end }} +{{- end -}} diff --git a/stable/prometheus/templates/kube-state-metrics-clusterrole.yaml b/stable/prometheus/templates/kube-state-metrics-clusterrole.yaml index 86f46ef825..23f9787294 100644 --- a/stable/prometheus/templates/kube-state-metrics-clusterrole.yaml +++ b/stable/prometheus/templates/kube-state-metrics-clusterrole.yaml @@ -1,4 +1,4 @@ -{{- if .Values.rbac.create }} +{{- if and .Values.kubeStateMetrics.enabled .Values.rbac.create -}} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: diff --git a/stable/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml b/stable/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml index 00bf8d835e..45450476e6 100644 --- a/stable/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml +++ b/stable/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml @@ -1,4 +1,4 @@ -{{- if .Values.rbac.create }} +{{- if and .Values.kubeStateMetrics.enabled .Values.rbac.create -}} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: @@ -17,4 +17,4 @@ roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: {{ template "prometheus.kubeStateMetrics.fullname" . }} -{{- end }} +{{- end -}} diff --git a/stable/prometheus/templates/kube-state-metrics-networkpolicy.yaml b/stable/prometheus/templates/kube-state-metrics-networkpolicy.yaml index 3fc62e2007..7336d698df 100644 --- a/stable/prometheus/templates/kube-state-metrics-networkpolicy.yaml +++ b/stable/prometheus/templates/kube-state-metrics-networkpolicy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.networkPolicy.enabled }} +{{- if and .Values.kubeStateMetrics.enabled .Values.networkPolicy.enabled -}} apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} kind: NetworkPolicy metadata: @@ -23,4 +23,4 @@ spec: component: "{{ .Values.server.name }}" - ports: - port: 8080 -{{- end }} +{{- end -}} diff --git a/stable/prometheus/templates/kube-state-metrics-serviceaccount.yaml b/stable/prometheus/templates/kube-state-metrics-serviceaccount.yaml index 871a87566c..0a0748b330 100644 --- a/stable/prometheus/templates/kube-state-metrics-serviceaccount.yaml +++ b/stable/prometheus/templates/kube-state-metrics-serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceAccounts.kubeStateMetrics.create }} +{{- if and .Values.kubeStateMetrics.enabled .Values.serviceAccounts.kubeStateMetrics.create -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -9,4 +9,4 @@ metadata: heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }} -{{- end }} +{{- end -}} diff --git a/stable/prometheus/templates/kube-state-metrics-svc.yaml b/stable/prometheus/templates/kube-state-metrics-svc.yaml index e11fa06a40..c5be761ed6 100644 --- a/stable/prometheus/templates/kube-state-metrics-svc.yaml +++ b/stable/prometheus/templates/kube-state-metrics-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.kubeStateMetrics.enabled -}} +{{- if and .Values.kubeStateMetrics.enabled .Values.kubeStateMetrics.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/stable/prometheus/templates/node-exporter-podsecuritypolicy.yaml b/stable/prometheus/templates/node-exporter-podsecuritypolicy.yaml index dce5cb1fef..fe81e72aab 100644 --- a/stable/prometheus/templates/node-exporter-podsecuritypolicy.yaml +++ b/stable/prometheus/templates/node-exporter-podsecuritypolicy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.rbac.create }} +{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} {{- if .Values.nodeExporter.podSecurityPolicy.enabled }} apiVersion: extensions/v1beta1 kind: PodSecurityPolicy diff --git a/stable/prometheus/templates/node-exporter-role.yaml b/stable/prometheus/templates/node-exporter-role.yaml index 4c34acf6e4..c8b844433a 100644 --- a/stable/prometheus/templates/node-exporter-role.yaml +++ b/stable/prometheus/templates/node-exporter-role.yaml @@ -1,4 +1,4 @@ -{{- if .Values.rbac.create }} +{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} {{- if .Values.nodeExporter.podSecurityPolicy.enabled }} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: Role diff --git a/stable/prometheus/templates/node-exporter-rolebinding.yaml b/stable/prometheus/templates/node-exporter-rolebinding.yaml index c986b029aa..9b86968770 100644 --- a/stable/prometheus/templates/node-exporter-rolebinding.yaml +++ b/stable/prometheus/templates/node-exporter-rolebinding.yaml @@ -1,4 +1,4 @@ -{{- if .Values.rbac.create }} +{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} {{- if .Values.nodeExporter.podSecurityPolicy.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/stable/prometheus/templates/node-exporter-serviceaccount.yaml b/stable/prometheus/templates/node-exporter-serviceaccount.yaml index da45088654..f1c04e3e41 100644 --- a/stable/prometheus/templates/node-exporter-serviceaccount.yaml +++ b/stable/prometheus/templates/node-exporter-serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceAccounts.nodeExporter.create }} +{{- if and .Values.nodeExporter.enabled .Values.serviceAccounts.nodeExporter.create -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -9,4 +9,4 @@ metadata: heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "prometheus.serviceAccountName.nodeExporter" . }} -{{- end }} +{{- end -}} diff --git a/stable/prometheus/templates/pushgateway-serviceaccount.yaml b/stable/prometheus/templates/pushgateway-serviceaccount.yaml index dec1377794..08e963cceb 100644 --- a/stable/prometheus/templates/pushgateway-serviceaccount.yaml +++ b/stable/prometheus/templates/pushgateway-serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if .Values.serviceAccounts.pushgateway.create }} +{{- if and .Values.pushgateway.enabled .Values.serviceAccounts.pushgateway.create -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -9,4 +9,4 @@ metadata: heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "prometheus.serviceAccountName.pushgateway" . }} -{{- end }} +{{- end -}}