Skip to content

Commit

Permalink
feat: make init dependencies image customizable (#1021)
Browse files Browse the repository at this point in the history
* feat: make `jwilder/dockerize` customizable

Signed-off-by: Guilhem Barthés <[email protected]>

* feat: make `postgres` customizable

Signed-off-by: Guilhem Barthés <[email protected]>

* feat: bump chart version

Signed-off-by: Guilhem Barthés <[email protected]>

* fix: default version initImages as string

Signed-off-by: Guilhem Barthés <[email protected]>

* chore: rename `initImages` values

Signed-off-by: Guilhem Barthés <[email protected]>

* fix: readme

Signed-off-by: Guilhem Barthés <[email protected]>

---------

Signed-off-by: Guilhem Barthés <[email protected]>
  • Loading branch information
guilhem-barthes authored Dec 17, 2024
1 parent 2ae74e6 commit 01bfd51
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 5 deletions.
3 changes: 3 additions & 0 deletions charts/substra-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

<!-- towncrier release notes start -->
## [26.15.0] - 2024-12-16

Bump app version to 1.0.0

## [26.14.2] - 2024-10-14

Expand Down
2 changes: 1 addition & 1 deletion charts/substra-backend/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: substra-backend
home: https://github.com/Substra
version: 26.14.2
version: 26.15.0
appVersion: 1.0.0
kubeVersion: '>= 1.19.0-0'
description: Main package for Substra
Expand Down
11 changes: 11 additions & 0 deletions charts/substra-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,17 @@ See Bitnami documentation: https://bitnami.com/stack/postgresql/helm
| `hooks.deleteComputePods.image.repository` | Image repository for the hook image | `bitnami/kubectl` |
| `hooks.deleteComputePods.image.tag` | Image tag for the hook image | `latest` |

### Images

| Name | Description | Value |
| ---------------------------------- | ----------------------------------------- | ------------------- |
| `initImages.dockerize.repository` | Dockerize image | `jwilder/dockerize` |
| `initImages.dockerize.tag` | Dockerize injector tag | `0.6.1` |
| `initImages.dockerize.registry` | The registry to pull the Dockerize image | `docker.io` |
| `initImages.postgresql.repository` | PostgreSQL image | `postgres` |
| `initImages.postgresql.tag` | PostgreSQL tag | `17` |
| `initImages.postgresql.registry` | The registry to pull the PostgreSQL image | `docker.io` |


## Usage

Expand Down
6 changes: 3 additions & 3 deletions charts/substra-backend/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ The hostname we should connect to (external is defined, otherwise integrated)
{{- define "common.waitMinIOContainer" -}}
{{- if or .Values.minio.enabled .Values.localstack.enabled }}
- name: wait-minio
image: jwilder/dockerize:0.6.1
image: {{ include "common.images.name" $.Values.initImages.dockerize }}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
Expand All @@ -257,7 +257,7 @@ The hostname we should connect to (external is defined, otherwise integrated)
{{- define "common.waitRedisInitContainer" -}}
{{- if .Values.redis.enabled }}
- name: wait-redis
image: jwilder/dockerize:0.6.1
image: {{ include "common.images.name" $.Values.initImages.dockerize }}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
Expand All @@ -274,7 +274,7 @@ The hostname we should connect to (external is defined, otherwise integrated)
*/}}
{{- define "common.waitPostgresqlInitContainer" -}}
- name: wait-postgresql
image: postgres
image: {{ include "common.images.name" $.Values.initImages.postgresql }}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
spec:
initContainers:
- name: wait-registry
image: jwilder/dockerize:0.6.1
image: {{ include "common.images.name" $.Values.initImages.dockerize }}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: false
Expand Down
18 changes: 18 additions & 0 deletions charts/substra-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1185,3 +1185,21 @@ hooks:
image:
repository: bitnami/kubectl
tag: latest

## @section Images
##
initImages:
dockerize:
## @param initImages.dockerize.repository Dockerize image
## @param initImages.dockerize.tag Dockerize injector tag
## @param initImages.dockerize.registry The registry to pull the Dockerize image
registry: docker.io
repository: jwilder/dockerize
tag: "0.6.1"
postgresql:
## @param initImages.postgresql.repository PostgreSQL image
## @param initImages.postgresql.tag PostgreSQL tag
## @param initImages.postgresql.registry The registry to pull the PostgreSQL image
registry: docker.io
repository: postgres
tag: "17"

0 comments on commit 01bfd51

Please sign in to comment.