Skip to content
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

Cleanup storage section #123

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions redpanda/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ spec:
securityContext:
{{- toYaml .Values.statefulset.podSecurityContext | nindent 8 }}
initContainers:
- name: set-datadir-ownership
image: busybox:latest
command: ["/bin/sh", "-c", "chown 101:101 -R /var/lib/redpanda/data"]
volumeMounts:
- name: datadir
mountPath: /var/lib/redpanda/data
Comment on lines +60 to +65
Copy link
Contributor

@r-vasquez r-vasquez Jul 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] Is there a case where the user might want to change the default data_directory (/var/lib/redpanda/data)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think changing the default directory in a kubernetes (or helm) situation would be much less likely (than local install) since this is the container path, and this path is just a mount point for a persistent volume which could be multiple places (a completely different directory on the node, a remote storage device through some persistent storage cloud service, etc.). I can't think of a scenario right now where the customer would be using this path, unless they are connecting directly into the pod for some reason.

At the same time, this would be easy to provide as a modifiable parameter in values.yaml if we can think of a good reason to do so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It's clear to me now :)

- name: {{ template "redpanda.name" . }}-configurator
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
command: ["/bin/sh", "-c"]
Expand Down
7 changes: 1 addition & 6 deletions redpanda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,16 @@ listeners:
logLevel: info
#
# Persistence
# TODO modify to conform to https://github.com/bitnami/charts/blob/master/bitnami/kafka/values.yaml#L888
storage:
# TODO make use of enabled parameter
enabled: true
# Absolute path on host to store Redpanda's data.
# If not specified, then `emptyDir` will be used instead.
# If specified, but `persistentVolume.enabled` is `true`, then has no effect.
hostPath: ""
# If `enabled` is `true` then a PersistentVolumeClaim will be created and
# used to store Redpanda's data, otherwise `hostPath` is used.
persistentVolume:
# TODO possibly replace with storage.enabled
enabled: true
# TODO lower default size to a more reasonable size (10 - 50 Mi)
size: 100Gi
size: 3Gi
# If defined, then `storageClassName: <storageClass>`.
# If set to "-", then `storageClassName: ""`, which disables dynamic
# provisioning.
Expand Down