Skip to content

Commit

Permalink
feat(kube-monitoring): adding default pmon
Browse files Browse the repository at this point in the history
services with a port metrics are getting collected now
  • Loading branch information
viennaa committed Sep 4, 2024
1 parent cda336a commit a22bf60
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kube-monitoring/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 15 additions & 0 deletions kube-monitoring/charts/templates/pmon.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand All @@ -65,4 +68,3 @@ data:
verify "there is 1 customresourcedefinition named 'alertmanagerconfigs'"
}
{{- end -}}

2 changes: 1 addition & 1 deletion kube-monitoring/plugindefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a22bf60

Please sign in to comment.