kube-aws 0.9.5
Closes #12105. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
3fc8010f6f
commit
10c8475e4a
1 changed files with 16 additions and 27 deletions
|
@ -1,11 +1,9 @@
|
||||||
require "yaml"
|
|
||||||
|
|
||||||
class KubeAws < Formula
|
class KubeAws < Formula
|
||||||
desc "CoreOS Kubernetes on AWS"
|
desc "CoreOS Kubernetes on AWS"
|
||||||
homepage "https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html"
|
homepage "https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html"
|
||||||
url "https://github.com/coreos/kube-aws/archive/v0.9.1.tar.gz"
|
url "https://github.com/kubernetes-incubator/kube-aws/archive/v0.9.5.tar.gz"
|
||||||
sha256 "45f1ac64d6e1132811cd777e2f25ce2dd131cc38d8d7c6c0257ad5c5ff8f5e26"
|
sha256 "86a15c882ef63e3a24fbd96f8af0b945911b7b2092051baa397d6a5046a1d21f"
|
||||||
head "https://github.com/coreos/kube-aws.git"
|
head "https://github.com/kubernetes-incubator/kube-aws.git"
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
sha256 "7b073c55de427c7f981b5e2c432400bebe73d5003d5886cf3dfdbdaadfde2827" => :sierra
|
sha256 "7b073c55de427c7f981b5e2c432400bebe73d5003d5886cf3dfdbdaadfde2827" => :sierra
|
||||||
|
@ -13,19 +11,14 @@ class KubeAws < Formula
|
||||||
sha256 "262c04907593bbdfd04739d21740da4b34c4409c2294e376080965c0ac8e578d" => :yosemite
|
sha256 "262c04907593bbdfd04739d21740da4b34c4409c2294e376080965c0ac8e578d" => :yosemite
|
||||||
end
|
end
|
||||||
|
|
||||||
devel do
|
|
||||||
url "https://github.com/coreos/kube-aws/archive/v0.9.3.tar.gz"
|
|
||||||
sha256 "cd33c88ee607fdcbca34af4a01b3aa386014f0394bd47c651d309b431bc51c30"
|
|
||||||
end
|
|
||||||
|
|
||||||
depends_on "go" => :build
|
depends_on "go" => :build
|
||||||
|
|
||||||
def install
|
def install
|
||||||
gopath_vendor = buildpath/"_gopath-vendor"
|
gopath_vendor = buildpath/"_gopath-vendor"
|
||||||
gopath_kube_aws = buildpath/"_gopath-kube-aws"
|
gopath_kube_aws = buildpath/"_gopath-kube-aws"
|
||||||
kube_aws_dir = "#{gopath_kube_aws}/src/github.com/coreos/kube-aws"
|
kube_aws_dir = "#{gopath_kube_aws}/src/github.com/kubernetes-incubator/kube-aws"
|
||||||
|
|
||||||
mkdir_p gopath_vendor
|
gopath_vendor.mkpath
|
||||||
mkdir_p File.dirname(kube_aws_dir)
|
mkdir_p File.dirname(kube_aws_dir)
|
||||||
|
|
||||||
ln_s buildpath/"vendor", "#{gopath_vendor}/src"
|
ln_s buildpath/"vendor", "#{gopath_vendor}/src"
|
||||||
|
@ -34,28 +27,24 @@ class KubeAws < Formula
|
||||||
ENV["GOPATH"] = "#{gopath_vendor}:#{gopath_kube_aws}"
|
ENV["GOPATH"] = "#{gopath_vendor}:#{gopath_kube_aws}"
|
||||||
|
|
||||||
cd kube_aws_dir do
|
cd kube_aws_dir do
|
||||||
system "go", "generate", "./config"
|
system "go", "generate", "./core/controlplane/config"
|
||||||
if build.stable?
|
system "go", "generate", "./core/nodepool/config"
|
||||||
system "go", "build", "-ldflags",
|
system "go", "generate", "./core/root/config"
|
||||||
"-X github.com/coreos/kube-aws/cluster.VERSION=#{version}",
|
system "go", "build", "-ldflags",
|
||||||
"-a", "-tags", "netgo", "-installsuffix", "netgo",
|
"-X github.com/kubernetes-incubator/kube-aws/core/controlplane/cluster.VERSION=#{version}",
|
||||||
"-o", bin/"kube-aws", "./cmd/kube-aws"
|
"-a", "-tags", "netgo", "-installsuffix", "netgo",
|
||||||
else
|
"-o", bin/"kube-aws", "./"
|
||||||
system "go", "generate", "./nodepool/config"
|
|
||||||
system "go", "build", "-ldflags",
|
|
||||||
"-X github.com/coreos/kube-aws/cluster.VERSION=#{version}",
|
|
||||||
"-a", "-tags", "netgo", "-installsuffix", "netgo",
|
|
||||||
"-o", bin/"kube-aws", "./"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
test do
|
test do
|
||||||
|
require "yaml"
|
||||||
|
|
||||||
system "#{bin}/kube-aws"
|
system "#{bin}/kube-aws"
|
||||||
cluster = { "clusterName" => "test-cluster", "externalDNSName" => "dns",
|
cluster = { "clusterName" => "test-cluster", "externalDNSName" => "dns",
|
||||||
"keyName" => "key", "region" => "west",
|
"keyName" => "key", "region" => "west",
|
||||||
"availabilityZone" => "zone", "kmsKeyArn" => "arn" }
|
"availabilityZone" => "zone", "kmsKeyArn" => "arn",
|
||||||
cluster["controller"] = nil unless build.stable?
|
"worker"=>{ "nodePools"=>[{ "name"=>"nodepool1" }] } }
|
||||||
system "#{bin}/kube-aws", "init", "--cluster-name", "test-cluster",
|
system "#{bin}/kube-aws", "init", "--cluster-name", "test-cluster",
|
||||||
"--external-dns-name", "dns", "--region", "west",
|
"--external-dns-name", "dns", "--region", "west",
|
||||||
"--availability-zone", "zone", "--key-name", "key",
|
"--availability-zone", "zone", "--key-name", "key",
|
||||||
|
|
Loading…
Reference in a new issue