Bitnami Common Library Chart
A Helm Library Chart for grouping common logic between bitnami charts.
TL;DR
Introduction
This chart provides a common template helpers which can be used to develop new charts using Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
Prerequisites
- Kubernetes 1.12+
- Helm 2.12+ or Helm 3.0-beta3+
Parameters
The following table lists the helpers available in the library which are scoped in different sections.
Affinities
Helper identifier |
Description |
Expected Input |
common.affinities.node.soft |
Return a soft nodeAffinity definition |
dict "key" "FOO" "values" (list "BAR" "BAZ") |
common.affinities.node.hard |
Return a hard nodeAffinity definition |
dict "key" "FOO" "values" (list "BAR" "BAZ") |
common.affinities.pod.soft |
Return a soft podAffinity/podAntiAffinity definition |
dict "component" "FOO" "context" $ |
common.affinities.pod.hard |
Return a hard podAffinity/podAntiAffinity definition |
dict "component" "FOO" "context" $ |
Capabilities
Helper identifier |
Description |
Expected Input |
common.capabilities.deployment.apiVersion |
Return the appropriate apiVersion for deployment. |
. Chart context |
common.capabilities.statefulset.apiVersion |
Return the appropriate apiVersion for statefulset. |
. Chart context |
common.capabilities.ingress.apiVersion |
Return the appropriate apiVersion for ingress. |
. Chart context |
Errors
Helper identifier |
Description |
Expected Input |
common.errors.upgrade.passwords.empty |
It will ensure required passwords are given when we are upgrading a chart. If validationErrors is not empty it will throw an error and will stop the upgrade action. |
dict "validationErrors" (list $validationError00 $validationError01) "context" $ |
Images
Helper identifier |
Description |
Expected Input |
common.images.image |
Return the proper and full image name |
dict "imageRoot" .Values.path.to.the.image "global" $ , see ImageRoot for the structure. |
common.images.pullSecrets |
Return the proper Docker Image Registry Secret Names |
dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global |
Labels
Helper identifier |
Description |
Expected Input |
common.labels.standard |
Return Kubernetes standard labels |
. Chart context |
common.labels.matchLabels |
Return the proper Docker Image Registry Secret Names |
. Chart context |
Names
Helper identifier |
Description |
Expected Inpput |
common.names.name |
Expand the name of the chart or use .Values.nameOverride |
. Chart context |
common.names.fullname |
Create a default fully qualified app name. |
. Chart context |
common.names.chart |
Chart name plus version |
. Chart context |
Secrets
Helper identifier |
Description |
Expected Input |
common.secrets.name |
Generate the name of the secret. |
dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $ see ExistingSecret for the structure. |
common.secrets.key |
Generate secret key. |
dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName" see ExistingSecret for the structure. |
Storage
Helper identifier |
Description |
Expected Input |
common.affinities.node.soft |
Return a soft nodeAffinity definition |
dict "persistence" .Values.path.to.the.persistence "global" $ , see Persistence for the structure. |
TplValues
Helper identifier |
Description |
Expected Input |
common.tplvalues.render |
Renders a value that contains template |
dict "value" .Values.path.to.the.Value "context" $ , value is the value should rendered as template, context frecuently is the chart context $ or . |
Utils
Helper identifier |
Description |
Expected Input |
common.utils.fieldToEnvVar |
Build environment variable name given a field. |
dict "field" "my-password" |
common.utils.secret.getvalue |
Print instructions to get a secret value. |
dict "secret" "secret-name" "field" "secret-value-field" "context" $ |
common.utils.getValueFromKey |
Gets a value from .Values object given its key path |
dict "key" "path.to.key" "context" $ |
Validations
Helper identifier |
Description |
Expected Input |
common.validations.values.single.empty |
Validate a value must not be empty. |
dict "valueKey" "path.to.value" "secret" "secret.name" "field" "my-password" "context" $ secret and field are optional. In case they are given, the helper will generate a how to get instruction. See ValidateValue |
common.validations.values.multiple.empty |
Validate a multiple values must not be empty. It returns a shared error for all the values. |
dict "required" (list $validateValueConf00 $validateValueConf01) "context" $ . See ValidateValue |
common.validations.values.mariadb.passwords |
This helper will ensure required password for MariaDB are not empty. It returns a shared error for all the values. |
dict "secret" "mariadb-secret" "subchart" "true" "context" $ subchart field is optional and could be true or false it depends on where you will use postgresql chart and the helper. |
common.validations.values.postgresql.passwords |
This helper will ensure required password for PostgreSQL are not empty. It returns a shared error for all the values. |
dict "secret" "postgresql-secret" "subchart" "true" "context" $ subchart field is optional and could be true or false it depends on where you will use postgresql chart and the helper. |
Warnings
Helper identifier |
Description |
Expected Input |
common.warnings.rollingTag |
Warning about using rolling tag. |
ImageRoot see ImageRoot for the structure. |
Special input schemas
ImageRoot
Persistence
ExistingSecret
Example of use
When we store sensitive data for a deployment in a secret, some times we want to give to users the possiblity of using theirs existing secrets.
ValidateValue
NOTES.txt
If we force those values to be empty we will see some alerts
Notable changes
N/A