Skip to content

Commit

Permalink
Chart value bindPVThroughClaimRef to control how PV / PVC pairs are…
Browse files Browse the repository at this point in the history
… bound.

`true` uses partially pre-filled spec.claimRef in PV
`false` fills spec.volumeName of PVC instead
  • Loading branch information
unlightable committed Oct 9, 2023
1 parent aeb7f40 commit 25cdbe9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/core-dump-handler/templates/core-storage-pv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ metadata:
type: local
spec:
storageClassName: {{ .Values.storageClass }}
{{ if .Values.bindPVThroughClaimRef }}
claimRef:
name: core-storage-pvc
namespace: {{ .Release.Namespace }}
{{ end }}
capacity:
storage: {{ .Values.coreStorage }}
accessModes:
Expand Down
3 changes: 3 additions & 0 deletions charts/core-dump-handler/templates/core-storage-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ spec:
requests:
storage: {{ .Values.coreStorage }}
storageClassName: {{ .Values.storageClass }}
{{ if not .Values.bindPVThroughClaimRef }}
volumeName: core-volume
{{ end }}
2 changes: 2 additions & 0 deletions charts/core-dump-handler/templates/event-storage-pv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ metadata:
type: local
spec:
storageClassName: {{ .Values.storageClass }}
{{ if .Values.bindPVThroughClaimRef }}
claimRef:
name: event-storage-pvc
namespace: {{ .Release.Namespace }}
{{ end }}
capacity:
storage: {{ .Values.eventStorage }}
accessModes:
Expand Down
3 changes: 3 additions & 0 deletions charts/core-dump-handler/templates/event-storage-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ spec:
requests:
storage: {{ .Values.eventStorage }}
storageClassName: {{ .Values.storageClass }}
{{ if not .Values.bindPVThroughClaimRef }}
volumeName: event-volume
{{ end }}
{{ end }}
2 changes: 2 additions & 0 deletions charts/core-dump-handler/templates/host-storage-pv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ metadata:
type: local
spec:
storageClassName: {{ .Values.storageClass }}
{{ if .Values.bindPVThroughClaimRef }}
claimRef:
name: host-storage-pvc
namespace: {{ .Release.Namespace }}
{{ end }}
capacity:
storage: {{ .Values.hostStorage }}
accessModes:
Expand Down
3 changes: 3 additions & 0 deletions charts/core-dump-handler/templates/host-storage-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ spec:
requests:
storage: {{ .Values.hostStorage }}
storageClassName: {{ .Values.storageClass }}
{{ if not .Values.bindPVThroughClaimRef }}
volumeName: host-volume
{{ end }}
2 changes: 2 additions & 0 deletions charts/core-dump-handler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ hostStorage: 1Gi
coreStorage: 10Gi
eventStorage: 1Gi
storageClass: hostclass
# set claimRef on PersistentVolume or fallback to /spec/volumeName on PVC
bindPVThroughClaimRef: true

composer:
ignoreCrio: false
Expand Down

0 comments on commit 25cdbe9

Please sign in to comment.