some cleanup

This commit is contained in:
Stavros kois
2023-01-26 16:24:35 +02:00
parent 0b84162678
commit 81aeb27bd9
4 changed files with 7 additions and 7 deletions

View File

@@ -1,20 +1,18 @@
{{/* Common labels shared across objects */}}
{{- define "ix.v1.common.labels" -}}
helm.sh/chart: {{ include "ix.v1.common.names.chart" . }}
{{ include "ix.v1.common.labels.selectorLabels" . }}
{{- include "ix.v1.common.labels.selectorLabels" . -}}
{{- if .Chart.AppVersion }}
helm-revision: {{ .Release.Revision | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "ix.v1.common.names.chart" . }}
helm-revision: {{ .Release.Revision | quote }}
{{/* Append global labels */}}
{{- include "ix.v1.common.util.labels.render" (dict "root" . "labels" .Values.global.labels) -}}
{{- end -}}
{{/* Selector labels shared across objects */}}
{{/* TODO: Check why "app" and "release" are needed (ported from the current common) */}}
{{- define "ix.v1.common.labels.selectorLabels" -}}
app.kubernetes.io/name: {{ include "ix.v1.common.names.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ include "ix.v1.common.names.name" . }}
release: {{ .Release.Name }}
{{- end -}}

View File

@@ -23,7 +23,7 @@ nameOverride applies only to the current chart
{{- $globalFullNameOverride := "" -}}
{{- if hasKey .Values "global" -}}
{{- $globalFullNameOverride = (default $globalFullNameOverride .Values.global.fullnameOverride) -}}
{{- $globalFullNameOverride = (.Values.global.fullnameOverride | default $globalFullNameOverride) -}}
{{- end -}}
{{- if or .Values.fullnameOverride $globalFullNameOverride -}}

View File

@@ -3,6 +3,7 @@
{{- define "ix.v1.common.util.annotations.render" -}}
{{- $root := .root -}}
{{- $annotations := .annotations -}}
{{- if $annotations }}
{{- range $k, $v := $annotations }}
{{ $k }}: {{ tpl $v $root | quote }}

View File

@@ -3,6 +3,7 @@
{{- define "ix.v1.common.util.labels.render" -}}
{{- $root := .root -}}
{{- $labels := .labels -}}
{{- if $labels -}}
{{- range $k, $v := $labels }}
{{ $k }}: {{ tpl $v $root | quote }}