Skip to content

Commit

Permalink
fix(thanos): Fixed service monitor job name (#944)
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Hipwell <[email protected]>
  • Loading branch information
stevehipwell authored Apr 23, 2024
1 parent a086bd8 commit 8f2eb60
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 14 deletions.
7 changes: 7 additions & 0 deletions charts/thanos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

## [UNRELEASED]

## [v1.16.5] - 2024-04-23

### Fixed

- Fixed `ServiceMonitor` job name.

## [v1.16.4] - 2024-04-22

### Added
Expand Down Expand Up @@ -474,6 +480,7 @@
RELEASE LINKS
-->
[UNRELEASED]: https://github.com/stevehipwell/helm-charts/tree/main/charts/thanos
[v1.16.5]: https://github.com/stevehipwell/helm-charts/releases/tag/thanos-1.16.5
[v1.16.4]: https://github.com/stevehipwell/helm-charts/releases/tag/thanos-1.16.4
[v1.16.3]: https://github.com/stevehipwell/helm-charts/releases/tag/thanos-1.16.3
[v1.16.2]: https://github.com/stevehipwell/helm-charts/releases/tag/thanos-1.16.2
Expand Down
6 changes: 1 addition & 5 deletions charts/thanos/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,5 @@ maintainers:
email: [email protected]
annotations:
artifacthub.io/changes: |
- kind: added
description: "Added the remote write port to the _Thanos Receive_ ingress."
- kind: changed
description: "Switched to using the port name for ingress."
- kind: fixed
description: "Fixed incorrect `ServiceMonitor` name via the `jobLabel` field."
description: "Fixed `ServiceMonitor` job name."
1 change: 1 addition & 0 deletions charts/thanos/templates/compact/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Common labels
{{- define "thanos.compact.labels" -}}
{{ include "thanos.labels" . }}
app.kubernetes.io/component: compact
app.kubernetes.io/component-instance: {{ .Release.Name }}-compact
{{- end }}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/thanos/templates/compact/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
jobLabel: app.kubernetes.io/component-instance
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
1 change: 1 addition & 0 deletions charts/thanos/templates/query-frontend/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Common labels
{{- define "thanos.queryFrontend.labels" -}}
{{ include "thanos.labels" . }}
app.kubernetes.io/component: query-frontend
app.kubernetes.io/component-instance: {{ .Release.Name }}-query-frontend
{{- end }}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/thanos/templates/query-frontend/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
jobLabel: app.kubernetes.io/component-instance
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
1 change: 1 addition & 0 deletions charts/thanos/templates/query/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Common labels
{{- define "thanos.query.labels" -}}
{{ include "thanos.labels" . }}
app.kubernetes.io/component: query
app.kubernetes.io/component-instance: {{ .Release.Name }}-query
{{- end }}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/thanos/templates/query/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
jobLabel: app.kubernetes.io/component-instance
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
1 change: 1 addition & 0 deletions charts/thanos/templates/receive-ingestor/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Common labels
{{- define "thanos.receive.ingestor.labels" -}}
{{ include "thanos.labels" . }}
app.kubernetes.io/component: receive-ingestor
app.kubernetes.io/component-instance: {{ .Release.Name }}-receive-ingestor
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
jobLabel: app.kubernetes.io/component-instance
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
1 change: 1 addition & 0 deletions charts/thanos/templates/receive-router/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Common labels
{{- define "thanos.receive.router.labels" -}}
{{ include "thanos.labels" . }}
app.kubernetes.io/component: receive-router
app.kubernetes.io/component-instance: {{ .Release.Name }}-receive-router
{{- end }}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/thanos/templates/receive-router/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
jobLabel: app.kubernetes.io/component-instance
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
3 changes: 1 addition & 2 deletions charts/thanos/templates/rule/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Common labels
{{- define "thanos.rule.labels" -}}
{{ include "thanos.labels" . }}
app.kubernetes.io/component: rule
app.kubernetes.io/component-instance: {{ .Release.Name }}-rule
{{- end }}

{{/*
Expand Down Expand Up @@ -74,5 +75,3 @@ Patch topology spread constraints
{{- include "thanos.patchLabelSelector" (merge (dict "_target" $constraint "_selectorLabelsTemplate" "thanos.rule.selectorLabels") $) }}
{{- end }}
{{- end }}


2 changes: 1 addition & 1 deletion charts/thanos/templates/rule/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
jobLabel: app.kubernetes.io/component-instance
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
1 change: 1 addition & 0 deletions charts/thanos/templates/store-gateway/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Common labels
{{- define "thanos.storeGateway.labels" -}}
{{ include "thanos.labels" . }}
app.kubernetes.io/component: store-gateway
app.kubernetes.io/component-instance: {{ .Release.Name }}-store-gateway
{{- end }}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/thanos/templates/store-gateway/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
jobLabel: app.kubernetes.io/component-instance
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down

0 comments on commit 8f2eb60

Please sign in to comment.