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.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 "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
When a chart is using bitnami/mariadb as subchart you should use this to validate required password are not empty. It returns a shared error for all the values.
dict "secret" "mariadb-secret" "context" $
common.validations.values.postgresql.passwords
This helper will ensure required password 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
registry:
type: string
description: Docker registry where the image is located
example: docker.io
repository:
type: string
description: Repository and image name
example: bitnami/nginx
tag:
type: string
description: image tag
example: 1.16.1-debian-10-r63
pullPolicy:
type: string
description: Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
pullSecrets:
type: array
items:
type: string
description: Optionally specify an array of imagePullSecrets.
debug:
type: boolean
description: Set to true if you would like to see extra information on logs
example: false
## An instance would be:
# registry: docker.io
# repository: bitnami/nginx
# tag: 1.16.1-debian-10-r63
# pullPolicy: IfNotPresent
# debug: false
Persistence
enabled:
type: boolean
description: Whether enable persistence.
example: true
storageClass:
type: string
description: Ghost data Persistent Volume Storage Class, If set to "-", storageClassName: "" which disables dynamic provisioning.
example: "-"
accessMode:
type: string
description: Access mode for the Persistent Volume Storage.
example: ReadWriteOnce
size:
type: string
description: Size the Persistent Volume Storage.
example: 8Gi
path:
type: string
description: Path to be persisted.
example: /bitnami
## An instance would be:
# enabled: true
# storageClass: "-"
# accessMode: ReadWriteOnce
# size: 8Gi
# path: /bitnami
ExistingSecret
name:
type: string
description: Name of the existing secret.
example: mySecret
keyMapping:
description: Mapping between the expected key name and the name of the key in the existing secret.
type: object
## An instance would be:
# name: mySecret
# keyMapping:
# password: myPasswordKey
Example of use
Wh
Deploy common with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has common on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
Place the chartcommon is pinned at v0.7.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply