-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cld 6825 push proxy chart service monitor improvements (#441)
* [feat] push-proxies Introducing ServiceMonitor Introducing ServiceMonitor resource values and templating Ticket: https://mattermost.atlassian.net/browse/CLD-6825 Signed-off-by: phoinixgrr <[email protected]> * [chore] Bumping push-proxy helm chart --------- Signed-off-by: phoinixgrr <[email protected]>
- Loading branch information
1 parent
3245526
commit bbc71f0
Showing
3 changed files
with
65 additions
and
1 deletion.
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
43 changes: 43 additions & 0 deletions
43
charts/mattermost-push-proxy/templates/service-monitor.yaml
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,43 @@ | ||
{{- if .Values.metrics.enabled -}} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "mattermost-push-proxy.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "mattermost-push-proxy.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
helm.sh/chart: {{ include "mattermost-push-proxy.chart" . }} | ||
{{- with .Values.metrics.serviceMonitor.additionalLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
endpoints: | ||
- port: {{ .Values.service.name }} | ||
{{- if .Values.metrics.serviceMonitor.interval }} | ||
interval: {{ .Values.metrics.serviceMonitor.interval | quote }} | ||
{{- end }} | ||
{{- with .Values.metrics.serviceMonitor.metricRelabelings }} | ||
metricRelabelings: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
path: {{ .Values.metrics.serviceMonitor.path | quote }} | ||
{{- with .Values.metrics.serviceMonitor.relabelings }} | ||
relabelings: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout | quote }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.jobLabel }} | ||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }} | ||
{{- end }} | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace | quote }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/name: {{ include "mattermost-push-proxy.name" . }} | ||
{{- 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