Skip to content

Commit

Permalink
feat(falcosidekick): allow to set resources, securityContext and imag…
Browse files Browse the repository at this point in the history
…e overwrite for wait-redis initContainer

Signed-off-by: Thomas Berreis <[email protected]>
  • Loading branch information
tberreis authored and poiana committed Jul 5, 2024
1 parent bb4fc15 commit 05dd011
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
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.1

- allow to set resources, securityContext and image overwrite for wait-redis initContainer

## 0.8.0

- ugrade to Falcosidekick 2.29.0
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.0
version: 0.8.1
keywords:
- monitoring
- security
Expand Down
6 changes: 6 additions & 0 deletions charts/falcosidekick/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,12 @@ The following table lists the main configurable parameters of the Falcosidekick
| webui.ingress.hosts | list | `[{"host":"falcosidekick-ui.local","paths":[{"path":"/"}]}]` | Web UI ingress hosts configuration |
| webui.ingress.ingressClassName | string | `""` | ingress class name |
| webui.ingress.tls | list | `[]` | Web UI ingress TLS configuration |
| webui.initContainer | object | `{"image":{"registry":"docker.io","repository":"busybox","tag":1.31},"resources":{},"securityContext":{}}` | Web UI wait-redis initContainer |
| webui.initContainer.image.registry | string | `"docker.io"` | wait-redis initContainer image registry to pull from |
| webui.initContainer.image.repository | string | `"busybox"` | wait-redis initContainer image repository to pull from |
| webui.initContainer.image.tag | float | `1.31` | wait-redis initContainer image tag to pull |
| webui.initContainer.resources | object | `{}` | wait-redis initContainer resources |
| webui.initContainer.securityContext | object | `{}` | wait-redis initContainer securityContext |
| webui.loglevel | string | `"info"` | Log level ("debug", "info", "warning", "error") |
| webui.nodeSelector | object | `{}` | Web UI nodeSelector field |
| webui.podAnnotations | object | `{}` | additions annotations on the pods web UI |
Expand Down
10 changes: 9 additions & 1 deletion charts/falcosidekick/templates/deployment-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,16 @@ spec:
{{- end }}
initContainers:
- name: wait-redis
image: busybox:1.31
image: "{{ .Values.webui.initContainer.image.registry }}/{{ .Values.webui.initContainer.image.repository }}:{{ .Values.webui.initContainer.image.tag }}"
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";']
{{- if .Values.webui.initContainer.resources }}
resources:
{{- toYaml .Values.webui.initContainer.resources | nindent 12 }}
{{- end }}
{{- if .Values.webui.initContainer.securityContext }}
securityContext:
{{- toYaml .Values.webui.initContainer.securityContext | nindent 12}}
{{- end }}
containers:
- name: {{ .Chart.Name }}-ui
image: "{{ .Values.webui.image.registry }}/{{ .Values.webui.image.repository }}:{{ .Values.webui.image.tag }}"
Expand Down
14 changes: 14 additions & 0 deletions charts/falcosidekick/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,20 @@ webui:
# -- The web UI image pull policy
pullPolicy: IfNotPresent

# -- Web UI wait-redis initContainer
initContainer:
image:
# -- wait-redis initContainer image registry to pull from
registry: docker.io
# -- wait-redis initContainer image repository to pull from
repository: busybox
# -- wait-redis initContainer image tag to pull
tag: 1.31
# -- wait-redis initContainer securityContext
securityContext: {}
# -- wait-redis initContainer resources
resources: {}

# -- Web UI pod securityContext
podSecurityContext:
runAsUser: 1234
Expand Down

0 comments on commit 05dd011

Please sign in to comment.