Skip to content

Commit 3f4c900

Browse files
ayjistio-merge-robot
authored andcommitted
move istioctl out of pilot subdirectory (istio#3820)
Automatic merge from submit-queue. move istioctl out of pilot subdirectory istioctl is cli for all of Istio, not solely Pilot. Move istioctl to the top-level in istio/istio so that code reflects reality. This will also make it easier to manage codeowners for cli specific issues unrelated to Pilot and networking. Risk: Hopefully none. `istioctl` output binary location is unchanged. This is a non-functional change that is mostly limited to moving files around, fixing imports, and the Makefile paths. _note_: reviews/reviewers-istio-istioctl still needs to be created.
1 parent 27fbe28 commit 3f4c900

17 files changed

+29
-9
lines changed

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/tools/ @costinm @ldemailly
1515
/pkg/ @istio/reviewers-istio-pkg
1616
/tests/ @istio/reviewers-istio-tests
17+
/istioctl/ @istio/reviewers-istio-istioctl
1718

1819
# Do not enable this. Seems to cause the parsers to fail and not trigger auto review requests
1920
#/.circleci/ @istio/reviewers-istio-circleci

Makefile

+11-7
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ lint: buildcache
297297
# Params: OUT VERSION_PKG SRC
298298

299299
PILOT_GO_BINS:=${ISTIO_OUT}/pilot-discovery ${ISTIO_OUT}/pilot-agent \
300-
${ISTIO_OUT}/istioctl ${ISTIO_OUT}/sidecar-injector
301-
PILOT_GO_BINS_SHORT:=pilot-discovery pilot-agent istioctl sidecar-injector
300+
${ISTIO_OUT}/sidecar-injector
301+
PILOT_GO_BINS_SHORT:=pilot-discovery pilot-agent sidecar-injector
302302
define pilotbuild
303303
$(1):
304304
bin/gobuild.sh ${ISTIO_OUT}/$(1) istio.io/istio/pkg/version ./pilot/cmd/$(1)
@@ -308,13 +308,17 @@ ${ISTIO_OUT}/$(1):
308308
endef
309309
$(foreach ITEM,$(PILOT_GO_BINS_SHORT),$(eval $(call pilotbuild,$(ITEM))))
310310

311+
.PHONY: istioctl
312+
istioctl:
313+
bin/gobuild.sh ${ISTIO_OUT}/istioctl istio.io/istio/pkg/version ./istioctl
314+
311315
# Non-static istioctls. These are typically a build artifact.
312316
${ISTIO_OUT}/istioctl-linux: depend
313-
STATIC=0 GOOS=linux bin/gobuild.sh $@ istio.io/istio/pkg/version ./pilot/cmd/istioctl
317+
STATIC=0 GOOS=linux bin/gobuild.sh $@ istio.io/istio/pkg/version ./istioctl
314318
${ISTIO_OUT}/istioctl-osx: depend
315-
STATIC=0 GOOS=darwin bin/gobuild.sh $@ istio.io/istio/pkg/version ./pilot/cmd/istioctl
319+
STATIC=0 GOOS=darwin bin/gobuild.sh $@ istio.io/istio/pkg/version ./istioctl
316320
${ISTIO_OUT}/istioctl-win.exe: depend
317-
STATIC=0 GOOS=windows bin/gobuild.sh $@ istio.io/istio/pkg/version ./pilot/cmd/istioctl
321+
STATIC=0 GOOS=windows bin/gobuild.sh $@ istio.io/istio/pkg/version ./istioctl
318322

319323
MIXER_GO_BINS:=${ISTIO_OUT}/mixs ${ISTIO_OUT}/mixc
320324
mixc:
@@ -336,7 +340,7 @@ $(SECURITY_GO_BINS):
336340
bin/gobuild.sh $@ istio.io/istio/pkg/version ./security/cmd/$(@F)
337341

338342
.PHONY: build
339-
build: depend $(PILOT_GO_BINS_SHORT) mixc mixs node_agent istio_ca multicluster_ca
343+
build: depend $(PILOT_GO_BINS_SHORT) mixc mixs node_agent istio_ca multicluster_ca istioctl
340344

341345
# The following are convenience aliases for most of the go targets
342346
# 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
390394
# Used for debugging istioctl during dev work
391395
.PHONY: istioctl-install
392396
istioctl-install:
393-
go install istio.io/istio/pilot/cmd/istioctl
397+
go install istio.io/istio/istioctl
394398

395399
#-----------------------------------------------------------------------------
396400
# Target: test

istioctl/OWNERS

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
reviewers:
2+
- ayj
3+
- jmuk
4+
- liamawhite
5+
- nmittler
6+
approvers:
7+
- ayj
8+
- jmuk
9+
- liamawhite
10+
- nmittler

istioctl/codecov.requirement

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Coverage data from SHA:70952e93c04c1d855aa65e72e24199b0c99413a1
2+
#If the requirement is not set below, it must satisfy default requirement.
3+
Default:20
4+
#Package requirement
5+
#Package name, coverage requirement, actually coverage at specific SHA
6+
istio.io/istio/istioctl:0 [0]
File renamed without changes.
File renamed without changes.
File renamed without changes.

pilot/cmd/istioctl/main.go renamed to istioctl/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ import (
4040
"github.com/spf13/cobra/doc"
4141
"k8s.io/client-go/util/homedir"
4242

43+
"istio.io/istio/istioctl/gendeployment"
4344
"istio.io/istio/pilot/cmd"
44-
"istio.io/istio/pilot/cmd/istioctl/gendeployment"
4545
"istio.io/istio/pilot/pkg/config/kube/crd"
4646
"istio.io/istio/pilot/pkg/model"
4747
"istio.io/istio/pilot/pkg/serviceregistry/kube"
File renamed without changes.
File renamed without changes.

pilot/codecov.requirement

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Default:20
44
#Package requirement
55
#Package name, coverage requirement, actually coverage at specific SHA
66
istio.io/istio/pilot/cmd:0 [0]
7-
istio.io/istio/pilot/cmd/istioctl:0 [0]
87
istio.io/istio/pilot/cmd/pilot-agent:0 [0]
98
istio.io/istio/pilot/cmd/pilot-discovery:0 [0]
109
istio.io/istio/pilot/cmd/sidecar-injector:0 [0]

0 commit comments

Comments
 (0)