Skip to content

Commit

Permalink
Fix redis-availability check of the UI init-container in case externa…
Browse files Browse the repository at this point in the history
…lRedis is enabled

Signed-off-by: Dominique Burnand <[email protected]>
  • Loading branch information
jegger authored and poiana committed Jul 11, 2024
1 parent 1e11d6d commit 78aa87c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charts/falcosidekick/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ numbering uses [semantic versioning](http://semver.org).

Before release 0.1.20, the helm chart can be found in `falcosidekick` [repository](https://github.com/falcosecurity/falcosidekick/tree/master/deploy/helm/falcosidekick).

## 0.8.2

- Fix redis-availability check of the UI init-container in case externalRedis is enabled

## 0.8.1

- allow to set resources, securityContext and image overwrite for wait-redis initContainer
Expand Down
2 changes: 1 addition & 1 deletion charts/falcosidekick/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 2.29.0
description: Connect Falco to your ecosystem
icon: https://raw.githubusercontent.com/falcosecurity/falcosidekick/master/imgs/falcosidekick_color.png
name: falcosidekick
version: 0.8.1
version: 0.8.2
keywords:
- monitoring
- security
Expand Down
4 changes: 4 additions & 0 deletions charts/falcosidekick/templates/deployment-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ spec:
initContainers:
- name: wait-redis
image: "{{ .Values.webui.initContainer.image.registry }}/{{ .Values.webui.initContainer.image.repository }}:{{ .Values.webui.initContainer.image.tag }}"
{{- if .Values.webui.redis.enabled }}
command: ['sh', '-c', 'echo -e "Checking for the availability of the Redis Server"; while ! nc -z {{ include "falcosidekick.fullname" . }}-ui-redis 6379; do sleep 1; done; echo -e "Redis Server has started";']
{{- else if .Values.webui.externalRedis.enabled }}
command: ['sh', '-c', 'echo -e "Checking for the availability of the Redis Server"; while ! nc -z {{ required "External Redis is enabled. Please set the URL to the database." .Values.webui.externalRedis.url }} {{ .Values.webui.externalRedis.port | default "6379" }}; do sleep 1; done; echo -e "Redis Server has started";']
{{- end}}
{{- if .Values.webui.initContainer.resources }}
resources:
{{- toYaml .Values.webui.initContainer.resources | nindent 12 }}
Expand Down

0 comments on commit 78aa87c

Please sign in to comment.