Skip to content

Commit

Permalink
restart policy should default to always
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Jul 22, 2024
1 parent c5dc811 commit 909b97f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v1alpha2/minicluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 909b97f

Please sign in to comment.