Skip to content

Commit

Permalink
Set default path
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyvelich committed Aug 11, 2020
1 parent 3e7dc7f commit 0ebbd06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/util/v1beta1/katibconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ func GetSuggestionConfigData(algorithmName string, client client.Client) (Sugges
}
}

// Set default local path if it is empty
if pvSpec.PersistentVolumeSource.HostPath != nil && pvSpec.PersistentVolumeSource.HostPath.Path == "" {
pvSpec.PersistentVolumeSource.HostPath.Path = consts.DefaultSuggestionVolumeLocalPathPrefix
}

// Set default capacity
if len(pvSpec.Capacity) == 0 {
pvSpec.Capacity = make(map[corev1.ResourceName]resource.Quantity)
Expand Down

0 comments on commit 0ebbd06

Please sign in to comment.