Skip to content

Commit

Permalink
Merge pull request #50 from ndustrialio/devops-495
Browse files Browse the repository at this point in the history
DEVOPS-495 fix common labels
  • Loading branch information
kalinon authored Aug 16, 2022
2 parents 81cfd92 + 3dafd47 commit 89b639c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ndustrial/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ sources:
- https://ndustrial.io/
type: library
# Please make sure that version and appVersion are always the same.
version: 0.2.14
appVersion: 0.2.14
version: 0.2.15
appVersion: 0.2.15
18 changes: 8 additions & 10 deletions ndustrial/common/templates/_labels.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ ndustrial.io/project.type: {{ .type }}
ndustrial.io/version: {{ .version }}
{{- if hasKey . "managed_by" }}
ndustrial.io/managed-by: {{ .managed_by }}
{{- end -}}
{{- end }}
{{- if hasKey . "env" }}
ndustrial.io/env: {{ .env }}
{{- end -}}
{{- end }}
{{- if hasKey . "repo" }}
ndustrial.io/repo: {{ .repo }}
{{- end -}}
{{- end }}
{{/*
# Datadog labels
*/}}
Expand All @@ -36,18 +36,16 @@ tags.datadoghq.com/version: {{ .version }}
tags.datadoghq.com/service: {{ .name }}
{{- end -}}
{{- end -}}
{{/*
# Contxt labels
*/}}

{{- if hasKey .Values "contxt" -}}
{{- with .Values.contxt -}}
{{- if hasKey . "projectId" }}
{{- if and (hasKey . "projectId") (hasKey . "serviceId") }}
contxt/project.id: {{ .projectId | quote }}
contxt/service.id: {{ .serviceId | quote }}
{{- if hasKey . "serviceType" -}}
{{- if hasKey . "serviceId" }}
contxt/service.type: {{ .serviceType }}
{{- end -}}
{{- end -}}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 89b639c

Please sign in to comment.