diff options
4 files changed, 38 insertions, 163 deletions
diff --git a/testing/kubernetes/APKBUILD b/testing/kubernetes/APKBUILD index b90ef45192..cc20ba13a0 100644 --- a/testing/kubernetes/APKBUILD +++ b/testing/kubernetes/APKBUILD @@ -2,17 +2,16 @@ # Contributor: Francesco Colista <fcolista@alpinelinux.org> # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=kubernetes -pkgver=1.8.5 +pkgver=1.11.2 pkgrel=0 pkgdesc="Container Cluster Manager for Docker" url="http://kubernetes.io/" arch="x86_64" license="Apache" -options="!check !nostrip" +options="!check" depends="bash" -makedepends="bash coreutils findutils go linux-headers rsync" +makedepends="bash coreutils findutils go linux-headers rsync grep" source="$pkgname-$pkgver.tar.gz::https://dl.k8s.io/v$pkgver/kubernetes-src.tar.gz - no-gnu-grep.patch make-e2e_node-run-over-distro-bins.patch make-test-cmd-run-over-hyperkube-based-kubectl.patch fix-support-for-ppc64le.patch @@ -40,18 +39,15 @@ package() { hyperkube kube-aggregator kube-scheduler - kubectl - kubefed" + kubectl" for bin in $binaries; do install -Dm755 _output/local/bin/linux/amd64/$bin "$pkgdir"/usr/bin/$bin done - install -Dm755 examples/cockroachdb/minikube.sh "$pkgdir"/usr/sbin/minikube.sh install -d $pkgdir/var/lib/kubelet } -sha512sums="fbf3ebb130b735ce6b31cf666b0c3914380c1117d4efece75b6b269016d552777862f70267d9bc5e3feeddd7e15107881e6f99c100bfd3b0d9bbef1325f645ea kubernetes-1.8.5.tar.gz -bf83357a169ecdabffdbefa0e9b24e01fbd99f289e846d34506ae3d32c599c6f9b8acac9a96cb587177eb62f48f0530088280cd1aa425c780daa1c6087e4d730 no-gnu-grep.patch +sha512sums="774410a5cebe99dc701350791dd1b213c1d5a9b3e176b6188aedcb5427d105309f69cbc5b9a318240a3108015e67ee1a443015ad436b4145d55fa43715bafbc3 kubernetes-1.11.2.tar.gz 06e3e8626b70077eb693da9c53dca3bc566aea4590a27c5dd3997b6d34abec5bf5d749b7be94b60b83361884c29b3a6dbb56c40b18c008b19e7cbd6e0d5c87e6 make-e2e_node-run-over-distro-bins.patch -07ecfbdb005250c65360a7357aeaacd1b342658c6685d37c0ea6b4740e4aebebc0213f74a81926bc0a6262161602d53f0c6cb6f19c5ecfb3be90c9372dc3cccd make-test-cmd-run-over-hyperkube-based-kubectl.patch +cf6d9a5e873603462f0b8de60d3c72b10cbe68175f621f814cb5a85c11cb18f408639181227dfae6718671109cd198ef8720ee15a7d4132bba691bbd7224860f make-test-cmd-run-over-hyperkube-based-kubectl.patch ff043b723edc644a8270a471bfb45b400a4547a9dd70b28c5c27dc041d956da2d1da36422694b35ac589a7ca651de44c7346d3d63fd36ec570bab7325a6fd73b fix-support-for-ppc64le.patch -469a93156ea5919fa77e54a0a142bf44a899d841bdf180a78ab5fd751891b18d675bd6b807f04da85fc7962c43e2f840a4587c3145e7829878089a3b17ec187e remove-apiserver-add-kube-prefix-for-hyperkube.patch" +f60cb7006b85cac00b0f18f87cc9196541e359a82ba37b3e0938d5e9a6e178ef964df0695fff3135d4a6cc4f4d91e963bd184e3af140c7c1072735890ff4351d remove-apiserver-add-kube-prefix-for-hyperkube.patch" diff --git a/testing/kubernetes/make-test-cmd-run-over-hyperkube-based-kubectl.patch b/testing/kubernetes/make-test-cmd-run-over-hyperkube-based-kubectl.patch index efc153817f..d9282fc931 100644 --- a/testing/kubernetes/make-test-cmd-run-over-hyperkube-based-kubectl.patch +++ b/testing/kubernetes/make-test-cmd-run-over-hyperkube-based-kubectl.patch @@ -10,7 +10,7 @@ index 575664a..7318cf9 100644 + local get_args=${5:-} for j in $(seq 1 ${tries}); do -- res=$(eval kubectl get -a "${kube_flags[@]}" ${args} $object -o go-template=\"$request\") +- res=$(eval kubectl get "${kube_flags[@]}" ${args} $object -o go-template=\"$request\") + res=$(eval kubectl ${args} get "${kube_flags[@]}" ${get_args} $object -o go-template=\"$request\") if [[ "$res" =~ ^$expected$ ]]; then echo -n ${green} diff --git a/testing/kubernetes/no-gnu-grep.patch b/testing/kubernetes/no-gnu-grep.patch deleted file mode 100644 index 2607906042..0000000000 --- a/testing/kubernetes/no-gnu-grep.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- kubernetes-1.8.4/build/root/Makefile.generated_files.orig -+++ kubernetes-1.8.4/build/root/Makefile.generated_files -@@ -155,7 +155,7 @@ - # is what the .stamp file represents. - $(foreach dir, $(ALL_GO_DIRS), \ - $(META_DIR)/$(dir)/$(GOFILES_META)): -- FILES=$$(ls $</*.go | grep --color=never -v $(GENERATED_FILE_PREFIX)); \ -+ FILES=$$(ls $</*.go | grep -v $(GENERATED_FILE_PREFIX)); \ - mkdir -p $(@D); \ - echo "gofiles__$< := $$(echo $${FILES})" >$@.tmp; \ - if ! cmp -s $@.tmp $@; then \ -@@ -187,7 +187,7 @@ - endif - ALL_K8S_TAG_FILES := $(shell \ - find $(ALL_GO_DIRS) -maxdepth 1 -type f -name \*.go \ -- | xargs grep --color=never -l '^// *+k8s:' \ -+ | xargs grep -l '^// *+k8s:' \ - ) - - # -@@ -214,7 +214,7 @@ - $(warning ***** finding all +k8s:deepcopy-gen tags) - endif - DEEPCOPY_DIRS := $(shell \ -- grep --color=never -l '+k8s:deepcopy-gen=' $(ALL_K8S_TAG_FILES) \ -+ grep -l '+k8s:deepcopy-gen=' $(ALL_K8S_TAG_FILES) \ - | xargs -n1 dirname \ - | LC_ALL=C sort -u \ - ) -@@ -289,7 +289,7 @@ - ./hack/run-in-gopath.sh go list \ - -f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \ - ./vendor/k8s.io/code-generator/cmd/deepcopy-gen \ -- | grep --color=never "^$(PRJ_SRC_PATH)/" \ -+ | grep "^$(PRJ_SRC_PATH)/" \ - | xargs ./hack/run-in-gopath.sh go list \ - -f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \ - | paste -sd' ' - \ -@@ -352,7 +352,7 @@ - $(warning ***** finding all +k8s:defaulter-gen tags) - endif - DEFAULTER_DIRS := $(shell \ -- grep --color=never -l '+k8s:defaulter-gen=' $(ALL_K8S_TAG_FILES) \ -+ grep -l '+k8s:defaulter-gen=' $(ALL_K8S_TAG_FILES) \ - | xargs -n1 dirname \ - | LC_ALL=C sort -u \ - ) -@@ -453,7 +453,7 @@ - ./hack/run-in-gopath.sh go list \ - -f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \ - ./vendor/k8s.io/code-generator/cmd/defaulter-gen \ -- | grep --color=never "^$(PRJ_SRC_PATH)/" \ -+ | grep "^$(PRJ_SRC_PATH)/" \ - | xargs ./hack/run-in-gopath.sh go list \ - -f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \ - | paste -sd' ' - \ -@@ -506,7 +506,7 @@ - $(warning ***** finding all +k8s:openapi-gen tags) - endif - OPENAPI_DIRS := $(shell \ -- grep --color=never -l '+k8s:openapi-gen=' $(ALL_K8S_TAG_FILES) \ -+ grep -l '+k8s:openapi-gen=' $(ALL_K8S_TAG_FILES) \ - | xargs -n1 dirname \ - | LC_ALL=C sort -u \ - ) -@@ -557,7 +557,7 @@ - ./hack/run-in-gopath.sh go list \ - -f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \ - ./vendor/k8s.io/code-generator/cmd/openapi-gen \ -- | grep --color=never "^$(PRJ_SRC_PATH)/" \ -+ | grep "^$(PRJ_SRC_PATH)/" \ - | xargs ./hack/run-in-gopath.sh go list \ - -f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \ - | paste -sd' ' - \ -@@ -621,7 +621,7 @@ - $(warning ***** finding all +k8s:conversion-gen tags) - endif - CONVERSION_DIRS := $(shell \ -- grep --color=never '^// *+k8s:conversion-gen=' $(ALL_K8S_TAG_FILES) \ -+ grep '^// *+k8s:conversion-gen=' $(ALL_K8S_TAG_FILES) \ - | cut -f1 -d: \ - | xargs -n1 dirname \ - | LC_ALL=C sort -u \ -@@ -683,7 +683,7 @@ - # is what the .stamp file represents. - $(foreach dir, $(CONVERSION_DIRS), \ - $(META_DIR)/$(dir)/$(CONVERSIONS_META)): -- TAGS=$$(grep --color=never -h '^// *+k8s:conversion-gen=' $</*.go \ -+ TAGS=$$(grep -h '^// *+k8s:conversion-gen=' $</*.go \ - | cut -f2- -d= \ - | sed 's|$(PRJ_SRC_PATH)/||' \ - | sed 's|^k8s.io/|vendor/k8s.io/|'); \ -@@ -771,7 +771,7 @@ - ./hack/run-in-gopath.sh go list \ - -f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \ - ./vendor/k8s.io/code-generator/cmd/conversion-gen \ -- | grep --color=never "^$(PRJ_SRC_PATH)/" \ -+ | grep "^$(PRJ_SRC_PATH)/" \ - | xargs ./hack/run-in-gopath.sh go list \ - -f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \ - | paste -sd' ' - \ diff --git a/testing/kubernetes/remove-apiserver-add-kube-prefix-for-hyperkube.patch b/testing/kubernetes/remove-apiserver-add-kube-prefix-for-hyperkube.patch index ad691e1c45..ebdade780a 100644 --- a/testing/kubernetes/remove-apiserver-add-kube-prefix-for-hyperkube.patch +++ b/testing/kubernetes/remove-apiserver-add-kube-prefix-for-hyperkube.patch @@ -1,51 +1,31 @@ -diff --git a/cmd/hyperkube/kube-controller-manager.go b/cmd/hyperkube/kube-controller-manager.go -index 35061e9..482958d 100644 ---- a/cmd/hyperkube/kube-controller-manager.go -+++ b/cmd/hyperkube/kube-controller-manager.go -@@ -29,7 +29,7 @@ func NewKubeControllerManager() *Server { - hks := Server{ - name: "controller-manager", - AlternativeName: "kube-controller-manager", -- SimpleUsage: "controller-manager", -+ SimpleUsage: "kube-controller-manager", - Long: "A server that runs a set of active components. This includes replication controllers, service endpoints and nodes.", - Run: func(_ *Server, args []string) error { - return app.Run(s) -diff --git a/cmd/hyperkube/kube-proxy.go b/cmd/hyperkube/kube-proxy.go -index 76bc2dc..1eba8a7 100644 ---- a/cmd/hyperkube/kube-proxy.go -+++ b/cmd/hyperkube/kube-proxy.go -@@ -33,7 +33,7 @@ func NewKubeProxy() *Server { - hks := Server{ - name: "proxy", - AlternativeName: "kube-proxy", -- SimpleUsage: "proxy", -+ SimpleUsage: "kube-proxy", - Long: command.Long, - } +--- build/cmd/hyperkube/main.go.orig ++++ build/cmd/hyperkube/main.go +@@ -35,7 +35,6 @@ + utilflag "k8s.io/apiserver/pkg/util/flag" + "k8s.io/apiserver/pkg/util/logs" + cloudcontrollermanager "k8s.io/kubernetes/cmd/cloud-controller-manager/app" +- kubeapiserver "k8s.io/kubernetes/cmd/kube-apiserver/app" + kubecontrollermanager "k8s.io/kubernetes/cmd/kube-controller-manager/app" + kubeproxy "k8s.io/kubernetes/cmd/kube-proxy/app" + kubescheduler "k8s.io/kubernetes/cmd/kube-scheduler/app" +@@ -86,12 +85,6 @@ + func NewHyperKubeCommand() (*cobra.Command, []func() *cobra.Command) { + // these have to be functions since the command is polymorphic. Cobra wants you to be top level + // command to get executed +- apiserver := func() *cobra.Command { +- ret := kubeapiserver.NewAPIServerCommand(stopCh) +- // add back some unfortunate aliases that should be removed +- ret.Aliases = []string{"apiserver"} +- return ret +- } + controller := func() *cobra.Command { + ret := kubecontrollermanager.NewControllerManagerCommand() + // add back some unfortunate aliases that should be removed +@@ -115,7 +108,6 @@ + cloudController := func() *cobra.Command { return cloudcontrollermanager.NewCloudControllerManagerCommand() } -diff --git a/cmd/hyperkube/kube-scheduler.go b/cmd/hyperkube/kube-scheduler.go -index fd00103..587a9a1 100644 ---- a/cmd/hyperkube/kube-scheduler.go -+++ b/cmd/hyperkube/kube-scheduler.go -@@ -29,7 +29,7 @@ func NewScheduler() *Server { - hks := Server{ - name: "scheduler", - AlternativeName: "kube-scheduler", -- SimpleUsage: "scheduler", -+ SimpleUsage: "kube-scheduler", - Long: "Implements a Kubernetes scheduler. This will assign pods to kubelets based on capacity and constraints.", - Run: func(_ *Server, _ []string) error { - return app.Run(s) -diff --git a/cmd/hyperkube/main.go b/cmd/hyperkube/main.go -index e1e07b7..10ed8b1 100644 ---- a/cmd/hyperkube/main.go -+++ b/cmd/hyperkube/main.go -@@ -33,7 +33,6 @@ func main() { - } - - hk.AddServer(NewKubectlServer()) -- hk.AddServer(NewKubeAPIServer()) - hk.AddServer(NewKubeControllerManager()) - hk.AddServer(NewScheduler()) - hk.AddServer(NewKubelet()) + commandFns := []func() *cobra.Command{ +- apiserver, + controller, + proxy, + scheduler, |