Skip to content

Instantly share code, notes, and snippets.

@xrl
Created January 18, 2018 20:10
Show Gist options
  • Save xrl/b02d99e09c12cc02f54497f73ca243f1 to your computer and use it in GitHub Desktop.
Save xrl/b02d99e09c12cc02f54497f73ca243f1 to your computer and use it in GitHub Desktop.
kops formula for vpc connections
class Kops < Formula
desc "Production Grade K8s Installation, Upgrades, and Management"
homepage "https://github.com/kubernetes/kops"
url "https://github.com/kubernetes/kops/archive/1.7.1.tar.gz"
sha256 "044c5c7a737ed3acf53517e64bb27d3da8f7517d2914df89efeeaf84bc8a722a"
head "https://github.com/tureus/kops.git", :revision => "1.6.2-allow-no-igw"
# head "https://github.com/k8s-for-greeks/kops.git", :revision => "k8s-for-greeks-integration"
bottle do
cellar :any_skip_relocation
sha256 "52a2190c78c564faa9092fbf1aacb4cd8c59b83cbf549e941105cbd49ff41c36" => :high_sierra
sha256 "50405e6faf1a0b3b794c43b9be3d43b76721ae22ae7d0933a7d02cea22c1100d" => :sierra
sha256 "3fb69de6b4a43d42e2a1811307c384d3ae823524b03a74fba414b24ab8ed3e42" => :el_capitan
end
depends_on "go" => :build
depends_on "kubernetes-cli"
def install
ENV["VERSION"] = version unless build.head?
ENV["GOPATH"] = buildpath
kopspath = buildpath/"src/k8s.io/kops"
kopspath.install Dir["*"]
system "make", "-C", kopspath
bin.install("bin/kops")
# Install bash completion
output = Utils.popen_read("#{bin}/kops completion bash")
(bash_completion/"kops").write output
# Install zsh completion
output = Utils.popen_read("#{bin}/kops completion zsh")
(zsh_completion/"_kops").write output
end
test do
system "#{bin}/kops", "version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment