style: trim whitespaces before {{include}}
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
{{ include "common.metadata" (list $top) | nindent 2 }}
|
||||
{{- include "common.metadata" (list $top) | nindent 2 }}
|
||||
data: {}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -12,7 +12,7 @@ spec:
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
{{ include "common.metadata" (list $top) | nindent 2 }}
|
||||
{{- include "common.metadata" (list $top) | nindent 2 }}
|
||||
spec:
|
||||
schedule: "{{ $cronJob.schedule }}"
|
||||
{{- with $cronJob.concurrencyPolicy }}
|
||||
@ -27,10 +27,10 @@ spec:
|
||||
jobTemplate:
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "common.selectorLabels" $top | nindent 8 }}
|
||||
{{- include "common.selectorLabels" $top | nindent 8 }}
|
||||
spec:
|
||||
template:
|
||||
{{ include "common.pod.template" (list $top $pod "common.cronJob.pod") | nindent 8 }}
|
||||
{{- include "common.pod.template" (list $top $pod "common.cronJob.pod") | nindent 8 }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "common.cronJob" -}}
|
||||
|
@ -7,16 +7,16 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
{{ include "common.metadata" (list $top) | nindent 2 }}
|
||||
{{- include "common.metadata" (list $top) | nindent 2 }}
|
||||
spec:
|
||||
{{- if not $autoscaling.enabled }}
|
||||
replicas: {{ $deployment.replicaCount | default 1 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{ include "common.selectorLabels" $top | nindent 6 }}
|
||||
{{- include "common.selectorLabels" $top | nindent 6 }}
|
||||
template:
|
||||
{{ include "common.pod.template" . | nindent 4 }}
|
||||
{{- include "common.pod.template" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "common.deployment" -}}
|
||||
|
@ -6,7 +6,7 @@
|
||||
apiVersion: autoscaling/v2beta2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
{{ include "common.metadata" (list $top) | nindent 2 }}
|
||||
{{- include "common.metadata" (list $top) | nindent 2 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
|
@ -21,7 +21,7 @@ apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
{{ include "common.metadata" (append . "common.ingress.metadata") | nindent 2 }}
|
||||
{{- include "common.metadata" (append . "common.ingress.metadata") | nindent 2 }}
|
||||
spec:
|
||||
{{- if $ingress.tls }}
|
||||
tls:
|
||||
|
@ -20,7 +20,7 @@ app.kubernetes.io/name: {{ include "common.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{ define "common.metadata.tpl" -}}
|
||||
{{- define "common.metadata.tpl" -}}
|
||||
{{- $top := first . -}}
|
||||
name: {{ include "common.fullname" $top }}
|
||||
labels:
|
||||
@ -30,6 +30,6 @@ labels:
|
||||
{{- /*
|
||||
Create a standard metadata header
|
||||
*/ -}}
|
||||
{{ define "common.metadata" -}}
|
||||
{{- define "common.metadata" -}}
|
||||
{{- include "common.utils.merge" (append . "common.metadata.tpl") -}}
|
||||
{{- end -}}
|
||||
|
@ -6,7 +6,7 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
{{ include "common.metadata" (list $top) | nindent 2 }}
|
||||
{{- include "common.metadata" (list $top) | nindent 2 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
|
@ -5,7 +5,7 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
{{ include "common.metadata" (list $top) | nindent 2 }}
|
||||
{{- include "common.metadata" (list $top) | nindent 2 }}
|
||||
type: Opaque
|
||||
data: {}
|
||||
{{- end -}}
|
||||
|
@ -6,7 +6,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{ include "common.metadata" (list $top) | nindent 2 }}
|
||||
{{- include "common.metadata" (list $top) | nindent 2 }}
|
||||
spec:
|
||||
type: {{ $service.type }}
|
||||
ports:
|
||||
|
@ -14,7 +14,7 @@ annotations:
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
{{ include "common.metadata" (append . "common.serviceAccount.metadata") | nindent 2 }}
|
||||
{{- include "common.metadata" (append . "common.serviceAccount.metadata") | nindent 2 }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "common.serviceAccount" -}}
|
||||
|
@ -13,7 +13,7 @@ namespace: {{ . }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
{{ include "common.metadata" (append . "common.serviceMonitor.metadata") | nindent 2 }}
|
||||
{{- include "common.metadata" (append . "common.serviceMonitor.metadata") | nindent 2 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
|
Reference in New Issue
Block a user