-
Notifications
You must be signed in to change notification settings - Fork 149
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
Add custom init containers user can add #424
Conversation
ee7e336
to
bcebac2
Compare
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.
This is looking really good. A couple questions
@@ -339,6 +347,9 @@ spec: | |||
{{- else }} | |||
emptyDir: {} | |||
{{- end }} | |||
{{ with .Values.statefulset.volumes }} |
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.
Would it make more sense to have a different top-level value for volume mounts inside the statefulset? I can imagine that users might want to add a volume not used in an initContainer
, wdyt? With the current setup a user could only ever define volumes that are also used in an init container.
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.
I have added the test cases for all the scenarios as well
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.
Okay. Got it. You want to move the volumeMounts outside. Done.
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.
Do you think it's ok for all init containers to mount all extra dirs? I guess there is no harm
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.
Yes, I think it is ok. we don't want to over complicate things.
build/templates/values.yaml
Outdated
# - "sh" | ||
# - "-c" | ||
# - "curl -s -H \"Metadata:true\" --noproxy \"*\" \"http://169.254.169.254/metadata/instance?api-version=2021-02-01\" | jq '.' > /metadata/instance_metadata.json" | ||
# volumeMounts: |
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.
I would add a comment here that volume mounts are reused in the main crdb container again.
@@ -263,6 +266,11 @@ spec: | |||
{{- end }} | |||
protocol: TCP | |||
volumeMounts: | |||
{{ range .Values.statefulset.initContainers }} |
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.
/nit but I would add this stanza to the bottom of the volumeMounts
section just so we don't obscure the datadir
and certs
f7e0e14
to
86822f7
Compare
85ed46c
to
e5189f8
Compare
e5189f8
to
423ee65
Compare
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.
LGTM
@@ -339,6 +347,9 @@ spec: | |||
{{- else }} | |||
emptyDir: {} | |||
{{- end }} | |||
{{ with .Values.statefulset.volumes }} |
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.
Do you think it's ok for all init containers to mount all extra dirs? I guess there is no harm
Fixes #422