Creating conditionals
Conditional dependencies can be created by using the condition
and tags
fields of the dependencies
map. The condition
field is used to list Boolean
values that, if present, toggle the inclusion of the dependency. Let’s explore this field first by looking at the condition-example
chart located under chapter5/examples/condition-example
:
- Observe the
Chart.yaml
file located atchapter5/examples/condition-example/Chart.yaml
:$ cat chapter5/examples/condition-example/Chart.yaml <output omitted> dependencies: - name: mariadb repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami version: 9.5.0 condition: mariadb.enabled
Notice that the last line of Chart.yaml
in the preceding snippet uses the condition: mariadb.enabled
setting. This setting allows users to set a value called mariadb.enabled
to either true
or false
. If the value...