Skip to content

Commit

Permalink
Fix defaults for the empty volume spec
Browse files Browse the repository at this point in the history
  • Loading branch information
dAdAbird authored and delgod committed Mar 15, 2019
1 parent 4a4ead4 commit 73a1bbe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apis/psmdb/v1alpha1/psmdb_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ func (m *MultiAZ) reconcileAffinityOpts() {
}

func (v *VolumeSpec) reconcileOpts() error {
if v.EmptyDir == nil && v.HostPath == nil && v.PersistentVolumeClaim == nil {
v.PersistentVolumeClaim = &corev1.PersistentVolumeClaimSpec{}
}

if v.PersistentVolumeClaim != nil {
_, ok := v.PersistentVolumeClaim.Resources.Requests[corev1.ResourceStorage]
if !ok {
Expand Down

0 comments on commit 73a1bbe

Please sign in to comment.