diff --git a/CODEOWNERS b/CODEOWNERS index 7c1099ef9f4d..630fd6731a72 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -14,6 +14,7 @@ /tools/ @costinm @ldemailly /pkg/ @istio/reviewers-istio-pkg /tests/ @istio/reviewers-istio-tests +/istioctl/ @istio/reviewers-istio-istioctl # Do not enable this. Seems to cause the parsers to fail and not trigger auto review requests #/.circleci/ @istio/reviewers-istio-circleci diff --git a/Makefile b/Makefile index 80edb767d5c0..4c52caf79cc4 100644 --- a/Makefile +++ b/Makefile @@ -297,8 +297,8 @@ lint: buildcache # Params: OUT VERSION_PKG SRC PILOT_GO_BINS:=${ISTIO_OUT}/pilot-discovery ${ISTIO_OUT}/pilot-agent \ - ${ISTIO_OUT}/istioctl ${ISTIO_OUT}/sidecar-injector -PILOT_GO_BINS_SHORT:=pilot-discovery pilot-agent istioctl sidecar-injector + ${ISTIO_OUT}/sidecar-injector +PILOT_GO_BINS_SHORT:=pilot-discovery pilot-agent sidecar-injector define pilotbuild $(1): bin/gobuild.sh ${ISTIO_OUT}/$(1) istio.io/istio/pkg/version ./pilot/cmd/$(1) @@ -308,13 +308,17 @@ ${ISTIO_OUT}/$(1): endef $(foreach ITEM,$(PILOT_GO_BINS_SHORT),$(eval $(call pilotbuild,$(ITEM)))) +.PHONY: istioctl +istioctl: + bin/gobuild.sh ${ISTIO_OUT}/istioctl istio.io/istio/pkg/version ./istioctl + # Non-static istioctls. These are typically a build artifact. ${ISTIO_OUT}/istioctl-linux: depend - STATIC=0 GOOS=linux bin/gobuild.sh $@ istio.io/istio/pkg/version ./pilot/cmd/istioctl + STATIC=0 GOOS=linux bin/gobuild.sh $@ istio.io/istio/pkg/version ./istioctl ${ISTIO_OUT}/istioctl-osx: depend - STATIC=0 GOOS=darwin bin/gobuild.sh $@ istio.io/istio/pkg/version ./pilot/cmd/istioctl + STATIC=0 GOOS=darwin bin/gobuild.sh $@ istio.io/istio/pkg/version ./istioctl ${ISTIO_OUT}/istioctl-win.exe: depend - STATIC=0 GOOS=windows bin/gobuild.sh $@ istio.io/istio/pkg/version ./pilot/cmd/istioctl + STATIC=0 GOOS=windows bin/gobuild.sh $@ istio.io/istio/pkg/version ./istioctl MIXER_GO_BINS:=${ISTIO_OUT}/mixs ${ISTIO_OUT}/mixc mixc: @@ -336,7 +340,7 @@ $(SECURITY_GO_BINS): bin/gobuild.sh $@ istio.io/istio/pkg/version ./security/cmd/$(@F) .PHONY: build -build: depend $(PILOT_GO_BINS_SHORT) mixc mixs node_agent istio_ca multicluster_ca +build: depend $(PILOT_GO_BINS_SHORT) mixc mixs node_agent istio_ca multicluster_ca istioctl # The following are convenience aliases for most of the go targets # The first block is for aliases that are the same as the actual binary, @@ -390,7 +394,7 @@ ${ISTIO_OUT}/archive: istioctl-all LICENSE README.md istio.VERSION install/updat # Used for debugging istioctl during dev work .PHONY: istioctl-install istioctl-install: - go install istio.io/istio/pilot/cmd/istioctl + go install istio.io/istio/istioctl #----------------------------------------------------------------------------- # Target: test diff --git a/istioctl/OWNERS b/istioctl/OWNERS new file mode 100644 index 000000000000..93482732b053 --- /dev/null +++ b/istioctl/OWNERS @@ -0,0 +1,10 @@ +reviewers: + - ayj + - jmuk + - liamawhite + - nmittler +approvers: + - ayj + - jmuk + - liamawhite + - nmittler diff --git a/istioctl/codecov.requirement b/istioctl/codecov.requirement new file mode 100644 index 000000000000..e486eba98fc3 --- /dev/null +++ b/istioctl/codecov.requirement @@ -0,0 +1,6 @@ +#Coverage data from SHA:70952e93c04c1d855aa65e72e24199b0c99413a1 +#If the requirement is not set below, it must satisfy default requirement. +Default:20 +#Package requirement +#Package name, coverage requirement, actually coverage at specific SHA +istio.io/istio/istioctl:0 [0] diff --git a/pilot/cmd/istioctl/config.go b/istioctl/config.go similarity index 100% rename from pilot/cmd/istioctl/config.go rename to istioctl/config.go diff --git a/pilot/cmd/istioctl/deregister.go b/istioctl/deregister.go similarity index 100% rename from pilot/cmd/istioctl/deregister.go rename to istioctl/deregister.go diff --git a/pilot/cmd/istioctl/gendeployment/cmd.go b/istioctl/gendeployment/cmd.go similarity index 100% rename from pilot/cmd/istioctl/gendeployment/cmd.go rename to istioctl/gendeployment/cmd.go diff --git a/pilot/cmd/istioctl/gendeployment/cmd_test.go b/istioctl/gendeployment/cmd_test.go similarity index 100% rename from pilot/cmd/istioctl/gendeployment/cmd_test.go rename to istioctl/gendeployment/cmd_test.go diff --git a/pilot/cmd/istioctl/gendeployment/helm.go b/istioctl/gendeployment/helm.go similarity index 100% rename from pilot/cmd/istioctl/gendeployment/helm.go rename to istioctl/gendeployment/helm.go diff --git a/pilot/cmd/istioctl/gendeployment/helm_test.go b/istioctl/gendeployment/helm_test.go similarity index 100% rename from pilot/cmd/istioctl/gendeployment/helm_test.go rename to istioctl/gendeployment/helm_test.go diff --git a/pilot/cmd/istioctl/gendeployment/testdata/default-values.yaml.golden b/istioctl/gendeployment/testdata/default-values.yaml.golden similarity index 100% rename from pilot/cmd/istioctl/gendeployment/testdata/default-values.yaml.golden rename to istioctl/gendeployment/testdata/default-values.yaml.golden diff --git a/pilot/cmd/istioctl/gendeployment/yaml.go b/istioctl/gendeployment/yaml.go similarity index 100% rename from pilot/cmd/istioctl/gendeployment/yaml.go rename to istioctl/gendeployment/yaml.go diff --git a/pilot/cmd/istioctl/inject.go b/istioctl/inject.go similarity index 100% rename from pilot/cmd/istioctl/inject.go rename to istioctl/inject.go diff --git a/pilot/cmd/istioctl/main.go b/istioctl/main.go similarity index 99% rename from pilot/cmd/istioctl/main.go rename to istioctl/main.go index 597bdf16d14e..b61d4ef4a16b 100644 --- a/pilot/cmd/istioctl/main.go +++ b/istioctl/main.go @@ -40,8 +40,8 @@ import ( "github.com/spf13/cobra/doc" "k8s.io/client-go/util/homedir" + "istio.io/istio/istioctl/gendeployment" "istio.io/istio/pilot/cmd" - "istio.io/istio/pilot/cmd/istioctl/gendeployment" "istio.io/istio/pilot/pkg/config/kube/crd" "istio.io/istio/pilot/pkg/model" "istio.io/istio/pilot/pkg/serviceregistry/kube" diff --git a/pilot/cmd/istioctl/mixer.go b/istioctl/mixer.go similarity index 100% rename from pilot/cmd/istioctl/mixer.go rename to istioctl/mixer.go diff --git a/pilot/cmd/istioctl/register.go b/istioctl/register.go similarity index 100% rename from pilot/cmd/istioctl/register.go rename to istioctl/register.go diff --git a/pilot/codecov.requirement b/pilot/codecov.requirement index 4ab3ed72febb..889f2d34512b 100644 --- a/pilot/codecov.requirement +++ b/pilot/codecov.requirement @@ -4,7 +4,6 @@ Default:20 #Package requirement #Package name, coverage requirement, actually coverage at specific SHA istio.io/istio/pilot/cmd:0 [0] -istio.io/istio/pilot/cmd/istioctl:0 [0] istio.io/istio/pilot/cmd/pilot-agent:0 [0] istio.io/istio/pilot/cmd/pilot-discovery:0 [0] istio.io/istio/pilot/cmd/sidecar-injector:0 [0]