Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cri-tools to minikube.iso, for crictl #2404

Merged
merged 2 commits into from
Mar 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deploy/iso/minikube-iso/package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ menu "System tools"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/runc-master/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/kpod/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/crio-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/cri-tools/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/automount/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/docker-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/cni-bin/Config.in"
Expand Down
5 changes: 5 additions & 0 deletions deploy/iso/minikube-iso/package/cri-tools/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config BR2_PACKAGE_CRI_TOOLS
bool "cri-tools"
default y
depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
3 changes: 3 additions & 0 deletions deploy/iso/minikube-iso/package/cri-tools/cri-tools.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sha256 e83b5a8ff6fc2c98c3463600e74a86d7dbbea6330f883cd5663cbd59641a8086 v0.2.tar.gz
sha256 2c8e45414d5804628f557171d622ca3e4a55dfc1f2de0cd33bcba98e863342d1 v1.0.0-alpha.0.tar.gz
sha256 688cd566e11f09247e8135ac1ee65e5afb3ea3303c00569c5e1e265e3b2c68f6 v1.0.0-beta.0.tar.gz
35 changes: 35 additions & 0 deletions deploy/iso/minikube-iso/package/cri-tools/cri-tools.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
################################################################################
#
# cri-tools
#
################################################################################

CRI_TOOLS_VERSION = v1.0.0-beta.0
CRI_TOOLS_SITE = https://github.com/kubernetes-incubator/cri-tools/archive
CRI_TOOLS_SOURCE = $(CRI_TOOLS_VERSION).tar.gz
CRI_TOOLS_LICENSE = Apache-2.0
CRI_TOOLS_LICENSE_FILES = LICENSE
CRI_TOOLS_DEPENDENCIES =
CRI_TOOLS_GOPATH = $(@D)/_output
CRI_TOOLS_ENV = \
CGO_ENABLED=1 \
GOPATH="$(CRI_TOOLS_GOPATH)" \
PATH=$(CRI_TOOLS_GOPATH)/bin:$(BR_PATH)


define CRI_TOOLS_CONFIGURE_CMDS
mkdir -p $(CRI_TOOLS_GOPATH)/src/github.com/kubernetes-incubator
ln -sf $(@D) $(CRI_TOOLS_GOPATH)/src/github.com/kubernetes-incubator/cri-tools
endef

define CRI_TOOLS_BUILD_CMDS
$(CRI_TOOLS_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) crictl
endef

define CRI_TOOLS_INSTALL_TARGET_CMDS
$(INSTALL) -Dm755 \
$(CRI_TOOLS_GOPATH)/bin/crictl \
$(TARGET_DIR)/usr/bin/crictl
endef

$(eval $(generic-package))
2 changes: 2 additions & 0 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ func (k *KubeadmBootstrapper) StartCluster(k8s config.KubernetesConfig) error {
// 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)
b := bytes.Buffer{}
if err := kubeadmInitTemplate.Execute(&b, struct{ KubeadmConfigFile string }{constants.KubeadmConfigFile}); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/bootstrapper/kubeadm/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ sudo /usr/bin/kubeadm alpha phase controlplane all --config {{.KubeadmConfigFile
sudo /usr/bin/kubeadm alpha phase etcd local --config {{.KubeadmConfigFile}}
`))

var kubeadmInitTemplate = template.Must(template.New("kubeadmInitTemplate").Parse("sudo /usr/bin/kubeadm init --config {{.KubeadmConfigFile}} --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=Swap"))
var kubeadmInitTemplate = template.Must(template.New("kubeadmInitTemplate").Parse("sudo /usr/bin/kubeadm init --config {{.KubeadmConfigFile}} --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI"))

// printMapInOrder sorts the keys and prints the map in order, combining key
// value pairs with the separator character
Expand Down