Skip to content

Commit 14aa802

Browse files
authored
feat(shoot-grafter): introduce metrics (#1455)
* add metrics Service and ServiceMonitor to shoot-grafter chart On-behalf-of: @SAP [email protected] * bump the version of shoot-grafter chart and plugin definition On-behalf-of: @SAP [email protected] * add capabilities check for ServiceMonitor On-behalf-of: @SAP [email protected] * separate metrics service and service monitor On-behalf-of: @SAP [email protected]
1 parent 7fe9f21 commit 14aa802

5 files changed

Lines changed: 59 additions & 3 deletions

File tree

shoot-grafter/charts/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: v2
55
description: Automatic onboarding of Gardener Shoots to Greenhouse
66
type: application
77
name: shoot-grafter
8-
version: 0.2.1
8+
version: 0.2.2
99
appVersion: "v0.2.0"
1010
keywords:
1111
- operator
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{/*
2+
SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Greenhouse contributors
3+
SPDX-License-Identifier: Apache-2.0
4+
*/}}
5+
6+
apiVersion: v1
7+
kind: Service
8+
metadata:
9+
name: shoot-grafter-metrics
10+
namespace: {{ .Release.Namespace }}
11+
labels:
12+
app: shoot-grafter
13+
spec:
14+
type: ClusterIP
15+
selector:
16+
app: shoot-grafter
17+
ports:
18+
- name: metrics
19+
port: 8080
20+
targetPort: 8080
21+
protocol: TCP
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{/*
2+
SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Greenhouse contributors
3+
SPDX-License-Identifier: Apache-2.0
4+
*/}}
5+
6+
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" }}
7+
apiVersion: monitoring.coreos.com/v1
8+
kind: ServiceMonitor
9+
metadata:
10+
name: shoot-grafter
11+
namespace: {{ .Release.Namespace }}
12+
labels:
13+
app: shoot-grafter
14+
{{- with .Values.monitoring.labels }}
15+
{{- toYaml . | nindent 4 }}
16+
{{- end }}
17+
spec:
18+
endpoints:
19+
- honorLabels: true
20+
interval: 30s
21+
port: metrics
22+
scheme: http
23+
path: /metrics
24+
namespaceSelector:
25+
matchNames:
26+
- {{ .Release.Namespace }}
27+
selector:
28+
matchLabels:
29+
app: shoot-grafter
30+
{{- end }}

shoot-grafter/charts/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
replicaCount: 1
5+
56
image:
67
registry: ghcr.io/cloudoperators
78
repository: shoot-grafter
89
pullPolicy: IfNotPresent
10+
11+
monitoring:
12+
labels:
13+
plugin: kube-monitoring

shoot-grafter/plugindefinition.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ metadata:
77
name: shoot-grafter
88
spec:
99
description: Automatic onboarding of Gardener Shoots to Greenhouse
10-
version: 0.2.1
10+
version: 0.2.2
1111
helmChart:
1212
name: shoot-grafter
1313
repository: oci://ghcr.io/cloudoperators/greenhouse-extensions/charts
14-
version: 0.2.1
14+
version: 0.2.2
1515

0 commit comments

Comments
 (0)