mirror of
https://github.com/truenas/charts.git
synced 2026-06-18 01:26:53 +08:00
some cleanup
This commit is contained in:
@@ -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 -}}
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user