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

Add name labels and modify runtime cfg name #12291

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions production/helm/loki/templates/admin-api/_helpers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ adminApi common labels
{{ include "loki.labels" . }}
app.kubernetes.io/component: admin-api
target: admin-api
name: admin-api
{{- end }}

{{/*
Expand All @@ -21,4 +22,5 @@ adminApi selector labels
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: admin-api
target: admin-api
name: admin-api
{{- end }}
2 changes: 2 additions & 0 deletions production/helm/loki/templates/backend/_helpers-backend.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ backend common labels
{{- define "loki.backendLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: backend
name: backend
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ backend selector labels
{{- define "loki.backendSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: backend
name: backend
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ compactor common labels
{{- define "loki.compactorLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: compactor
name: compactor
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ compactor selector labels
{{- define "loki.compactorSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: compactor
name: compactor
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ distributor common labels
{{- define "loki.distributorLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: distributor
name: distributor
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ distributor selector labels
{{- define "loki.distributorSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: distributor
name: distributor
{{- end }}

{{/*
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/templates/gateway/_helpers-gateway.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ gateway common labels
{{- define "loki.gatewayLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: gateway
name: gateway
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ gateway selector labels
{{- define "loki.gatewaySelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: gateway
name: gateway
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ index-gateway common labels
{{- define "loki.indexGatewayLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: index-gateway
name: index-gateway
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ index-gateway selector labels
{{- define "loki.indexGatewaySelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: index-gateway
name: index-gateway
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ spec:
{{- include "loki.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "loki.fullname" . }}-runtime
name: {{ template "loki.name" . }}-runtime
{{- if .Values.enterprise.enabled }}
- name: license
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ spec:
{{- include "loki.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "loki.fullname" . }}-runtime
name: {{ template "loki.name" . }}-runtime
{{- if .Values.enterprise.enabled }}
- name: license
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ spec:
{{- include "loki.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "loki.fullname" . }}-runtime
name: {{ template "loki.name" . }}-runtime
{{- if .Values.enterprise.enabled }}
- name: license
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ spec:
{{- include "loki.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "loki.fullname" . }}-runtime
name: {{ template "loki.name" . }}-runtime
Copy link
Contributor

Choose a reason for hiding this comment

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

The configmap creation isn't updated as far as I can see. So how will this match that?

Copy link
Contributor Author

@DylanGuedes DylanGuedes Mar 21, 2024

Choose a reason for hiding this comment

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

that's the issue - the configmap name is actually {{ template "loki.name" . }}-runtime. We'd have to either, modify it to be .fullname and update the other places to use .fullname, or just change these few pieces to stay as .name

Copy link
Collaborator

Choose a reason for hiding this comment

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

it looks like the runtime configmap is created with loki.name already?

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks

{{- if .Values.enterprise.enabled }}
- name: license
secret:
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/templates/loki-canary/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ canary common labels
{{- define "loki-canary.labels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: canary
name: canary
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ canary selector labels
{{- define "loki-canary.selectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: canary
name: canary
{{- end }}

{{/*
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/templates/querier/_helpers-querier.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ querier common labels
{{- define "loki.querierLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: querier
name: querier
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ querier selector labels
{{- define "loki.querierSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: querier
name: querier
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ query-frontend common labels
{{- define "loki.queryFrontendLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: query-frontend
name: query-frontend
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ query-frontend selector labels
{{- define "loki.queryFrontendSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: query-frontend
name: query-frontend
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ spec:
{{- include "loki.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "loki.fullname" . }}-runtime
name: {{ template "loki.name" . }}-runtime
{{- if .Values.enterprise.enabled }}
- name: license
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ query-scheduler common labels
{{- define "loki.querySchedulerLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: query-scheduler
name: query-scheduler
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ query-scheduler selector labels
{{- define "loki.querySchedulerSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: query-scheduler
name: query-scheduler
{{- end }}

{{/*
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/templates/read/_helpers-read.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ read common labels
{{- define "loki.readLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: read
name: read
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ read selector labels
{{- define "loki.readSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: read
name: read
{{- end }}

{{/*
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/templates/ruler/_helpers-ruler.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ruler common labels
{{- define "loki.rulerLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: ruler
name: ruler
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ ruler selector labels
{{- define "loki.rulerSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: ruler
name: ruler
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ spec:
{{- include "loki.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "loki.fullname" . }}-runtime
name: {{ template "loki.name" . }}-runtime
{{- if .Values.enterprise.enabled }}
- name: license
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ singleBinary common labels
{{- define "loki.singleBinaryLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: single-binary
name: single-binary
{{- end }}


{{/* singleBinary selector labels */}}
{{- define "loki.singleBinarySelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: single-binary
name: single-binary
{{- end }}

{{/*
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/templates/write/_helpers-write.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ write common labels
{{- define "loki.writeLabels" -}}
{{ include "loki.labels" . }}
app.kubernetes.io/component: write
name: write
{{- end }}

{{/*
Expand All @@ -19,6 +20,7 @@ write selector labels
{{- define "loki.writeSelectorLabels" -}}
{{ include "loki.selectorLabels" . }}
app.kubernetes.io/component: write
name: write
{{- end }}

{{/*
Expand Down
Loading