Skip to content

Commit cac9a37

Browse files
committed
Add the CRI preflight ignore, lost in refactoring
Also move the corresponding comments to the code
1 parent 6158dd4 commit cac9a37

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Diff for: pkg/minikube/bootstrapper/kubeadm/kubeadm.go

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

108108
func (k *KubeadmBootstrapper) StartCluster(k8s config.KubernetesConfig) error {
109-
// We use --ignore-preflight-errors=DirAvailable since we have our own custom addons
110-
// that we also stick in /etc/kubernetes/manifests
111-
// We use --ignore-preflight-errors=Swap since minikube.iso allocates a swap partition.
112-
// (it should probably stop doing this, though...)
113-
// We use --ignore-preflight-errors=CRI since /var/run/dockershim.sock is not present.
114-
// (because we start kubelet with an invalid config)
115109
version, err := ParseKubernetesVersion(k8s.KubernetesVersion)
116110
if err != nil {
117111
return errors.Wrap(err, "parsing kubernetes version")

Diff for: 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)