From 909b97fee49e569c1c7f1c386acee694968d7c50 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sun, 21 Jul 2024 19:46:17 -0600 Subject: [PATCH] restart policy should default to always Signed-off-by: vsoch --- api/v1alpha2/minicluster_types.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/v1alpha2/minicluster_types.go b/api/v1alpha2/minicluster_types.go index 547811d0..a742fccb 100644 --- a/api/v1alpha2/minicluster_types.go +++ b/api/v1alpha2/minicluster_types.go @@ -720,6 +720,11 @@ func (f *MiniCluster) Validate() bool { return false } + // Default RestartPolicy is Always + if f.Spec.Pod.RestartPolicy == "" { + f.Spec.Pod.RestartPolicy = "Always" + } + // If MinSize is set, it must be <= MaxSize and Size if f.Spec.MinSize != 0 && f.Spec.MaxSize != 0 && f.Spec.MinSize > f.Spec.MaxSize { fmt.Printf("😥️ MinSize of cluster must be less than MaxSize.\n")