diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 65d08ef32996..b7475e0e2b2c 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -21,7 +21,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 52.1.5 +version: 52.1.6 appVersion: v0.68.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/extension_values.yaml b/charts/kube-prometheus-stack/extension_values.yaml index ef857a1ba4ee..1c1479c3cb7b 100644 --- a/charts/kube-prometheus-stack/extension_values.yaml +++ b/charts/kube-prometheus-stack/extension_values.yaml @@ -13,6 +13,8 @@ global: prometheus: + # agentMode: true + prometheusSpec: image: registry: quay.io @@ -32,6 +34,9 @@ prometheus: resources: requests: storage: 20Gi + + # remoteWrite: + # - url: http://prometheus-k8s.kubesphere-monitoring-system.svc:9090/api/v1/receive prometheusOperator: image: diff --git a/charts/kube-prometheus-stack/templates/alertmanager/heritage-service.yaml b/charts/kube-prometheus-stack/templates/alertmanager/heritage-service.yaml deleted file mode 100644 index a46f26c29df6..000000000000 --- a/charts/kube-prometheus-stack/templates/alertmanager/heritage-service.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.alertmanager.heritageName}} -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.alertmanager.heritageName }} - namespace: {{ template "kube-prometheus-stack.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-alertmanager -{{ include "kube-prometheus-stack.labels" . | indent 4 }} -{{- if .Values.alertmanager.service.labels }} -{{ toYaml .Values.alertmanager.service.labels | indent 4 }} -{{- end }} -{{- if .Values.alertmanager.service.annotations }} - annotations: -{{ toYaml .Values.alertmanager.service.annotations | indent 4 }} -{{- end }} -spec: - ports: - - name: {{ .Values.alertmanager.alertmanagerSpec.portName }} - port: {{ .Values.alertmanager.service.port }} - targetPort: {{ .Values.alertmanager.service.targetPort }} - protocol: TCP - - name: reloader-web - port: 8080 - targetPort: reloader-web - selector: - app.kubernetes.io/name: alertmanager - alertmanager: {{ template "kube-prometheus-stack.alertmanager.crname" . }} -{{- if .Values.alertmanager.service.sessionAffinity }} - sessionAffinity: {{ .Values.alertmanager.service.sessionAffinity }} -{{- end }} - type: ClusterIP -{{- end }} diff --git a/charts/kube-prometheus-stack/templates/prometheus/heritage-service.yaml b/charts/kube-prometheus-stack/templates/prometheus/heritage-service.yaml deleted file mode 100644 index 456304eae789..000000000000 --- a/charts/kube-prometheus-stack/templates/prometheus/heritage-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if and .Values.prometheus.enabled .Values.prometheus.heritageName}} -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.prometheus.heritageName }} - namespace: {{ template "kube-prometheus-stack.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-prometheus -{{ include "kube-prometheus-stack.labels" . | indent 4 }} -{{- if .Values.prometheus.service.labels }} -{{ toYaml .Values.prometheus.service.labels | indent 4 }} -{{- end }} -{{- if .Values.prometheus.service.annotations }} - annotations: -{{ toYaml .Values.prometheus.service.annotations | indent 4 }} -{{- end }} -spec: - ports: - - name: {{ .Values.prometheus.prometheusSpec.portName }} - port: {{ .Values.prometheus.service.port }} - targetPort: {{ .Values.prometheus.service.targetPort }} - - name: reloader-web - port: 8080 - targetPort: reloader-web - {{- if .Values.prometheus.thanosIngress.enabled }} - - name: grpc - port: {{ .Values.prometheus.thanosIngress.servicePort }} - targetPort: {{ .Values.prometheus.thanosIngress.servicePort }} - {{- end }} - selector: - {{- if .Values.prometheus.agentMode }} - app.kubernetes.io/name: prometheus-agent - {{- else }} - app.kubernetes.io/name: prometheus - {{- end }} - operator.prometheus.io/name: {{ template "kube-prometheus-stack.prometheus.crname" . }} -{{- if .Values.prometheus.service.sessionAffinity }} - sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }} -{{- end }} - type: ClusterIP -{{- end }} diff --git a/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/whizard-telemetry-cluster.rules.yaml b/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/whizard-telemetry-cluster.rules.yaml index 9eded575ccd4..e54b818fe82c 100644 --- a/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/whizard-telemetry-cluster.rules.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/whizard-telemetry-cluster.rules.yaml @@ -34,11 +34,11 @@ spec: kube_pod_owner{owner_kind!~"ReplicaSet|DaemonSet|StatefulSet|Job"}, "workload", "$1", - "owner_kind" + "owner_name" ), "workload_type", "$1", - "owner_name" + "owner_kind" ) or kube_pod_owner{owner_kind=~"ReplicaSet|DaemonSet|StatefulSet|Job"} diff --git a/ks-prometheus/components/whizard-telemetry-mixin/rules/custom.libsonnet b/ks-prometheus/components/whizard-telemetry-mixin/rules/custom.libsonnet index 0577bcbe9fab..86b219e56330 100644 --- a/ks-prometheus/components/whizard-telemetry-mixin/rules/custom.libsonnet +++ b/ks-prometheus/components/whizard-telemetry-mixin/rules/custom.libsonnet @@ -31,11 +31,11 @@ kube_pod_owner{owner_kind!~"ReplicaSet|DaemonSet|StatefulSet|Job"}, "workload", "$1", - "owner_kind" + "owner_name" ), "workload_type", "$1", - "owner_name" + "owner_kind" ) or kube_pod_owner{owner_kind=~"ReplicaSet|DaemonSet|StatefulSet|Job"} diff --git a/ks-prometheus/manifests/whizard-telemetry-prometheusRule.yaml b/ks-prometheus/manifests/whizard-telemetry-prometheusRule.yaml index eb897a8ca958..a6d4a1e1e892 100644 --- a/ks-prometheus/manifests/whizard-telemetry-prometheusRule.yaml +++ b/ks-prometheus/manifests/whizard-telemetry-prometheusRule.yaml @@ -22,11 +22,11 @@ spec: kube_pod_owner{owner_kind!~"ReplicaSet|DaemonSet|StatefulSet|Job"}, "workload", "$1", - "owner_kind" + "owner_name" ), "workload_type", "$1", - "owner_name" + "owner_kind" ) or kube_pod_owner{owner_kind=~"ReplicaSet|DaemonSet|StatefulSet|Job"}