generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
{{ if .Values.ruler.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
{{- if .Values.thanos.query.annotations }} | ||
annotations: | ||
{{ toYaml .Values.thanos.query.annotations | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "plugin.labels" . | nindent 4 }} | ||
{{- include "thanos.labels" . | nindent 4 }} | ||
{{- if .Values.ruler.serviceLabels }} | ||
{{ toYaml .Values.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 | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
{{ if .Values.ruler.enabled }} | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
labels: | ||
{{- include "plugin.labels" . | nindent 4 }} | ||
{{- include "thanos.labels" . | nindent 4 }} | ||
{{- if .Values.ruler.deploymentLabels }} | ||
{{ toYaml .Values.ruler.deploymentLabels | nindent 4 }} | ||
{{- end }} | ||
name: {{ include "release.name" . }}-ruler | ||
|
||
spec: | ||
image: "{{ .Values.thanos.image.repository }}:{{ .Values.thanos.image.tag | default .Chart.AppVersion }}" | ||
paused: {{ $.Values.ruler.paused }} | ||
logLevel: {{ default "info" $.Values.ruler.logLevel }} | ||
retention: {{ $.Values.ruler.retention | quote | default true }} | ||
{{- if $.Values.rbac.create }} | ||
serviceAccountName: {{ include "release.name" . }}-ruler | ||
{{- end }} | ||
{{- if $.Values.ruler.externalPrefix }} | ||
# if externalPrefix is set, the routePrefix must also be set so that http handlers can be registered there | ||
externalPrefix: {{ $.Values.ruler.externalPrefix }} | ||
routePrefix: {{ $.Values.ruler.externalPrefix }} | ||
{{- end }} | ||
{{- if $.Values.ruler.evaluationInterval }} | ||
evaluationInterval: {{ $.Values.ruler.evaluationInterval }} | ||
{{- end }} | ||
ruleSelector: #??? | ||
matchLabels: | ||
thanos-ruler: {{ include "release.name" . }}-ruler | ||
|
||
# Select rules from all namespaces. | ||
ruleNamespaceSelector: {} | ||
|
||
# The labels to add to any alert when communicating with Alertmanager | ||
labels: | ||
region: {{ required ".Values.global.region missing" $.Values.global.region }} | ||
{{- if $.Values.ruler.externalClusterLabels.enabled }} | ||
cluster: {{ if $.Values.global.cluster }}{{ $.Values.global.cluster }}{{ else }}{{ $.Values.global.region }} | ||
{{- end }} | ||
cluster_type: {{ required ".Values.global.clusterType missing" $.Values.global.clusterType }} | ||
{{- else }} | ||
cluster: {{ required ".Values.global.region missing" $.Values.global.region }} | ||
{{- end }} | ||
alertQueryUrl: {{ $.Values.ruler.externalUrl }} # ??? | ||
{{ if required "$.Values.ruler.alertmanagers.hosts missing" $.Values.ruler.alertmanagers.hosts }} | ||
alertmanagersConfig: | ||
name: {{ include "release.name" . }}-alertmanager-config # ??? | ||
key: alertManagerConfig.yaml | ||
{{- end }} | ||
|
||
{{- if and $.Values.global.linkerd_enabled $.Values.global.linkerd_requested }} | ||
podMetadata: | ||
annotations: | ||
linkerd.io/inject: enabled | ||
{{- end }} | ||
|
||
{{ if not $.Values.ruler.queryEndpoints }} | ||
queryEndpoints: | ||
- {{ include "release.name" . }}-query:10902 #??? | ||
{{- else }} | ||
{{ toYaml $.Values.ruler.queryEndpoints | indent 4 }} | ||
{{- end }} | ||
|
||
{{- if $.Values.ruler.resources }} | ||
resources: | ||
{{ toYaml $.Values.ruler.resources | indent 4 }} | ||
{{- end }} | ||
{{- if $.Values.ruler.alertmanagers.authentication.enabled }} | ||
containers: | ||
- name: thanos-ruler | ||
volumeMounts: | ||
- mountPath: /etc/thanos/secrets/{{ include "release.name" . }}-ruler-alertmanager-sso-cert #??? | ||
name: {{ include "release.name" . }}-ruler-alertmanager-sso-cert #??? | ||
readOnly: true | ||
volumes: | ||
- name: {{ include "release.name" . }}-ruler-alertmanager-sso-cert #??? | ||
secret: | ||
secretName: {{ include "release.name" . }}-ruler-alertmanager-sso-cert #??? | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters