Skip to content

Commit

Permalink
fix(nextcloud): Make resources of initContainers for database configu…
Browse files Browse the repository at this point in the history
…rable#662
  • Loading branch information
wrenix authored Dec 5, 2024
2 parents c78a292 + 6c9625e commit 606a770
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 6.2.4
version: 6.3.0
appVersion: 30.0.2
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
4 changes: 4 additions & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ The following table lists the configurable parameters of the nextcloud chart and
| `nextcloud.extraInitContainers` | specify additional init containers | `[]` |
| `nextcloud.extraVolumes` | specify additional volumes for the NextCloud pod | `{}` |
| `nextcloud.extraVolumeMounts` | specify additional volume mounts for the NextCloud pod | `{}` |
| `nextcloud.mariaDbInitContainer.resources` | set the `resources` field of the MariaDB init container in the Nextcloud Pod. | `{}` |
| `nextcloud.mariaDbInitContainer.securityContext` | set the `securityContext` field of the MariaDB init container in the Nextcloud Pod. | `{}` |
| `nextcloud.postgreSqlInitContainer.resources` | set the `resources` field of the PostgreSQL init container in the Nextcloud Pod. | `{}` |
| `nextcloud.postgreSqlInitContainer.securityContext` | set the `securityContext` field of the PostgreSQL init container in the Nextcloud Pod. | `{}` |
| `nextcloud.securityContext` | Optional security context for the NextCloud container | `nil` |
| `nextcloud.podSecurityContext` | Optional security context for the NextCloud pod (applies to all containers in the pod) | `nil` |
| `nextcloud.postgreSqlInitContainer.securityContext` | Set postgresql initContainer securityContext parameters. | `{}` |
Expand Down
12 changes: 8 additions & 4 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,11 @@ spec:
{{- if .Values.mariadb.enabled }}
- name: mariadb-isalive
image: {{ .Values.mariadb.image.registry | default "docker.io" }}/{{ .Values.mariadb.image.repository }}:{{ .Values.mariadb.image.tag }}
{{- with .Values.nextcloud.mariaDbInitContainer.securityContext }}
{{- with .Values.nextcloud.mariaDbInitContainer }}
resources:
{{- toYaml .resources | nindent 12 }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- toYaml .securityContext | nindent 12 }}
{{- end }}
env:
- name: MYSQL_USER
Expand All @@ -317,9 +319,11 @@ spec:
{{- else if .Values.postgresql.enabled }}
- name: postgresql-isready
image: {{ .Values.postgresql.image.registry | default "docker.io" }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}
{{- with .Values.nextcloud.postgreSqlInitContainer.securityContext }}
{{- with .Values.nextcloud.postgreSqlInitContainer }}
resources:
{{- toYaml .resources | nindent 12 }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- toYaml .securityContext | nindent 12 }}
{{- end }}
env:
- name: POSTGRES_USER
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,13 @@ nextcloud:

# Settings for the MariaDB init container
mariaDbInitContainer:
resources: {}
# Set mariadb initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
securityContext: {}

# Settings for the PostgreSQL init container
postgreSqlInitContainer:
resources: {}
# Set postgresql initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
securityContext: {}

Expand Down

0 comments on commit 606a770

Please sign in to comment.