Skip to content

Commit

Permalink
Fix druid defaulter
Browse files Browse the repository at this point in the history
Signed-off-by: Tapajit Chandra Paul <[email protected]>
  • Loading branch information
tapojit047 committed Jul 1, 2024
1 parent 735c468 commit ac8f233
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apis/kubedb/v1alpha2/druid_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ func (d *Druid) SetDefaults() {
if d.Spec.MetadataStorage == nil {
d.Spec.MetadataStorage = &MetadataStorage{}
}
if !d.Spec.MetadataStorage.ExternallyManaged {
if d.Spec.MetadataStorage.ObjectReference == nil {
d.Spec.MetadataStorage.ObjectReference = &kmapi.ObjectReference{}
}
d.Spec.MetadataStorage.Name = d.GetMetadataStorageName()
}
if d.Spec.MetadataStorage.Namespace == "" {
d.Spec.MetadataStorage.Namespace = d.Namespace
}
Expand Down

0 comments on commit ac8f233

Please sign in to comment.