-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set nextcloud.podSecurityContext.fsGroup
to 33
by default and allow users to configure it if needed.
#379
base: main
Are you sure you want to change the base?
Set nextcloud.podSecurityContext.fsGroup
to 33
by default and allow users to configure it if needed.
#379
Changes from all commits
22e9be8
fa070cc
b3efb79
d5a298d
2aa43df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -352,19 +352,12 @@ spec: | |
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
securityContext: | ||
# this is deprecated and will be removed in a future release - use nextcloud.podSecurityContext instead | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we drop securityContext now? And announce it as a breaking change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm ok with this |
||
{{- with .Values.securityContext }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.nextcloud.podSecurityContext }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- else }} | ||
{{- if .Values.nginx.enabled }} | ||
# Will mount configuration files as www-data (id: 82) for nextcloud | ||
fsGroup: 82 | ||
{{- else }} | ||
# Will mount configuration files as www-data (id: 33) for nextcloud | ||
fsGroup: 33 | ||
{{- end }} | ||
{{- end }}{{/* end-with podSecurityContext */}} | ||
{{- if .Values.rbac.enabled }} | ||
serviceAccountName: {{ .Values.rbac.serviceaccount.name }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,20 +192,25 @@ nextcloud: | |
# - name: nfs | ||
# mountPath: "/legacy_data" | ||
|
||
# Set securityContext parameters for the nextcloud CONTAINER only (will not affect nginx container). | ||
# For example, you may need to define runAsNonRoot directive | ||
# Set SecurityContext parameters for the nextcloud CONTAINER only (will not affect nginx container) | ||
# ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#securitycontext-v1-core | ||
securityContext: {} | ||
# runAsUser: 33 | ||
# runAsGroup: 33 | ||
# runAsNonRoot: true | ||
# readOnlyRootFilesystem: false | ||
|
||
# Set securityContext parameters for the entire pod. For example, you may need to define runAsNonRoot directive | ||
podSecurityContext: {} | ||
# runAsUser: 33 | ||
# runAsGroup: 33 | ||
# runAsNonRoot: true | ||
# readOnlyRootFilesystem: false | ||
# if using a nextcloud image with alpine as the base image, change 33 to 82 for both runAsUser and runAsGroup | ||
# runAsUser: 33 | ||
# runAsGroup: 33 | ||
# runAsNonRoot: true | ||
# allowPrivilegeEscalation: false | ||
# readOnlyRootFilesystem: false | ||
|
||
# Set podSecurityContext parameters for all containers in the nextcloud pod, defaults to fsGroup `33` | ||
# ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#podsecuritycontext-v1-core | ||
podSecurityContext: | ||
# Change to 82 if you're using an alpine base image for the nextcloud container | ||
fsGroup: 33 | ||
# runAsUser: 33 | ||
# runAsGroup: 33 | ||
# runAsNonRoot: true | ||
# readOnlyRootFilesystem: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is not part of podSecurityContext |
||
|
||
nginx: | ||
## You need to set an fpm version of the image for nextcloud if you want to use nginx! | ||
|
@@ -225,8 +230,9 @@ nginx: | |
resources: {} | ||
|
||
# Set nginx container securityContext parameters. For example, you may need to define runAsNonRoot directive | ||
# ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#securitycontext-v1-core | ||
securityContext: {} | ||
# the nginx alpine container default user is 82 | ||
# the nginx:alpine container www-data user is 82 | ||
# runAsUser: 82 | ||
# runAsGroup: 33 | ||
# runAsNonRoot: true | ||
|
@@ -534,7 +540,6 @@ metrics: | |
## | ||
labels: {} | ||
|
||
|
||
rbac: | ||
enabled: false | ||
serviceaccount: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicated with the line above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I combine the description of both? 🤔 Do you prefer we keep the parameter line of 141 or 142? (also congrats on being a collaborator now!! 🎉 )