[common] 1.6.1 (#191)

This commit is contained in:
Bernd Schörgers 2020-11-23 15:10:29 +01:00 committed by GitHub
parent 8bc2923281
commit 0c99fb1339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 17 deletions

View File

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

View File

@ -53,8 +53,10 @@ spec:
{{- with .Values.additionalContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with (include "common.controller.volumes" . | trim) }}
volumes:
{{- include "common.controller.volumes" . | trim | nindent 6 }}
{{- . | nindent 6 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}

View File

@ -58,10 +58,10 @@ spec:
{{- with .Values.additionalContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with (include "common.controller.volumes" . | trim) }}
volumes:
{{- include "common.controller.volumes" . | trim | nindent 6 }}
{{- . | nindent 6 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}

View File

@ -53,10 +53,10 @@ spec:
{{- with .Values.additionalContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with (include "common.controller.volumes" . | trim) }}
volumes:
{{- include "common.controller.volumes" . | trim | nindent 6 }}
{{- . | nindent 6 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@ -7,6 +7,7 @@ Ports included by the controller.
{{- $serviceValues := deepCopy . -}}
{{/* append the ports for the main service */}}
{{- if .enabled -}}
{{- $_ := set .port "name" (default "http" .port.name) -}}
{{- $ports = mustAppend $ports .port -}}
{{- range $_ := .additionalPorts -}}
{{/* append the additonalPorts for the main service */}}
@ -16,6 +17,7 @@ Ports included by the controller.
{{/* append the ports for each additional service */}}
{{- range $_ := .additionalServices }}
{{- if .enabled -}}
{{- $_ := set .port "name" (required "Missing port.name" .port.name) -}}
{{- $ports = mustAppend $ports .port -}}
{{- range $_ := .additionalPorts -}}
{{/* append the additonalPorts for each additional service */}}
@ -24,13 +26,14 @@ Ports included by the controller.
{{- end }}
{{- end }}
{{- end }}
{{/* export/render the list of ports */}}
{{- if $ports -}}
ports:
{{- range $_ := $ports }}
- name: {{ required "Missing port.name" .name }}
containerPort: {{ required "Missing port.port" .port }}
{{/* export/render the list of ports */}}
{{- if $ports -}}
ports:
{{- range $_ := $ports }}
- name: {{ .name }}
containerPort: {{ .port }}
protocol: {{ .protocol | default "TCP" }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}