Skip to content

Commit e5b897a

Browse files
authored
Merge pull request #6 from kmala/master
feat(charts): Add helm charts for redis
2 parents 3659efb + bf58552 commit e5b897a

5 files changed

Lines changed: 99 additions & 0 deletions

File tree

charts/redis/Chart.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: redis
2+
home: https://github.com/deis/redis
3+
version: <Will be populated by the ci before publishing the chart>
4+
description: A Redis database for use inside a Kubernetes cluster.
5+
maintainers:
6+
- name: Deis Team
7+
email: engineering@deis.com
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{{- if eq .Values.global.logger_redis_location "on-cluster" }}
2+
apiVersion: extensions/v1beta1
3+
kind: Deployment
4+
metadata:
5+
name: deis-logger-redis
6+
labels:
7+
heritage: deis
8+
annotations:
9+
component.deis.io/version: {{ .Values.docker_tag }}
10+
spec:
11+
replicas: 1
12+
strategy:
13+
type: Recreate
14+
selector:
15+
matchLabels:
16+
app: deis-logger-redis
17+
template:
18+
metadata:
19+
labels:
20+
app: deis-logger-redis
21+
spec:
22+
containers:
23+
- name: deis-logger-redis
24+
image: quay.io/{{ .Values.org }}/redis:{{ .Values.docker_tag }}
25+
imagePullPolicy: {{ .Values.pull_policy }}
26+
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
27+
resources:
28+
limits:
29+
{{- if (.Values.limits_cpu) }}
30+
cpu: {{.Values.limits_cpu}}
31+
{{- end}}
32+
{{- if (.Values.limits_memory) }}
33+
memory: {{.Values.limits_memory}}
34+
{{- end}}
35+
{{- end}}
36+
ports:
37+
- containerPort: 6379
38+
volumeMounts:
39+
- name: logger-redis-creds
40+
mountPath: /var/run/secrets/deis/redis/creds
41+
volumes:
42+
- name: logger-redis-creds
43+
secret:
44+
secretName: logger-redis-creds
45+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: logger-redis-creds
5+
labels:
6+
app: deis-logger-redis
7+
heritage: deis
8+
annotations:
9+
"helm.sh/hook": pre-install
10+
data: {{ if eq .Values.global.logger_redis_location "on-cluster"}}
11+
password: {{ randAlphaNum 32 | b64enc }}{{ else if eq .Values.global.logger_redis_location "off-cluster"}}
12+
db: {{ .Values.postgres.db | b64enc }}
13+
password: {{ .Values.password | b64enc }}
14+
host: {{ .Values.postgres.host | b64enc }}
15+
port: {{ .Values.postgres.port | b64enc }}{{ end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if eq .Values.global.logger_redis_location "on-cluster" }}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: deis-logger-redis
6+
labels:
7+
heritage: helm
8+
spec:
9+
selector:
10+
app: deis-logger-redis
11+
ports:
12+
- port: 6379
13+
{{- end }}

charts/redis/values.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
org: "deisci"
2+
pull_policy: "Always"
3+
docker_tag: canary
4+
# limits_cpu: "100m"
5+
# limits_memory: "50Mi"
6+
7+
global:
8+
# Set the location of Workflow's logger-specific Redis instance
9+
#
10+
# Valid values are:
11+
# - on-cluster: Run Redis within the Kubernetes cluster
12+
# - off-cluster: Run Redis outside the Kubernetes cluster (configure in loggerRedis section)
13+
logger_redis_location: "on-cluster"
14+
15+
# Configure the following ONLY if using an off-cluster Redis instance for logger
16+
db: "0"
17+
host: "redis host"
18+
port: "redis port"
19+
password: "redis password" # "" == no password

0 commit comments

Comments
 (0)