Skip to content

Commit

Permalink
Bookkeeper pods do not come up if storage size for index/journal/ledg…
Browse files Browse the repository at this point in the history
…er volume claim templates is not mentioned (#168)

Signed-off-by: Nishant Gupta <[email protected]>
  • Loading branch information
nishant-yt authored Sep 16, 2021
1 parent 481a7a7 commit 8f6fafd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/bookkeeper/v1alpha1/bookkeepercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ type BookkeeperStorageSpec struct {
}

func (s *BookkeeperStorageSpec) withDefaults() (changed bool) {
if s.LedgerVolumeClaimTemplate == nil {
if s.LedgerVolumeClaimTemplate == nil || s.LedgerVolumeClaimTemplate.Resources.Requests[corev1.ResourceStorage].Format == "" {
changed = true
s.LedgerVolumeClaimTemplate = &corev1.PersistentVolumeClaimSpec{
AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce},
Expand All @@ -403,7 +403,7 @@ func (s *BookkeeperStorageSpec) withDefaults() (changed bool) {
}
}

if s.JournalVolumeClaimTemplate == nil {
if s.JournalVolumeClaimTemplate == nil || s.JournalVolumeClaimTemplate.Resources.Requests[corev1.ResourceStorage].Format == "" {
changed = true
s.JournalVolumeClaimTemplate = &corev1.PersistentVolumeClaimSpec{
AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce},
Expand All @@ -415,7 +415,7 @@ func (s *BookkeeperStorageSpec) withDefaults() (changed bool) {
}
}

if s.IndexVolumeClaimTemplate == nil {
if s.IndexVolumeClaimTemplate == nil || s.IndexVolumeClaimTemplate.Resources.Requests[corev1.ResourceStorage].Format == "" {
changed = true
s.IndexVolumeClaimTemplate = &corev1.PersistentVolumeClaimSpec{
AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce},
Expand Down

0 comments on commit 8f6fafd

Please sign in to comment.