Skip to content
Permalink
Browse files

kind 0.6.0 (new formula)

Closes #46886.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
  • Loading branch information
cblecker authored and chenrui333 committed Nov 18, 2019
1 parent 4a7d7a2 commit 62504ec391b2562c8d292e96d2e18c50ab64e9d2
Showing with 28 additions and 0 deletions.
  1. +28 −0 Formula/kind.rb
@@ -0,0 +1,28 @@
class Kind < Formula
desc "Run local Kubernetes cluster in Docker"
homepage "https://kind.sigs.k8s.io/"
url "https://github.com/kubernetes-sigs/kind/archive/v0.6.0.tar.gz"
sha256 "966b5c9817850f958acf14496349276a8df6d6609adfdc41633a8b7bc73d5e5d"
head "https://github.com/kubernetes-sigs/kind.git"

depends_on "go" => :build

def install
system "go", "build", "-o", bin/"kind"
prefix.install_metafiles

# Install bash completion
output = Utils.popen_read("#{bin}/kind completion bash")
(bash_completion/"kind").write output

# Install zsh completion
output = Utils.popen_read("#{bin}/kind completion zsh")
(zsh_completion/"_kind").write output
end

test do
# Should error out as creating a kind cluster requires root
status_output = shell_output("#{bin}/kind get kubeconfig --name homebrew 2>&1", 1)
assert_match "failed to list clusters", status_output
end
end

0 comments on commit 62504ec

Please sign in to comment.
You can’t perform that action at this time.