Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: console servicemonitor labels improved #131

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions charts/console/templates/console/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ kind: ServiceMonitor
metadata:
name: {{ include "conduktor.platform.serviceMonitorName" . }}
namespace: {{ default (include "common.names.namespace" .) .Values.platform.metrics.serviceMonitor.namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.platform.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
Comment on lines +8 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have the same label rendering issue for other resources as well ? if yes, can you include fix for other resources labels in this PR please ?

app.kubernetes.io/component: conduktor-platform
{{- if .Values.platform.metrics.serviceMonitor.labels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.platform.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.platform.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.platform.metrics.serviceMonitor.annotations .Values.commonAnnotations "context" .) | fromYaml }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
Expand Down
Loading