Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ helm delete --namespace test my-application
| deployment.fluentdConfigAnnotations | object | `nil` | Configuration details for fluentdConfigurations. Only works for specific setup, see <https://medium.com/stakater/dynamic-log-processing-with-fluentd-konfigurator-and-slack-935a5de4eddb>. |
| deployment.replicas | int | `nil` | Number of replicas. |
| deployment.imagePullSecrets | list | `[]` | List of secrets to be used for pulling the images. |
| deployment.envFrom | object | `nil` | Mount environment variables from ConfigMap or Secret to the pod. See the README "Consuming environment variable in application chart" section for more details. |
| deployment.envFrom | object | `nil` | Mount environment variables from ConfigMap or Secret to the pod. Use `nameSuffix` for resources managed by this chart (name will be prefixed with application name), or `name` to reference an existing external ConfigMap or Secret not managed by this chart. See the README "Consuming environment variable in application chart" section for more details. |
| deployment.env | object | `nil` | Environment variables to be added to the pod. See the README "Consuming environment variable in application chart" section for more details. |
| deployment.volumes | object | `nil` | Volumes to be added to the pod. Key is the name of the volume. Value is the volume definition. |
| deployment.volumeMounts | object | `nil` | Mount path for Volumes. Key is the name of the volume. Value is the volume mount definition. |
Expand Down Expand Up @@ -485,6 +485,15 @@ In order to use environment variable in deployment or cronjob, you will have to

**Note:** first key after `envFrom` is just used to uniquely identify different objects in `envFrom` block. Make sure to keep it unique and relevant.

To reference an **existing external ConfigMap** not managed by this chart, use `name` instead of `nameSuffix`:

```yaml
envFrom:
external-configmap:
type: configmap
name: my-existing-configmap
```

- To get environment variable value from **Secret**

Suppose we have secret created from application chart
Expand Down Expand Up @@ -525,6 +534,15 @@ In order to use environment variable in deployment or cronjob, you will have to

**Note:** first key after `envFrom` is just used to uniquely identify different objects in `envFrom` block. Make sure to keep it unique and relevant.

To reference an **existing external Secret** not managed by this chart, use `name` instead of `nameSuffix`:

```yaml
envFrom:
external-secret:
type: secret
name: my-existing-secret
```

## Configuring probes

To disable liveness or readiness probe, set value of `enabled` to `false`.
Expand Down
18 changes: 18 additions & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ In order to use environment variable in deployment or cronjob, you will have to

**Note:** first key after `envFrom` is just used to uniquely identify different objects in `envFrom` block. Make sure to keep it unique and relevant.

To reference an **existing external ConfigMap** not managed by this chart, use `name` instead of `nameSuffix`:

```yaml
envFrom:
external-configmap:
type: configmap
name: my-existing-configmap
```

- To get environment variable value from **Secret**

Suppose we have secret created from application chart
Expand Down Expand Up @@ -142,6 +151,15 @@ In order to use environment variable in deployment or cronjob, you will have to

**Note:** first key after `envFrom` is just used to uniquely identify different objects in `envFrom` block. Make sure to keep it unique and relevant.

To reference an **existing external Secret** not managed by this chart, use `name` instead of `nameSuffix`:

```yaml
envFrom:
external-secret:
type: secret
name: my-existing-secret
```

## Configuring probes

To disable liveness or readiness probe, set value of `enabled` to `false`.
Expand Down
28 changes: 28 additions & 0 deletions application/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,34 @@ tests:
path: spec.template.spec.containers[0].envFrom[0].secretRef.optional
value: true

- it: configures envFrom with external secret not managed by chart
set:
deployment.envFrom:
external-secret:
type: secret
name: my-existing-secret
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom[0].secretRef.name
value: my-existing-secret
- equal:
path: spec.template.spec.containers[0].envFrom[0].secretRef.optional
value: false

- it: configures envFrom with external configmap not managed by chart
set:
deployment.envFrom:
external-configmap:
type: configmap
name: my-existing-configmap
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom[0].configMapRef.name
value: my-existing-configmap
- equal:
path: spec.template.spec.containers[0].envFrom[0].configMapRef.optional
value: false

- it: includes application.stakater.com/workload-class label in pod template for service selector
set:
deployment:
Expand Down
6 changes: 6 additions & 0 deletions application/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ deployment:
type: secret
nameSuffix: nonexisting
optional: true
external-secret:
type: secret
name: my-existing-secret
external-configmap:
type: configmap
name: my-existing-configmap

# Environment variables to be passed to the app container
env:
Expand Down
8 changes: 8 additions & 0 deletions application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ deployment:
imagePullSecrets: []
# - name: docker-pull
# -- (object) Mount environment variables from ConfigMap or Secret to the pod. See the README "Consuming environment variable in application chart" section for more details.
# Use `nameSuffix` for resources managed by this chart (name will be prefixed with application name),
# or `name` to reference an existing external ConfigMap or Secret not managed by this chart.
# @section -- Deployment Parameters
envFrom:
# production-cm:
Expand All @@ -204,6 +206,12 @@ deployment:
# type: secret
# nameSuffix: extra
# optional: true
# external-secret:
# type: secret
# name: my-existing-secret
# external-configmap:
# type: configmap
# name: my-existing-configmap
# -- (object) Environment variables to be added to the pod. See the README "Consuming environment variable in application chart" section for more details.
# @section -- Deployment Parameters
env:
Expand Down
Loading