Skip to content

Commit 3339370

Browse files
mateuszmanderatimabbott
authored andcommitted
k8s: Set up correct secure configuration for the memcached container.
This is important for security of the container and mimics how we do it in docker-compose.
1 parent 71e98e0 commit 3339370

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

kubernetes/zulip-rc.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ spec:
3636
mountPath: /var/lib/redis
3737
- name: memcached
3838
image: memcached:alpine
39+
command:
40+
- "sh"
41+
- "-euc"
42+
- |
43+
echo 'mech_list: plain' > "$$SASL_CONF_PATH"
44+
echo "zulip@$$HOSTNAME:$$MEMCACHED_PASSWORD" > "$$MEMCACHED_SASL_PWDB"
45+
echo "zulip@localhost:$$MEMCACHED_PASSWORD" >> "$$MEMCACHED_SASL_PWDB"
46+
exec memcached -S
47+
env:
48+
- name: SASL_CONF_PATH
49+
value: "/home/memcache/memcached.conf"
50+
- name: MEMCACHED_SASL_PWDB
51+
value: "/home/memcache/memcached-sasl-db"
52+
- name: MEMCACHED_PASSWORD
53+
value: "REPLACE_WITH_SECURE_MEMCACHED_PASSWORD"
3954
resources:
4055
limits:
4156
cpu: 75m
@@ -109,6 +124,8 @@ spec:
109124
# These should match the passwords configured above
110125
- name: SECRETS_postgres_password
111126
value: "REPLACE_WITH_SECURE_POSTGRES_PASSWORD"
127+
- name: SECRETS_memcached_password
128+
value: "REPLACE_WITH_SECURE_MEMCACHED_PASSWORD"
112129
- name: SECRETS_rabbitmq_password
113130
value: "REPLACE_WITH_SECURE_RABBITMQ_PASSWORD"
114131
- name: SECRETS_redis_password

0 commit comments

Comments
 (0)