-
Notifications
You must be signed in to change notification settings - Fork 0
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: add datadog service label value to chart #42
Conversation
image: | ||
tag: 0.1.2 | ||
|
||
datadogServiceLabel: joy-generator-chart-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bit opinionated on having datadog.
I would go with a more generic approach of having an additionalLabels
or, more specifically a podLabels
field which is a map of labels & values. This is the approach most charts use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, +1 for podLabels
chart/templates/_helpers.tpl
Outdated
@@ -34,6 +34,7 @@ Create chart name and version as used by the chart label. | |||
Common labels | |||
*/}} | |||
{{- define "joy-generator.labels" -}} | |||
tags.datadoghq.com/service: {{ .Values.datadogServiceLabel | default .Chart.Name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tags.datadoghq.com/service: {{ .Values.datadogServiceLabel | default .Chart.Name }} | |
tags.datadoghq.com/service: {{ .Values.datadogServiceLabel | default .Release.Name }} |
What do you think about using the release name here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds bueno!
59d0ef9
to
14a0adc
Compare
chart/templates/_helpers.tpl
Outdated
{{- if .Values.podLabels }} | ||
{{ toYaml .Values.podLabels }} | ||
{{- end -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check your expected file, the labels here are not added to the pod, only the meta of resources. In other words the labels were added to the deployment, but not the pod template.
This block should go below this line
{{- include "joy-generator.selectorLabels" . | nindent 8 }} |
14a0adc
to
8c43091
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Muy bien!
No description provided.