Skip to content

Commit 56ee34e

Browse files
committed
Add the CRI preflight ignore, lost in refactoring
Also move the corresponding comments to the code
1 parent 85cac4d commit 56ee34e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pkg/minikube/bootstrapper/kubeadm/kubeadm.go

-6
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@ func (k *KubeadmBootstrapper) GetClusterLogsTo(follow bool, out io.Writer) error
105105
}
106106

107107
func (k *KubeadmBootstrapper) StartCluster(k8s config.KubernetesConfig) error {
108-
// We use --ignore-preflight-errors=DirAvailable since we have our own custom addons
109-
// that we also stick in /etc/kubernetes/manifests
110-
// We use --ignore-preflight-errors=Swap since minikube.iso allocates a swap partition.
111-
// (it should probably stop doing this, though...)
112-
// We use --ignore-preflight-errors=CRI since /var/run/dockershim.sock is not present.
113-
// (because we start kubelet with an invalid config)
114108
b := bytes.Buffer{}
115109
templateContext := struct {
116110
KubeadmConfigFile string

pkg/minikube/constants/constants.go

+7
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,20 @@ const (
151151
)
152152

153153
var Preflights = []string{
154+
// We use --ignore-preflight-errors=DirAvailable since we have our own custom addons
155+
// that we also stick in /etc/kubernetes/manifests
154156
"DirAvailable--etc-kubernetes-manifests",
155157
"DirAvailable--data",
156158
"FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml",
157159
"FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml",
158160
"FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml",
159161
"FileAvailable--etc-kubernetes-manifests-etcd.yaml",
162+
// We use --ignore-preflight-errors=Swap since minikube.iso allocates a swap partition.
163+
// (it should probably stop doing this, though...)
160164
"Swap",
165+
// We use --ignore-preflight-errors=CRI since /var/run/dockershim.sock is not present.
166+
// (because we start kubelet with an invalid config)
167+
"CRI",
161168
}
162169

163170
const (

0 commit comments

Comments
 (0)