[common] Resolve indenting issues, fixes #155 (#156)

This commit is contained in:
Bernd Schörgers 2020-11-14 14:41:05 +01:00 committed by GitHub
parent a9e5b0efd0
commit 533f78729b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 14 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: Function library for k8s-at-home charts
type: library
version: 1.4.0
version: 1.5.0
keywords:
- k8s-at-home
- common

View File

@ -53,14 +53,14 @@ spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

View File

@ -4,7 +4,6 @@
{{- /* Generate primary ingress */ -}}
{{- $ingressValues := .Values.ingress -}}
{{- $_ := set $ingressValues "svcPort" $svcPort -}}
{{- $_ := set . "ObjectValues" (dict "ingress" $ingressValues) -}}
{{- include "common.classes.ingress" . }}
@ -13,7 +12,6 @@
{{- if $extraIngress.enabled -}}
{{- print ("---") | nindent 0 -}}
{{- $ingressValues := $extraIngress -}}
{{- $_ := set $ingressValues "svcPort" $svcPort -}}
{{- if not $ingressValues.nameSuffix -}}
{{- $_ := set $ingressValues "nameSuffix" $index -}}
{{ end -}}

View File

@ -54,14 +54,14 @@ spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | indent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

View File

@ -9,7 +9,8 @@
{{- if hasKey $values "nameSuffix" -}}
{{- $ingressName = printf "%v-%v" $ingressName $values.nameSuffix -}}
{{ end -}}
{{- $svcPort := $values.svcPort -}}
{{- $svcName := $values.serviceName | default (include "common.names.fullname" .) -}}
{{- $svcPort := $values.servicePort | default $.Values.service.port.port -}}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
@ -39,7 +40,7 @@ spec:
{{- range .paths }}
- path: {{ .path }}
backend:
serviceName: {{ $ingressName }}
serviceName: {{ $svcName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}

View File

@ -3,7 +3,7 @@
{{- if .Values.common -}}
{{- $defaultValues := deepCopy .Values.common -}}
{{- $userValues := deepCopy (omit .Values "common") -}}
{{- $mergedValues := mustMerge $userValues $defaultValues -}}
{{- $mergedValues := mustMergeOverwrite $defaultValues $userValues -}}
{{- $_ := set . "Values" (deepCopy $mergedValues) -}}
{{- end }}
{{- end }}

View File

@ -141,6 +141,12 @@ additionalVolumes: []
additionalVolumeMounts: []
nodeSelector: {}
affinity: {}
tolerations: []
addons:
vpn:
enabled: false