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

Commit 681c69e

Browse files
authored
Merge pull request #22 from cbws/tmpfs-fix
Fix creation of clusters without pod policy
2 parents e68159a + 01b66a5 commit 681c69e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/cluster/cluster.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,11 @@ func (c *Cluster) createPod(members etcdutil.MemberSet, m *etcdutil.Member, stat
379379
}
380380
k8sutil.AddEtcdVolumeToPod(pod, pvc, false)
381381
} else {
382-
k8sutil.AddEtcdVolumeToPod(pod, nil, c.cluster.Spec.Pod.Tmpfs)
382+
tmpfs := false
383+
if podPolicy := c.cluster.Spec.Pod; podPolicy != nil {
384+
tmpfs = podPolicy.Tmpfs
385+
}
386+
k8sutil.AddEtcdVolumeToPod(pod, nil, tmpfs)
383387
}
384388
_, err := c.config.KubeCli.CoreV1().Pods(c.cluster.Namespace).Create(pod)
385389
return err

0 commit comments

Comments
 (0)