Skip to content

Commit

Permalink
Move kube/inject out of Pilot (istio#16284)
Browse files Browse the repository at this point in the history
* Move pilot/pkg/kube/inject -> pkg/kube/inject

* Break out sidecar-injector to top level
  • Loading branch information
howardjohn authored and istio-testing committed Aug 16, 2019
1 parent 6f4be1d commit 45a3140
Show file tree
Hide file tree
Showing 214 changed files with 15 additions and 10 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,13 @@ ${ISTIO_OUT}/_istioctl: istioctl
mv _istioctl ${ISTIO_OUT}/_istioctl

# Build targets for apps under ./pilot/cmd
PILOT_BINS:=pilot-discovery pilot-agent sidecar-injector
PILOT_BINS:=pilot-discovery pilot-agent
$(foreach ITEM,$(PILOT_BINS),$(eval $(call genTargetsForNativeAndDocker,$(ITEM),./pilot/cmd/$(ITEM),$(RELEASE_LDFLAGS))))

# Build targets for apps under ./sidecar-injector/cmd
INJECTOR_BINS:=sidecar-injector
$(foreach ITEM,$(INJECTOR_BINS),$(eval $(call genTargetsForNativeAndDocker,$(ITEM),./sidecar-injector/cmd/$(ITEM),$(RELEASE_LDFLAGS))))

# Build targets for apps under ./mixer/cmd
MIXER_BINS:=mixs mixc
$(foreach ITEM,$(MIXER_BINS),$(eval $(call genTargetsForNativeAndDocker,$(ITEM),./mixer/cmd/$(ITEM),$(RELEASE_LDFLAGS))))
Expand All @@ -422,7 +426,7 @@ $(foreach ITEM,$(SECURITY_TOOLS_BINS),$(eval $(call genTargetsForNativeAndDocker
ISTIO_TOOLS_BINS:=hyperistio istio-iptables
$(foreach ITEM,$(ISTIO_TOOLS_BINS),$(eval $(call genTargetsForNativeAndDocker,$(ITEM),./tools/$(ITEM),$(DEBUG_LDFLAGS))))

BUILD_BINS:=$(PILOT_BINS) mixc mixs mixgen node_agent node_agent_k8s istio_ca istioctl galley sdsclient
BUILD_BINS:=$(PILOT_BINS) sidecar-injector mixc mixs mixgen node_agent node_agent_k8s istio_ca istioctl galley sdsclient
LINUX_BUILD_BINS:=$(foreach buildBin,$(BUILD_BINS),$(ISTIO_OUT_LINUX)/$(buildBin))

.PHONY: build
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/kubeinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"istio.io/pkg/version"

"istio.io/istio/pilot/cmd"
"istio.io/istio/pilot/pkg/kube/inject"
"istio.io/istio/pkg/config/mesh"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/kube/inject"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down
3 changes: 2 additions & 1 deletion istioctl/cmd/kubeuninject.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import (
"k8s.io/apimachinery/pkg/runtime"
yamlDecoder "k8s.io/apimachinery/pkg/util/yaml"

"istio.io/istio/pilot/pkg/kube/inject"
"istio.io/istio/pkg/kube/inject"

"istio.io/pkg/log"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ import (
)

const (
helmChartDirectory = "../../../../install/kubernetes/helm/istio"
helmChartDirectory = "../../../install/kubernetes/helm/istio"
helmConfigMapKey = "istio/templates/sidecar-injector-configmap.yaml"
injectorConfig = "../../../../install/kubernetes/helm/istio/files/injection-template.yaml"
injectorConfig = "../../../install/kubernetes/helm/istio/files/injection-template.yaml"
helmValuesFile = "values.yaml"
yamlSeparator = "\n---"
minimalSidecarTemplate = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"path/filepath"
"time"

multierror "github.com/hashicorp/go-multierror"
"github.com/hashicorp/go-multierror"
"github.com/howeyc/fsnotify"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
Expand All @@ -33,9 +33,9 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"k8s.io/client-go/tools/cache"

"istio.io/istio/pilot/pkg/kube/inject"
"istio.io/istio/pkg/cmd"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/kube/inject"
"istio.io/istio/pkg/util"
"istio.io/pkg/collateral"
"istio.io/pkg/log"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/e2e/tests/pilot/pilot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (

"go.uber.org/multierr"

"istio.io/istio/pilot/pkg/kube/inject"
util2 "istio.io/istio/pilot/test/util"
"istio.io/istio/pkg/kube/inject"
"istio.io/istio/tests/e2e/framework"
"istio.io/istio/tests/util"
"istio.io/pkg/log"
Expand Down
2 changes: 1 addition & 1 deletion tools/istio-docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ docker.proxy_init: $(ISTIO_DOCKER)/istio-iptables
fi
$(DOCKER_RULE)

docker.sidecar_injector: pilot/docker/Dockerfile.sidecar_injector
docker.sidecar_injector: sidecar-injector/docker/Dockerfile.sidecar_injector
docker.sidecar_injector:$(ISTIO_DOCKER)/sidecar-injector
$(DOCKER_RULE)

Expand Down

0 comments on commit 45a3140

Please sign in to comment.