Skip to content

Commit

Permalink
Add the CRI preflight ignore, lost in refactoring
Browse files Browse the repository at this point in the history
Also move the corresponding comments to the code
  • Loading branch information
afbjorklund committed Apr 14, 2018
1 parent 2ec4692 commit 87689eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ func (k *KubeadmBootstrapper) GetClusterLogsTo(follow bool, out io.Writer) error
}

func (k *KubeadmBootstrapper) StartCluster(k8s config.KubernetesConfig) error {
// We use --ignore-preflight-errors=DirAvailable since we have our own custom addons
// that we also stick in /etc/kubernetes/manifests
// We use --ignore-preflight-errors=Swap since minikube.iso allocates a swap partition.
// (it should probably stop doing this, though...)
// We use --ignore-preflight-errors=CRI since /var/run/dockershim.sock is not present.
// (because we start kubelet with an invalid config)
version, err := ParseKubernetesVersion(k8s.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
Expand Down
7 changes: 7 additions & 0 deletions pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,20 @@ const (
)

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

const (
Expand Down

0 comments on commit 87689eb

Please sign in to comment.