diff --git a/charts/manifests/Chart.yaml b/charts/manifests/Chart.yaml index 1a17a9c4..83775959 100644 --- a/charts/manifests/Chart.yaml +++ b/charts/manifests/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: manifests description: "Bedag's Manifest chart. Library full of basic kubernetes manifests." type: library -version: 0.5.0 +version: 0.5.1 icon: "https://www.bedag.ch/wGlobal/wGlobal/layout/images/logo.svg" keywords: - Bedag @@ -22,8 +22,4 @@ annotations: artifacthub.io/prerelease: "false" artifacthub.io/license: Apache-2.0 artifacthub.io/changes: | - - "[Added]: Support explicit chart.bundle template, for easier bundle declartion including documentation." - - "[Added]: Check were possible relevant YAML if it has any .Error field. Throw fail if detected." - - "[Changed]: Improved/Changed documentation with changed functionality/workflow." - - "[Fixed]: Handle empty Bundle Context causing Problems with Helm 3.5 (Function returned wrongly rendered YAML)" - - "[Removed]: Removed dedicated Values function for each manifest instead calling directly within the manifest" + - "[Fixed]: Add Overwrites to Bundle Extras" diff --git a/charts/manifests/README.md.gotmpl b/charts/manifests/README.md.gotmpl index 2a898bba..7b4be10f 100644 --- a/charts/manifests/README.md.gotmpl +++ b/charts/manifests/README.md.gotmpl @@ -15,6 +15,7 @@ This library's purpose is to have more flexibility as chart author but at the sa # Install Chart Since this chart is of type [library](https://helm.sh/docs/topics/library_charts/) it can only be used as dependency for other charts. Just add it in your chart dependencies section: +The same goes for charts which are hosted in this helm repository. Since the manifests chart has further Dependencies, you need to include it via the repository. ``` dependencies: @@ -23,13 +24,16 @@ dependencies: repository: https://bedag.github.io/helm-charts/ ``` -If the chart is within this Github helm repository, you can reference it as local dependency +To develop locally on the manifest chart you can include the dependency locally, note that you have to include all manifests dependencies also. ``` dependencies: - name: manifests version: ">=1.0.0" repository: "file://../manifests" +- name: library + version: ">=0.3.0" + repository: "https://buttahtoast.github.io/helm-charts/" ``` # Major Changes diff --git a/charts/manifests/templates/manifests/templates/_bundleExtras.tpl b/charts/manifests/templates/manifests/templates/_bundleExtras.tpl index 9183c01d..46d1db1a 100644 --- a/charts/manifests/templates/manifests/templates/_bundleExtras.tpl +++ b/charts/manifests/templates/manifests/templates/_bundleExtras.tpl @@ -16,21 +16,22 @@ limitations under the License. */}} {{- define "bedag-lib.template.bundleExtras" -}} - {{- if and $.values (include "bedag-lib.utils.intern.noYamlError" $.values) $.context (include "bedag-lib.utils.intern.noYamlError" $.context) -}} - {{- if $.values.serviceAccount }} - {{- if and $.values.serviceAccount.enabled $.values.serviceAccount.create }} ----{{- include "bedag-lib.manifest.serviceaccount" (dict "values" $.values.serviceAccount "context" $.context) | nindent 0 }} + {{- $values := mergeOverwrite (dict) (default dict .values) (default dict .overwrites) -}} + {{- if and $values (include "bedag-lib.utils.intern.noYamlError" $values) $.context (include "bedag-lib.utils.intern.noYamlError" $.context) -}} + {{- if $values.serviceAccount }} + {{- if and $values.serviceAccount.enabled $values.serviceAccount.create }} +---{{- include "bedag-lib.manifest.serviceaccount" (dict "values" $values.serviceAccount "context" $.context) | nindent 0 }} {{- end }} {{- end }} - {{- if $.values.environment }} - {{- $environment := $.values.environment }} + {{- if $values.environment }} + {{- $environment := $values.environment }} {{- if (include "bedag-lib.utils.environment.hasSecrets" $environment) }} --- apiVersion: v1 kind: Secret metadata: name: {{ include "bedag-lib.utils.common.fullname" . }}-env - labels: {{- include "lib.utils.common.labels" (dict "labels" $.values.labels "context" $.context)| nindent 4 }} + labels: {{- include "lib.utils.common.labels" (dict "labels" $values.labels "context" $.context)| nindent 4 }} type: Opaque data: {{- range $environment }}