File tree Expand file tree Collapse file tree 8 files changed +54
-26
lines changed
charts/dependencies/templates Expand file tree Collapse file tree 8 files changed +54
-26
lines changed Original file line number Diff line number Diff line change 4545 -f environments/${ENV}/dependencies/values.yaml \
4646 --create-namespace \
4747 --set hostname=${{ vars.DOMAIN }} \
48- --set storage_type=host_path \
4948 --atomic
Original file line number Diff line number Diff line change 8484 --set hostname=${{ vars.DOMAIN }} \
8585 --create-namespace \
8686 --atomic
87+ - name : Copy secrets from dependencies into application namespace
88+ # Only redis secret for now needs to be copied
89+ run : |
90+ secrets=(
91+ "redis-opencrvs-users"
92+ )
93+ for secret in "${secrets[@]}"; do
94+ kubectl get secret $secret -n opencrvs-deps-e2e -o yaml \
95+ | sed "s#namespace: opencrvs-deps-e2e#namespace: opencrvs-${ENV}#" \
96+ | grep -vE 'resourceVersion|uid|creationTimestamp' \
97+ | kubectl apply -n opencrvs-${ENV} -f - \
98+ || echo "Secret $secret doesn't exist in opencrvs-deps-e2e namespace"
99+ done
87100 - name : " FIXME: temporary remove data-migration job due to issues"
88101 run : |
89102 kubectl delete job -n "opencrvs-${ENV}" --ignore-not-found=true data-migration || true
Original file line number Diff line number Diff line change 1212 type : choice
1313 options :
1414 - demo
15+ - dev
1516 workflow_call :
1617 inputs :
1718 environment :
Original file line number Diff line number Diff line change 1010 type : choice
1111 options :
1212 - demo
13+ - dev
1314 workflow_call :
1415 inputs :
1516 environment :
Original file line number Diff line number Diff line change 6363 {{- end }}
6464
6565{{- end }}
66+ ---
67+ apiVersion : v1
68+ kind : ConfigMap
69+ metadata :
70+ name : redis-opencrvs-conf
71+ data :
72+ redis.conf : |
73+ bind 0.0.0.0
74+ protected-mode yes
75+ port 6379
76+
77+ # path to ACL file (from the Secret mount)
78+ aclfile /usr/local/etc/redis/users.acl
6679{{- end }}
Original file line number Diff line number Diff line change @@ -30,42 +30,40 @@ spec:
3030 labels :
3131 app : redis
3232 spec :
33+ securityContext :
34+ runAsUser : 999
35+ runAsGroup : 999
36+ fsGroup : 999
3337 containers :
34- # FIXME: https://github.com/opencrvs/opencrvs-core/issues/10173
35- - image : public.ecr.aws/bitnami/ redis:8.2
38+ - image : redis:8
39+ command : ["redis-server", "/usr/local/etc/ redis/redis.conf"]
3640 name : redis
41+ {{- if .Values.redis.env }}
3742 env :
38- {{- if eq .Values.redis.auth_mode "acl" }}
39- - name : REDIS_ACLFILE
40- value : /opt/bitnami/redis/mounted-etc/users.acl
41- - name : REDIS_PASSWORD
42- value : " false"
43- {{- else if eq .Values.redis.auth_mode "password" }}
44- - name : REDIS_PASSWORD
45- valueFrom :
46- secretKeyRef :
47- name : redis-opencrvs-users
48- key : DEFAULT_REDIS_PASSWORD
49- {{- else }}
50- - name : ALLOW_EMPTY_PASSWORD
51- value : " yes"
52- {{- end }}
53-
5443 {{- include "render-env-vars" (dict "service_name" "redis" "Values" .Values) }}
44+ {{- end }}
5545 ports :
5646 - containerPort : 6379
5747 protocol : TCP
5848 {{- if eq .Values.redis.auth_mode "acl" }}
5949 volumeMounts :
60- - name : redis-opencrvs-acl
61- mountPath : /opt/bitnami/redis/mounted-etc
62- # subPath: redis-acl.conf
50+ - name : redis-conf
51+ mountPath : /usr/local/etc/redis/redis.conf
52+ subPath : redis.conf
53+ readOnly : true
54+ - name : redis-acl
55+ mountPath : /usr/local/etc/redis/users.acl
56+ subPath : users.acl
57+ readOnly : true
6358 {{- end }}
6459 restartPolicy : Always
6560 volumes :
66- {{- if eq .Values.redis.auth_mode "acl" }}
67- - name : redis-opencrvs- acl
61+ {{- if eq .Values.redis.auth_mode "acl" }}
62+ - name : redis-acl
6863 secret :
6964 secretName : redis-opencrvs-acl
70- {{- end }}
65+ - name : redis-conf
66+ configMap :
67+ name : redis-opencrvs-conf
68+ {{- end }}
7169{{- end }}
Original file line number Diff line number Diff line change @@ -17,3 +17,6 @@ postgres:
1717
1818monitoring :
1919 enabled : true
20+
21+ redis :
22+ auth_mode : acl
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ mongodb:
3131 host : mongodb-0.mongodb.opencrvs-deps-dev.svc.cluster.local
3232
3333redis :
34- auth_mode : disabled
34+ auth_mode : use_secret
3535 host : redis-0.redis.opencrvs-deps-dev.svc.cluster.local
3636
3737postgres :
You can’t perform that action at this time.
0 commit comments