mirror of
https://github.com/truenas/charts.git
synced 2026-06-17 07:27:44 +08:00
start some overrall docs + expand the common pipe
This commit is contained in:
@@ -1 +1 @@
|
||||
{{ include "ix.v1.common.deployment" . }}
|
||||
{{ include "ix.v1.common.loader.all" . }}
|
||||
|
||||
@@ -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
|
||||
|
||||
13
library/common/1.0.0/README.md
Normal file
13
library/common/1.0.0/README.md
Normal 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`
|
||||
9
library/common/1.0.0/templates/lib/values/_values.tpl
Normal file
9
library/common/1.0.0/templates/lib/values/_values.tpl
Normal 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 -}}
|
||||
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user