Add bitnami style podAnnotations
This commit is contained in:
		
							parent
							
								
									98f6e139ee
								
							
						
					
					
						commit
						95717ec228
					
				
					 6 changed files with 28 additions and 0 deletions
				
			
		
							
								
								
									
										12
									
								
								templates/_tplvalues.tpl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								templates/_tplvalues.tpl
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
{{/*
 | 
			
		||||
Renders a value that contains template.
 | 
			
		||||
Usage:
 | 
			
		||||
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
 | 
			
		||||
*/}}
 | 
			
		||||
{{- define "common.tplvalues.render" -}}
 | 
			
		||||
    {{- if typeIs "string" .value }}
 | 
			
		||||
        {{- tpl .value .context }}
 | 
			
		||||
    {{- else }}
 | 
			
		||||
        {{- tpl (.value | toYaml) .context }}
 | 
			
		||||
    {{- end }}
 | 
			
		||||
{{- end -}}
 | 
			
		||||
| 
						 | 
				
			
			@ -19,6 +19,9 @@ spec:
 | 
			
		|||
        checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
 | 
			
		||||
        checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
 | 
			
		||||
        tag: "{{ .Values.image.tag }}"
 | 
			
		||||
        {{- if .Values.beat.podAnnotations }}
 | 
			
		||||
        {{- include "common.tplvalues.render" ( dict "value" .Values.beat.podAnnotations "context" $ ) | nindent 8 }}
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      labels:
 | 
			
		||||
        {{- include "django.selectorLabels" . | nindent 8 }}
 | 
			
		||||
        app.kubernetes.io/component: beat
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,9 @@ spec:
 | 
			
		|||
        checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
 | 
			
		||||
        checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
 | 
			
		||||
        tag: "{{ .Values.image.tag }}"
 | 
			
		||||
        {{- if .Values.flower.podAnnotations }}
 | 
			
		||||
        {{- include "common.tplvalues.render" ( dict "value" .Values.flower.podAnnotations "context" $ ) | nindent 8 }}
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      labels:
 | 
			
		||||
        {{- include "django.selectorLabels" . | nindent 8 }}
 | 
			
		||||
        app.kubernetes.io/component: flower
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,9 @@ spec:
 | 
			
		|||
        checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
 | 
			
		||||
        checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
 | 
			
		||||
        tag: "{{ .Values.image.tag }}"
 | 
			
		||||
        {{- if .Values.web.podAnnotations }}
 | 
			
		||||
        {{- include "common.tplvalues.render" ( dict "value" .Values.web.podAnnotations "context" $ ) | nindent 8 }}
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      labels:
 | 
			
		||||
        {{- include "django.selectorLabels" . | nindent 8 }}
 | 
			
		||||
        app.kubernetes.io/component: web
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,9 @@ spec:
 | 
			
		|||
        checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
 | 
			
		||||
        checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
 | 
			
		||||
        tag: "{{ .Values.image.tag }}"
 | 
			
		||||
        {{- if .Values.worker.podAnnotations }}
 | 
			
		||||
        {{- include "common.tplvalues.render" ( dict "value" .Values.worker.podAnnotations "context" $ ) | nindent 8 }}
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      labels:
 | 
			
		||||
        {{- include "django.selectorLabels" . | nindent 8 }}
 | 
			
		||||
        app.kubernetes.io/component: worker
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue