Skip to content

Commit

Permalink
Update redis-ha subchart and enable haproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasmcnulty committed Jul 10, 2024
1 parent 70f0dab commit 76abe4a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 10 deletions.
8 changes: 4 additions & 4 deletions charts/odk-central/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dependencies:
- name: redis-ha
repository: https://dandydeveloper.github.io/charts
version: 4.23.0
version: 4.27.0
- name: redis-ha
repository: https://dandydeveloper.github.io/charts
version: 4.23.0
version: 4.27.0
- name: enketo
repository: file://charts/enketo
version: 0.1.0
Expand All @@ -17,5 +17,5 @@ dependencies:
- name: pyxform
repository: file://charts/pyxform
version: 0.1.0
digest: sha256:49d8d9b862ffb1acf517a7ef65fc87f10fbc8948606761364eda4f692a3dd71c
generated: "2024-01-09T13:52:08.550274-05:00"
digest: sha256:02dc6413c6e5a8a5a54cc3a47d6f3a296040d403855d8011045c5447383801a6
generated: "2024-07-10T09:46:03.904008-04:00"
4 changes: 2 additions & 2 deletions charts/odk-central/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ appVersion: "1.16.0"
dependencies:
- name: redis-ha
repository: https://dandydeveloper.github.io/charts
version: 4.23.0
version: 4.27.0
alias: enketo-redis-main
condition: enketo-redis-main.enabled
- name: redis-ha
repository: https://dandydeveloper.github.io/charts
version: 4.23.0
version: 4.27.0
alias: enketo-redis-cache
condition: enketo-redis-cache.enabled
- name: enketo
Expand Down
7 changes: 5 additions & 2 deletions charts/odk-central/charts/enketo/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,20 @@ spec:
- name: HTTPS_PORT
value: "{{ .Values.config.httpsPort }}"
- name: REDIS_MAIN_HOST
value: '{{ .Values.config.redisMainHost | default (printf "%s-enketo-redis-main" .Release.Name) }}'
value: '{{ .Values.config.redisMainHost | default (printf "%s-enketo-redis-main-haproxy" .Release.Name) }}'
- name: REDIS_MAIN_PORT
value: "{{ .Values.config.redisMainPort }}"
- name: REDIS_CACHE_HOST
value: '{{ .Values.config.redisCacheHost | default (printf "%s-enketo-redis-cache" .Release.Name) }}'
value: '{{ .Values.config.redisCacheHost | default (printf "%s-enketo-redis-cache-haproxy" .Release.Name) }}'
- name: REDIS_CACHE_PORT
value: "{{ .Values.config.redisCachePort }}"
{{- if .Values.config.debug }}
- name: DEBUG
value: "enketo*"
{{- end }}
envFrom:
- secretRef:
name: {{ include "enketo.fullname" . }}
volumeMounts:
- name: secret-volume
readOnly: true
Expand Down
11 changes: 11 additions & 0 deletions charts/odk-central/charts/enketo/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "enketo.fullname" . }}
labels:
{{- include "enketo.labels" . | nindent 4 }}
{{- with .Values.environmentVariables }}
stringData:
{{- toYaml . | nindent 2 }}
{{- end }}
type: Opaque
12 changes: 10 additions & 2 deletions charts/odk-central/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ global:

enketo-redis-main:
enabled: true
replicas: 3

replicas: 1
haproxy:
enabled: true
replicas: 3

# use emptyDir to avoid tying pods to nodes during development
# (not sure what this is used for, might be okay long-term too)
Expand All @@ -27,8 +30,11 @@ enketo-redis-main:

enketo-redis-cache:
enabled: true
replicas: 3

replicas: 1
haproxy:
enabled: true
replicas: 3

# use emptyDir to avoid tying pods to nodes during development
# (maybe okay long-term since this is just a cache?)
Expand All @@ -37,6 +43,8 @@ enketo-redis-cache:
emptyDir:
sizeLimit: 500Mi

environmentVariables:

enketo:
enabled: true

Expand Down

0 comments on commit 76abe4a

Please sign in to comment.