Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #22 from cbws/tmpfs-fix
Browse files Browse the repository at this point in the history
Fix creation of clusters without pod policy
  • Loading branch information
Marlinc committed Nov 10, 2019
2 parents e68159a + 01b66a5 commit 681c69e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,11 @@ func (c *Cluster) createPod(members etcdutil.MemberSet, m *etcdutil.Member, stat
}
k8sutil.AddEtcdVolumeToPod(pod, pvc, false)
} else {
k8sutil.AddEtcdVolumeToPod(pod, nil, c.cluster.Spec.Pod.Tmpfs)
tmpfs := false
if podPolicy := c.cluster.Spec.Pod; podPolicy != nil {
tmpfs = podPolicy.Tmpfs
}
k8sutil.AddEtcdVolumeToPod(pod, nil, tmpfs)
}
_, err := c.config.KubeCli.CoreV1().Pods(c.cluster.Namespace).Create(pod)
return err
Expand Down

0 comments on commit 681c69e

Please sign in to comment.