Skip to content

Commit

Permalink
fix: parametrize readyChecker image base
Browse files Browse the repository at this point in the history
  • Loading branch information
ialejandro committed Sep 16, 2024
1 parent a920133 commit e9e9e9c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
5 changes: 4 additions & 1 deletion charts/openbas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,13 @@ helm show values openbas/openbas
| rabbitmq.enabled | bool | `true` | Enable or disable RabbitMQ subchart |
| readinessProbe | object | `{"enabled":true,"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}` | Configure readinessProbe checker </br> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes |
| readinessProbeCustom | object | `{}` | Custom readinessProbe |
| readyChecker | object | `{"enabled":true,"retries":30,"services":[{"name":"minio","port":9000},{"name":"postgresql","port":5432},{"name":"rabbitmq","port":5672}],"timeout":5}` | Enable or disable ready-checker |
| readyChecker | object | `{"enabled":true,"pullPolicy":"IfNotPresent","repository":"busybox","retries":30,"services":[{"name":"minio","port":9000},{"name":"postgresql","port":5432},{"name":"rabbitmq","port":5672}],"tag":"latest","timeout":5}` | Enable or disable ready-checker |
| readyChecker.enabled | bool | `true` | Enable or disable ready-checker |
| readyChecker.pullPolicy | string | `"IfNotPresent"` | Pull policy for the image |
| readyChecker.repository | string | `"busybox"` | Repository of the image |
| readyChecker.retries | int | `30` | Number of retries before giving up |
| readyChecker.services | list | `[{"name":"minio","port":9000},{"name":"postgresql","port":5432},{"name":"rabbitmq","port":5672}]` | List services |
| readyChecker.tag | string | `"latest"` | Overrides the image tag |
| readyChecker.timeout | int | `5` | Timeout for each check |
| replicaCount | int | `1` | Number of replicas for the service |
| resources | object | `{}` | The resources limits and requested </br> Ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
Expand Down
5 changes: 3 additions & 2 deletions charts/openbas/templates/collector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ spec:
initContainers:
- name: ready-checker-server
{{- if $.Values.global.imageRegistry }}
image: "{{ $.Values.global.imageRegistry }}/busybox"
image: "{{ $.Values.global.imageRegistry }}/{{ .readyChecker.image | default "busybox" }}:{{ .readyChecker.tag | default "latest" }}"
{{- else }}
image: busybox
image: {{ .readyChecker.repository | default "busybox" }}:{{ .readyChecker.tag | default "latest" }}
imagePullPolicy: {{ .readyChecker.pullPolicy | default "IfNotPresent" }}
{{- end }}
command:
- 'sh'
Expand Down
5 changes: 3 additions & 2 deletions charts/openbas/templates/injector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ spec:
initContainers:
- name: ready-checker-server
{{- if $.Values.global.imageRegistry }}
image: "{{ $.Values.global.imageRegistry }}/busybox"
image: "{{ $.Values.global.imageRegistry }}/{{ .readyChecker.image | default "busybox" }}:{{ .readyChecker.tag | default "latest" }}"
{{- else }}
image: busybox
image: {{ .readyChecker.repository | default "busybox" }}:{{ .readyChecker.tag | default "latest" }}
imagePullPolicy: {{ .readyChecker.pullPolicy | default "IfNotPresent" }}
{{- end }}
command:
- 'sh'
Expand Down
5 changes: 3 additions & 2 deletions charts/openbas/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ spec:
{{- range $service := .Values.readyChecker.services }}
- name: ready-checker-{{ $service.name }}
{{- if $.Values.global.imageRegistry }}
image: "{{ $.Values.global.imageRegistry }}/busybox"
image: "{{ $.Values.global.imageRegistry }}/{{ $.Values.readyChecker.repository }}:{{ $.Values.readyChecker.tag }}"
{{- else }}
image: busybox
image: {{ $.Values.readyChecker.repository }}:{{ $.Values.readyChecker.tag }}
{{- end }}
imagePullPolicy: {{ $.Values.readyChecker.pullPolicy }}
command:
- 'sh'
- '-c'
Expand Down
28 changes: 20 additions & 8 deletions charts/openbas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ startupProbeCustom: {}
readyChecker:
# -- Enable or disable ready-checker
enabled: true
# -- Repository of the image
repository: busybox
# -- Pull policy for the image
pullPolicy: IfNotPresent
# -- Overrides the image tag
tag: latest
# -- Number of retries before giving up
retries: 30
# -- Timeout for each check
Expand Down Expand Up @@ -352,10 +358,13 @@ collectors: []
# # -- Pod annotations
# podAnnotations: {}
# # -- Enable or disable ready-checker waiting server is ready
# readyChecker:
# enabled: true
# retries: 30
# timeout: 5
# readyChecker: {}
# # enabled: true
# # repository: busybox
# # pullPolicy: IfNotPresent
# # tag: latest
# # retries: 30
# # timeout: 5
# # -- Lifecycle configuration
# lifecycle: {}
# # preStop:
Expand Down Expand Up @@ -417,10 +426,13 @@ injectors: []
# # -- Pod annotations
# podAnnotations: {}
# # -- Enable or disable ready-checker waiting server is ready
# readyChecker:
# enabled: true
# retries: 30
# timeout: 5
# readyChecker: {}
# # enabled: true
# # repository: busybox
# # pullPolicy: IfNotPresent
# # tag: latest
# # retries: 30
# # timeout: 5
# # -- Lifecycle configuration
# lifecycle: {}
# # preStop:
Expand Down

0 comments on commit e9e9e9c

Please sign in to comment.