Skip to content

Commit

Permalink
[thanos] add thanos ruler svc for service discovery (#623)
Browse files Browse the repository at this point in the history
* add thanos ruler svc
  • Loading branch information
trouaux authored Feb 5, 2025
1 parent 3bfccae commit 7e135f8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
2 changes: 1 addition & 1 deletion thanos/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ maintainers:
name: thanos
sources:
- https://github.com/cloudoperators/greenhouse-extensions
version: 0.1.5
version: 0.1.6
# thanos-release
appVersion: v0.35.0
keywords:
Expand Down
30 changes: 30 additions & 0 deletions thanos/charts/templates/ruler/ruler-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: Service
metadata:
{{- if .Values.thanos.ruler.annotations }}
annotations:
{{ toYaml .Values.thanos.ruler.annotations | nindent 8 }}
{{- end }}
labels:
{{- include "plugin.labels" . | nindent 4 }}
{{- include "thanos.labels" . | nindent 4 }}
{{- if .Values.thanos.ruler.serviceLabels }}
{{ toYaml .Values.thanos.ruler.serviceLabels | nindent 4 }}
{{- end }}
name: {{ include "release.name" . }}-ruler
spec:
ports:
- name: grpc
port: 10901
protocol: TCP
targetPort: grpc
- name: http
port: 10902
protocol: TCP
targetPort: http
selector:
app.kubernetes.io/managed-by: {{ include "release.name" . }}
app.kubernetes.io/name: ruler
6 changes: 6 additions & 0 deletions thanos/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,18 @@ thanos:
ruler:
enabled: true

annotations:

externalPrefix: /ruler

labels:

alertLabels:

matchLabel:

serviceLabels:

alertmanagers:
enabled: true
authentication:
Expand Down
12 changes: 9 additions & 3 deletions thanos/plugindefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
helmChart:
name: thanos
repository: "oci://ghcr.io/cloudoperators/greenhouse-extensions/charts"
version: 0.1.5
version: 0.1.6
options:
- default: null
description: CLI param for Thanos Query
Expand Down Expand Up @@ -60,7 +60,7 @@ spec:
- default:
greenhouse.sap/expose: "true"
greenhouse.sap/exposeNamedPort: "http"
description: Needed for exposing Thanos to the service proxy. UI is accessible via http, exposing this particular port.
description: Needed for exposing Thanos Query to the service proxy. UI is accessible via http, exposing this particular port.
name: thanos.query.serviceLabels
required: false
type: map
Expand All @@ -84,6 +84,12 @@ spec:
name: thanos.query.web.routePrefix
required: false
type: string
- default:
greenhouse.sap/expose: "true"
description: Needed for exposing Thanos Ruler to the service proxy. UI is accessible via http, exposing this particular port.
name: thanos.ruler.serviceLabels
required: false
type: map
- default: false
description: Thanos ruler Alertmanager auth toggle
name: thanos.ruler.alertmanagers.authentication.enabled
Expand All @@ -97,4 +103,4 @@ spec:
description: TLS key for communication with Alertmanager
required: false
type: secret
version: 0.2.5
version: 0.2.6

0 comments on commit 7e135f8

Please sign in to comment.