File tree Expand file tree Collapse file tree
chart/kube-flannel/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{/* Labels common to all resources */ }}
2+ {{- define " flannel.labels" -}}
3+ app: {{ .Chart.Name | quote }}
4+ tier: node
5+ {{- with .Values.global.commonLabels }}
6+ {{ toYaml . }}
7+ {{- end }}
8+ {{- end -}}
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ metadata:
44 name : kube-flannel-cfg
55 namespace : {{ .Release.Namespace }}
66 labels :
7- tier : node
8- app : flannel
9- {{- with merge .Values.flannel.configMap.labels .Values.global.commonLabels }}
7+ {{- include "flannel.labels" . | nindent 4 }}
8+ {{- with .Values.flannel.configMap.labels }}
109 {{- toYaml . | nindent 4 }}
1110 {{- end }}
1211 {{- with merge .Values.flannel.configMap.annotations .Values.global.commonAnnotations }}
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ metadata:
44 name : kube-flannel-ds
55 namespace : {{ .Release.Namespace }}
66 labels :
7- tier : node
8- app : flannel
9- {{- with merge .Values.flannel.daemonSet.labels .Values.global.commonLabels }}
7+ {{- include "flannel.labels" . | nindent 4 }}
8+ {{- with .Values.flannel.daemonSet.labels }}
109 {{- toYaml . | nindent 4 }}
1110 {{- end }}
1211 {{- with merge .Values.flannel.daemonSet.annotations .Values.global.commonAnnotations }}
@@ -16,13 +15,12 @@ metadata:
1615spec :
1716 selector :
1817 matchLabels :
19- app : flannel
18+ {{- include " flannel.labels" . | nindent 6 }}
2019 template :
2120 metadata :
2221 labels :
23- tier : node
24- app : flannel
25- {{- with merge .Values.flannel.podLabels .Values.global.commonLabels }}
22+ {{- include "flannel.labels" . | nindent 8 }}
23+ {{- with .Values.flannel.podLabels }}
2624 {{- toYaml . | nindent 8 }}
2725 {{- end }}
2826 {{- with merge .Values.flannel.podAnnotations .Values.global.commonAnnotations }}
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
33metadata :
44 name : flannel
55 labels :
6- {{- with (merge .Values.flannel.rbac.clusterRole.labels .Values.flannel.rbac.labels .Values.global.commonLabels) }}
6+ {{- include "flannel.labels" . | nindent 4 }}
7+ {{- with (merge .Values.flannel.rbac.clusterRole.labels .Values.flannel.rbac.labels) }}
78 {{- toYaml . | nindent 4 }}
89 {{- end }}
910 {{- with (merge .Values.flannel.rbac.clusterRole.annotations .Values.flannel.rbac.annotations .Values.global.commonAnnotations) }}
@@ -50,7 +51,8 @@ apiVersion: rbac.authorization.k8s.io/v1
5051metadata :
5152 name : flannel
5253 labels :
53- {{- with (merge .Values.flannel.rbac.clusterRoleBinding.labels .Values.flannel.rbac.labels .Values.global.commonLabels) }}
54+ {{- include "flannel.labels" . | nindent 4 }}
55+ {{- with (merge .Values.flannel.rbac.clusterRoleBinding.labels .Values.flannel.rbac.labels) }}
5456 {{- toYaml . | nindent 4 }}
5557 {{- end }}
5658 {{- with (merge .Values.flannel.rbac.clusterRoleBinding.annotations .Values.flannel.rbac.annotations .Values.global.commonAnnotations) }}
Original file line number Diff line number Diff line change @@ -3,10 +3,11 @@ kind: ServiceAccount
33metadata :
44 name : flannel
55 namespace : {{ .Release.Namespace }}
6- {{- with merge .Values.flannel.serviceAccount.labels .Values.global.commonLabels }}
76 labels :
7+ {{- include "flannel.labels" . | nindent 4 }}
8+ {{- with .Values.flannel.serviceAccount.labels }}
89 {{- toYaml . | nindent 4 }}
9- {{- end }}
10+ {{- end }}
1011 {{- with merge .Values.flannel.serviceAccount.annotations .Values.global.commonAnnotations }}
1112 annotations :
1213 {{- toYaml . | nindent 4 }}
You can’t perform that action at this time.
0 commit comments