-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix(pvc): split PVC configuration between Deployments #224
base: main
Are you sure you want to change the base?
Changes from 1 commit
1c3eb11
9a81375
1b21348
dda0cf2
123367e
98aef90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,12 +85,12 @@ spec: | |
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
{{- if ((.Values.pvc).enabled) }} | ||
{{- if ((.Values.db.resources.pvc).enabled) }} | ||
- name: {{ .Chart.Name }}-db | ||
persistentVolumeClaim: | ||
claimName: {{ .Release.Name }}-db | ||
{{- end }} | ||
{{- if not ((.Values.pvc).enabled) }} | ||
{{- if not ((.Values.db.resources.pvc).enabled) }} | ||
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 guess we can use |
||
- name: {{ .Chart.Name }}-db | ||
emptyDir: {} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -99,12 +99,12 @@ spec: | |||||
{{- toYaml . | nindent 8 }} | ||||||
{{- end }} | ||||||
volumes: | ||||||
{{- if ((.Values.pvc).enabled) }} | ||||||
{{- if ((.Values.storage.resources.pvc).enabled) }} | ||||||
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.
Suggested change
|
||||||
- name: {{ .Chart.Name }}-storage | ||||||
persistentVolumeClaim: | ||||||
claimName: {{ .Release.Name }}-storage | ||||||
{{- end }} | ||||||
{{- if not ((.Values.pvc).enabled) }} | ||||||
{{- if not ((.Values.storage.resources.pvc).enabled) }} | ||||||
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. We can also use |
||||||
- name: {{ .Chart.Name }}-storage | ||||||
emptyDir: {} | ||||||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,6 +145,20 @@ db: | |
cpu: 25m | ||
## @param db.resources.requests.memory Memory resource request for the database container. | ||
memory: 64Mi | ||
pvc: | ||
## @param db.pvc.enabled Specify whether to use persistentVolumeClaim (true) or EmptyDir storage (false). This is recommended to be enabled, but the storage size and selector should be chosen carefully first. | ||
enabled: false | ||
## @param db.pvc.annotations [object] Annotations to add to the persistentVolumeClaim | ||
annotations: {} | ||
## @param db.pvc.storage Storage size to request for the persistentVolumeClaim | ||
storage: 500Mi | ||
## @param db.pvc.accessModes Access mode for the persistentVolumeClaim. See: [Access Modes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
accessModes: | ||
- ReadWriteOnce | ||
## @param db.pvc.selector [object] Selector for the persistentVolumeClaim. See: [Selector](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
selector: {} | ||
## @param db.pvc.storageClassName [string, nullable] The name of the StorageClass for the persistentVolumeClaim. See: [Class](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
storageClassName: "" | ||
## @param db.securityContext [object] Security Context for the database container. Defaults to meet "restricted" [Pod Security Standard](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted). See: [SecurityContext](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1) | ||
securityContext: | ||
## @skip db.securityContext.allowPrivilegeEscalation | ||
|
@@ -180,6 +194,20 @@ storage: | |
cpu: 50m | ||
## @param storage.resources.requests.memory Memory resource request for the object storage container. | ||
memory: 256Mi | ||
pvc: | ||
## @param storage.pvc.enabled Specify whether to use persistentVolumeClaim (true) or EmptyDir storage (false). This is recommended to be enabled, but the storage size and selector should be chosen carefully first. | ||
enabled: false | ||
## @param storage.pvc.annotations [object] Annotations to add to the persistentVolumeClaim | ||
annotations: {} | ||
## @param storage.pvc.storage Storage size to request for the persistentVolumeClaim | ||
storage: 500Mi | ||
## @param storage.pvc.accessModes Access mode for the persistentVolumeClaim. See: [Access Modes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
accessModes: | ||
- ReadWriteOnce | ||
## @param storage.pvc.selector [object] Selector for the persistentVolumeClaim. See: [Selector](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
selector: {} | ||
## @param storage.pvc.storageClassName [string, nullable] The name of the StorageClass for the persistentVolumeClaim. See: [Class](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
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. nit: I think we should the URL should include section point. For example: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class |
||
storageClassName: "" | ||
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 think these https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1 |
||
## @param storage.securityContext [object] Security Context for the storage container. Defaults to meet "restricted" [Pod Security Standard](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted). See: [SecurityContext](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1) | ||
securityContext: | ||
## @skip storage.securityContext.allowPrivilegeEscalation | ||
|
@@ -370,18 +398,3 @@ tolerations: [] | |
|
||
## @param affinity [object] Affinity for the Cryostat Pod. See: [Affinity](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) | ||
affinity: {} | ||
|
||
pvc: | ||
## @param pvc.enabled Specify whether to use persistentVolumeClaim or EmptyDir storage | ||
enabled: false | ||
## @param pvc.annotations [object] Annotations to add to the persistentVolumeClaim | ||
annotations: {} | ||
## @param pvc.storage Storage size to request for the persistentVolumeClaim | ||
storage: 500Mi | ||
## @param pvc.accessModes Access mode for the persistentVolumeClaim. See: [Access Modes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
accessModes: | ||
- ReadWriteOnce | ||
## @param pvc.selector [object] Selector for the persistentVolumeClaim. See: [Selector](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
selector: {} | ||
## @param pvc.storageClassName [string, nullable] The name of the StorageClass for the persistentVolumeClaim. See: [Class](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | ||
# storageClassName: |
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 think
.db.resources
refers to container resource requirements :DThere 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.
Ah right, thanks. I initially nested it under
resources
, but then it would be annoying to set PVC settings and CPU/memory separately so I moved it back up a level. I'll change this when I'm back at my computer (probably Monday).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.
Sounds good! Happy Black Friday weekends^^