Skip to content

Commit 352cc46

Browse files
authored
Merge pull request #477 from reasonerjt/db-init-img-configurable-1.2
Make the image of the init container for database configurable - cherry pick to 1.2
2 parents 3cae02b + 7dce1fc commit 352cc46

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,12 @@ The following table lists the configurable parameters of the Harbor chart and th
253253
| `notary.affinity` | Node/Pod affinities | `{}` |
254254
| `notary.podAnnotations` | Annotations to add to the notary pod | `{}` |
255255
| `notary.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate authority, certificate and private key for notary communications. The secret must contain keys named `tls.ca`, `tls.crt` and `tls.key` that contain the CA, certificate and private key. They will be generated if not set. | |
256-
| **Database** |
257-
| `database.type` | If external database is used, set it to `external` | `internal` |
258-
| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` |
259-
| `database.internal.image.tag` | Tag for database image | `dev` |
256+
| **Database** |
257+
| `database.type` | If external database is used, set it to `external` | `internal` |
258+
| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` |
259+
| `database.internal.image.tag` | Tag for database image | `dev` |
260+
| `database.internal.initContainerImage.repository` | Repository for the init container image | `busybox` |
261+
| `database.internal.initContainerImage.tag` | Tag for the init container image | `latest` |
260262
| `database.internal.password` | The password for database | `changeit` |
261263
| `database.internal.resources` | The [resources] to allocate for container | undefined |
262264
| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` |

templates/database/database-ss.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
{{- end }}
3232
initContainers:
3333
- name: "change-permission-of-directory"
34-
image: "busybox:latest"
34+
image: {{ .Values.database.internal.initContainerImage.repository }}:{{ .Values.database.internal.initContainerImage.tag }}
3535
imagePullPolicy: {{ .Values.imagePullPolicy }}
3636
command: ["/bin/sh"]
3737
args: ["-c", "chown -R 999:999 /var/lib/postgresql/data"]

values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,10 @@ database:
472472
image:
473473
repository: goharbor/harbor-db
474474
tag: v1.9.4-dev
475+
# the image used by the init container
476+
initContainerImage:
477+
repository: busybox
478+
tag: latest
475479
# The initial superuser password for internal database
476480
password: "changeit"
477481
# resources:

0 commit comments

Comments
 (0)