diff --git a/kube-monitoring/charts/Chart.yaml b/kube-monitoring/charts/Chart.yaml index 131f5b95..b2b00de1 100644 --- a/kube-monitoring/charts/Chart.yaml +++ b/kube-monitoring/charts/Chart.yaml @@ -8,7 +8,7 @@ maintainers: name: kube-monitoring sources: - https://github.com/cloudoperators/greenhouse-extensions -version: 0.12.2 +version: 0.13.0 # prometheus-operator app version appVersion: v0.75.1 keywords: diff --git a/kube-monitoring/charts/templates/pmon.yaml b/kube-monitoring/charts/templates/pmon.yaml new file mode 100644 index 00000000..b201d70d --- /dev/null +++ b/kube-monitoring/charts/templates/pmon.yaml @@ -0,0 +1,15 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ $.Release.Name }}-sd + labels: + plugin: {{ $.Release.Name }} +spec: + namespaceSelector: + any: true + podMetricsEndpoints: + - port: metrics + selector: + matchExpressions: + - key: foo + operator: DoesNotExist diff --git a/kube-monitoring/charts/templates/tests/test-kube-monitoring-config.yaml b/kube-monitoring/charts/templates/tests/test-kube-monitoring-config.yaml index 8e787d58..fe815566 100644 --- a/kube-monitoring/charts/templates/tests/test-kube-monitoring-config.yaml +++ b/kube-monitoring/charts/templates/tests/test-kube-monitoring-config.yaml @@ -53,6 +53,9 @@ data: @test "Verify creation of the prometheus-{{ .Release.Name }} statefulset" { verify "there is 1 statefulset named 'prometheus-{{ .Release.Name }}'" } + @test "Verify creation of the {{ .Release.Name }}-sd Podmonitor" { + verify "there is 1 podmonitor named '{{ .Release.Name }}-sd'" + } @test "Verify creation of required custom resource definitions (CRDs) for {{ .Release.Name }}" { verify "there is 1 customresourcedefinition named 'prometheuses'" @@ -65,4 +68,3 @@ data: verify "there is 1 customresourcedefinition named 'alertmanagerconfigs'" } {{- end -}} - \ No newline at end of file diff --git a/kube-monitoring/plugindefinition.yaml b/kube-monitoring/plugindefinition.yaml index 9b11068e..509bafdb 100644 --- a/kube-monitoring/plugindefinition.yaml +++ b/kube-monitoring/plugindefinition.yaml @@ -14,7 +14,7 @@ spec: helmChart: name: kube-monitoring repository: oci://ghcr.io/cloudoperators/greenhouse-extensions/charts - version: 0.12.2 + version: 0.13.0 options: - name: kubeMonitoring.prometheus.ingress.enabled description: Ingress exposes prometheus outside the cluster