start some overrall docs + expand the common pipe

This commit is contained in:
Stavros kois
2022-11-09 13:42:03 +02:00
parent 9dfb5cae07
commit 22524c613c
5 changed files with 32 additions and 2 deletions

View File

@@ -1 +1 @@
{{ include "ix.v1.common.deployment" . }}
{{ include "ix.v1.common.loader.all" . }}

View File

@@ -36,3 +36,10 @@ tests:
documentIndex: *deploymentDoc
path: metadata.name
value: RELEASE-NAME-globalOverrodeName
- it: should pass with controller disabled
set:
controller.enabled: false
asserts:
- hasDocuments:
count: 0

View File

@@ -0,0 +1,13 @@
# Common Library
## Values flow
Values are applied with this order, the last overrides the previous.
- common/values.yaml
- chart/ix-values.yaml
- chart/questions.yaml
This is so we can set some sane defaults values on the common library, but have the option
to override those when developing a new chart. And lastly, end user can override those, based
on the interface we create on the `questions.yaml`

View File

@@ -0,0 +1,9 @@
{{/* Merge the local chart values and the common chart defaults */}}
{{- define "ix.v1.common.values.init" -}}
{{- if .Values.common -}}
{{- $defaultValues := deepCopy .Values.common -}}
{{- $userValues := deepCopy (omit .Values "common") -}}
{{- $mergedValues := mustMergeOverwrite $defaultValues $userValues -}}
{{- $_ := set . "Values" (deepCopy $mergedValues) -}}
{{- end -}}
{{- end -}}

View File

@@ -1,3 +1,4 @@
{{- define "ix.v1.common.loader.init" -}}
{{- /* Merge the local chart values and the common chart defaults */ -}}
{{- include "ix.v1.common.values.init" . }}
{{- end -}}