[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 name: common
description: Function library for k8s-at-home charts description: Function library for k8s-at-home charts
type: library type: library
version: 1.4.0 version: 1.5.0
keywords: keywords:
- k8s-at-home - k8s-at-home
- common - common

View File

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

View File

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

View File

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

View File

@ -9,7 +9,8 @@
{{- if hasKey $values "nameSuffix" -}} {{- if hasKey $values "nameSuffix" -}}
{{- $ingressName = printf "%v-%v" $ingressName $values.nameSuffix -}} {{- $ingressName = printf "%v-%v" $ingressName $values.nameSuffix -}}
{{ end -}} {{ 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" . }} apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress kind: Ingress
metadata: metadata:
@ -39,7 +40,7 @@ spec:
{{- range .paths }} {{- range .paths }}
- path: {{ .path }} - path: {{ .path }}
backend: backend:
serviceName: {{ $ingressName }} serviceName: {{ $svcName }}
servicePort: {{ $svcPort }} servicePort: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

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

View File

@ -102,8 +102,8 @@ ingress:
# - host: chart-example.local # - host: chart-example.local
# paths: # paths:
# - path: /api # - path: /api
# # Ignored if not kubeVersion >= 1.14-0 # # Ignored if not kubeVersion >= 1.14-0
# pathType: Prefix # pathType: Prefix
# tls: [] # tls: []
# # - secretName: chart-example-tls # # - secretName: chart-example-tls
# # hosts: # # hosts:
@ -141,6 +141,12 @@ additionalVolumes: []
additionalVolumeMounts: [] additionalVolumeMounts: []
nodeSelector: {}
affinity: {}
tolerations: []
addons: addons:
vpn: vpn:
enabled: false enabled: false