From 8f6fafd941ce571f9bae7be7fa3229046f21c921 Mon Sep 17 00:00:00 2001 From: Nishant Gupta <90177384+nishant-yt@users.noreply.github.com> Date: Wed, 15 Sep 2021 22:25:47 -0700 Subject: [PATCH] Bookkeeper pods do not come up if storage size for index/journal/ledger volume claim templates is not mentioned (#168) Signed-off-by: Nishant Gupta --- pkg/apis/bookkeeper/v1alpha1/bookkeepercluster_types.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/apis/bookkeeper/v1alpha1/bookkeepercluster_types.go b/pkg/apis/bookkeeper/v1alpha1/bookkeepercluster_types.go index b5e9e30a..8260daed 100644 --- a/pkg/apis/bookkeeper/v1alpha1/bookkeepercluster_types.go +++ b/pkg/apis/bookkeeper/v1alpha1/bookkeepercluster_types.go @@ -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}, @@ -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}, @@ -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},