Skip to content

Commit

Permalink
Create section for redis env vars in values
Browse files Browse the repository at this point in the history
Users would like to set the REDIS_PASSWORD to be read from a secret. The
current way to configure env vars does not support this so we created
another section for configuring the redis env

Signed-off-by: Noah Krause <[email protected]>
  • Loading branch information
iNoahNothing committed Jun 11, 2020
1 parent da90091 commit 1e0e1c6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This file documents all notable changes to Ambassador Helm Chart. The release
numbering uses [semantic versioning](http://semver.org).

## Next Release

- redisEnv for setting environment variables to control how Ambassador interacts with redis. See [redis environment](https://www.getambassador.io/docs/latest/topics/running/environment/#redis)

## v6.4.3

- Upgrade Ambassador to version 1.5.2: [CHANGELOG](https://github.com/datawire/ambassador/blob/master/CHANGELOG.md)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ The following tables lists the configurable parameters of the Ambassador chart a
| `licenseKey.createSecret` | Set to `false` if installing mutltiple Ambassdor Edge Stacks in a namespace. | `true` |
| `licenseKey.secretName` | Name of the secret to store Ambassador license key in. | `` |
| `redisURL` | URL of redis instance not created by the release | `""` |
| `redisEnv` | Set env vars that control how Ambassador interacts with redis. See [redis environment](https://www.getambassador.io/docs/latest/topics/running/environment/#redis) | `""` |
| `redis.create` | Create a basic redis instance with default configurations | `true` |
| `redis.annotations` | Annotations for the redis service and deployment | `""` |
| `redis.resources` | Resource requests for the redis instance | `""` |
Expand Down
5 changes: 5 additions & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,17 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{{- end -}}
{{- if .Values.redisEnv }}
{{ toYaml .Values.redisEnv | nindent 12 }}
{{- end }}
{{- if .Values.env }}
{{- range $key,$value := .Values.env }}
{{- if not (contains "REDIS" $key) }}
- name: {{ $key | upper | quote}}
value: {{ $value | quote}}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.security.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
Expand Down
10 changes: 10 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,16 @@ createDevPortalMappings: true
#
# URL of your redis instance. Defaults to redis instance created below.
redisURL:
# Ambassador has a couple of environment variables that configure how it uses redis.
# See: https://www.getambassador.io/docs/latest/topics/running/environment/#redis
# This is interpreted as a YAML dictionary so format is the same as setting directly in Kubernetes YAML
redisEnv:
# - name: REDIS_PASSWORD
# value: password
# valueFrom:
# secretKeyRef:
# name: redis-password
# key: password
# Ambassador ships with a basic redis instance. Configure the deployment with the options below.
redis:
create: true
Expand Down

0 comments on commit 1e0e1c6

Please sign in to comment.