Skip to content

Commit

Permalink
merge istio.io/pkg to istio.io/istio/pkg (istio#45019)
Browse files Browse the repository at this point in the history
* copy code from istio.io/pkg

Signed-off-by: hejianpeng <hejianpeng2@huawei.com>

* replace pkg

Signed-off-by: hejianpeng <hejianpeng2@huawei.com>

* add istio.io/istio/pkg/structured/

* fix gencheck

* fix test

* fix rlease-test

* fix nit

* Revert "fix rlease-test"

This reverts commit 5c23043.

* always use istio.io/pkg master branch

* fix after merge master

---------

Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
  • Loading branch information
zirain authored May 23, 2023
1 parent 9d1659c commit bd9e52d
Show file tree
Hide file tree
Showing 498 changed files with 17,362 additions and 651 deletions.
1 change: 0 additions & 1 deletion bin/update_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ make update-common
export GO111MODULE=on
go get -u "istio.io/api@${UPDATE_BRANCH}"
go get -u "istio.io/client-go@${UPDATE_BRANCH}"
go get -u "istio.io/pkg@${UPDATE_BRANCH}"
go mod tidy

sed -i "s/^BUILDER_SHA=.*\$/BUILDER_SHA=$(getSha release-builder)/" prow/release-commit.sh
Expand Down
2 changes: 1 addition & 1 deletion cni/cmd/install-cni/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"syscall"

"istio.io/istio/cni/pkg/cmd"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cni/cmd/istio-cni/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"github.com/containernetworking/cni/pkg/version"

"istio.io/istio/cni/pkg/plugin"
"istio.io/istio/pkg/log"
istioversion "istio.io/istio/pkg/version"
"istio.io/istio/tools/istio-iptables/pkg/cmd"
"istio.io/istio/tools/istio-iptables/pkg/constants"
"istio.io/pkg/log"
istioversion "istio.io/pkg/version"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/ambient/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
pconstants "istio.io/istio/pkg/config/constants"
"istio.io/istio/pkg/kube/controllers"
"istio.io/istio/pkg/kube/kclient"
istiolog "istio.io/istio/pkg/log"
"istio.io/istio/pkg/util/sets"
istiolog "istio.io/pkg/log"
)

var log = istiolog.RegisterScope("ambient", "ambient controller")
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/ambient/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package ambient
import (
ipsetlib "istio.io/istio/cni/pkg/ipset"
"istio.io/istio/pkg/config/constants"
"istio.io/pkg/env"
"istio.io/istio/pkg/env"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions cni/pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ import (
"istio.io/istio/cni/pkg/monitoring"
"istio.io/istio/cni/pkg/repair"
"istio.io/istio/pkg/cmd"
"istio.io/istio/pkg/collateral"
"istio.io/istio/pkg/ctrlz"
"istio.io/istio/pkg/env"
"istio.io/istio/pkg/log"
"istio.io/istio/pkg/version"
iptables "istio.io/istio/tools/istio-iptables/pkg/constants"
"istio.io/pkg/collateral"
"istio.io/pkg/ctrlz"
"istio.io/pkg/env"
"istio.io/pkg/log"
"istio.io/pkg/version"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/ebpf/server/redirectionServer_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ import (
"github.com/josharian/native"
"golang.org/x/sys/unix"

istiolog "istio.io/istio/pkg/log"
"istio.io/istio/pkg/util/istiomultierror"
"istio.io/istio/pkg/util/sets"
istiolog "istio.io/pkg/log"
)

var log = istiolog.RegisterScope("ebpf", "ambient ebpf")
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"istio.io/istio/cni/pkg/constants"
"istio.io/istio/cni/pkg/util"
"istio.io/istio/pkg/file"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

var installLog = log.RegisterScope("install", "CNI install")
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/install/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package install

import "istio.io/pkg/monitoring"
import "istio.io/istio/pkg/monitoring"

var (
resultLabel = monitoring.MustCreateLabel("result")
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/log/uds.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"sync"

"istio.io/istio/cni/pkg/constants"
"istio.io/istio/pkg/log"
"istio.io/istio/pkg/network"
"istio.io/istio/pkg/uds"
"istio.io/pkg/log"
)

var pluginLog = log.RegisterScope("cni", "CNI network plugin")
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/log/uds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

"istio.io/istio/cni/pkg/constants"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

func TestUDSLog(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/monitoring/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/prometheus/client_golang/prometheus"
"go.opencensus.io/stats/view"

"istio.io/istio/pkg/log"
"istio.io/istio/pkg/network"
"istio.io/pkg/log"
)

func SetupMonitoring(port int, path string, stop <-chan struct{}) {
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/plugin/ambient.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"istio.io/istio/cni/pkg/ambient"
"istio.io/istio/cni/pkg/ambient/ambientpod"
ebpf "istio.io/istio/cni/pkg/ebpf/server"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

func checkAmbient(conf Config, ambientConfig ambient.AmbientConfigFile, podName, podNamespace, podIfname, podNetNs string, podIPs []net.IPNet) (bool, error) {
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/plugin/iptables_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"github.com/containernetworking/plugins/pkg/ns"
"github.com/spf13/viper"

"istio.io/istio/pkg/log"
"istio.io/istio/tools/istio-iptables/pkg/cmd"
"istio.io/istio/tools/istio-iptables/pkg/constants"
"istio.io/istio/tools/istio-iptables/pkg/dependencies"
"istio.io/pkg/log"
)

// getNs is a unit test override variable for interface create.
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/plugin/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"k8s.io/client-go/kubernetes"

"istio.io/istio/pkg/kube"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

// newKubeClient is a unit test override variable for interface create.
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"istio.io/api/label"
"istio.io/istio/cni/pkg/ambient"
"istio.io/istio/cni/pkg/constants"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/plugin/redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"strings"

"istio.io/api/annotation"
"istio.io/istio/pkg/log"
"istio.io/istio/tools/istio-iptables/pkg/cmd"
"istio.io/pkg/log"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/repair/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package repair

import (
"istio.io/pkg/monitoring"
"istio.io/istio/pkg/monitoring"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/repair/repair.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"istio.io/istio/cni/pkg/config"
"istio.io/istio/pkg/kube"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

var repairLog = log.RegisterScope("repair", "CNI race condition repair")
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/repair/repair_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (

"istio.io/istio/cni/pkg/config"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/monitoring"
"istio.io/istio/pkg/test"
"istio.io/istio/pkg/test/util/assert"
"istio.io/istio/pkg/test/util/retry"
"istio.io/istio/tools/istio-iptables/pkg/constants"
"istio.io/pkg/monitoring"
)

func TestMatchesFilter(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cni/pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/fsnotify/fsnotify"

"istio.io/istio/pkg/file"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

type Watcher struct {
Expand Down
2 changes: 1 addition & 1 deletion cni/test/install_cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import (
"istio.io/istio/cni/pkg/constants"
"istio.io/istio/cni/pkg/util"
"istio.io/istio/pkg/file"
"istio.io/istio/pkg/log"
"istio.io/istio/pkg/test/env"
"istio.io/istio/pkg/test/util/retry"
"istio.io/pkg/log"
)

const (
Expand Down
14 changes: 7 additions & 7 deletions common/scripts/report_build_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ GIT_DESCRIBE_TAG=$(git describe --tags --always)
HUB=${HUB:-"docker.io/istio"}

# used by common/scripts/gobuild.sh
echo "istio.io/pkg/version.buildVersion=${VERSION:-$BUILD_GIT_REVISION}"
echo "istio.io/pkg/version.buildGitRevision=${BUILD_GIT_REVISION}"
echo "istio.io/pkg/version.buildStatus=${tree_status}"
echo "istio.io/pkg/version.buildTag=${GIT_DESCRIBE_TAG}"
echo "istio.io/pkg/version.buildHub=${HUB}"
echo "istio.io/pkg/version.buildOS=${BUILD_GOOS}"
echo "istio.io/pkg/version.buildArch=${BUILD_GOARCH}"
echo "istio.io/istio/pkg/version.buildVersion=${VERSION:-$BUILD_GIT_REVISION}"
echo "istio.io/istio/pkg/version.buildGitRevision=${BUILD_GIT_REVISION}"
echo "istio.io/istio/pkg/version.buildStatus=${tree_status}"
echo "istio.io/istio/pkg/version.buildTag=${GIT_DESCRIBE_TAG}"
echo "istio.io/istio/pkg/version.buildHub=${HUB}"
echo "istio.io/istio/pkg/version.buildOS=${BUILD_GOOS}"
echo "istio.io/istio/pkg/version.buildArch=${BUILD_GOARCH}"
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ require (
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools/v3 v3.4.0
helm.sh/helm/v3 v3.12.0
istio.io/api v0.0.0-20230518150027-e073a8237a55
istio.io/client-go v1.18.0-alpha.0.0.20230518151028-33fdba04fa87
istio.io/pkg v0.0.0-20230522185617-f67c6e9a86a3
k8s.io/api v0.27.1
k8s.io/apiextensions-apiserver v0.27.1
k8s.io/apimachinery v0.27.1
Expand Down Expand Up @@ -144,7 +144,7 @@ require (
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.2.4
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
Expand Down Expand Up @@ -200,7 +200,7 @@ require (
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/prom2json v1.3.2 // indirect
github.com/prometheus/prom2json v1.3.2
github.com/prometheus/statsd_exporter v0.23.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
Expand All @@ -210,7 +210,7 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spaolacci/murmur3 v1.1.0
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -225,7 +225,7 @@ require (
github.com/xlab/treeprint v1.1.0 // indirect
go.starlark.net v0.0.0-20211013185944-b0039bd2cfe3 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
go.uber.org/zap v1.24.0
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53
golang.org/x/mod v0.10.0 // indirect
Expand All @@ -236,7 +236,7 @@ require (
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1
k8s.io/component-base v0.27.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.2 // indirect
Expand Down
4 changes: 1 addition & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1400,9 +1400,9 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
helm.sh/helm/v3 v3.12.0 h1:rOq2TPVzg5jt4q5ermAZGZFxNW2uQhKjRhBneAutMEM=
helm.sh/helm/v3 v3.12.0/go.mod h1:8K/469yxjUMu6BaD2EagCitkPjELUL/l2AgCO142G94=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand All @@ -1416,8 +1416,6 @@ istio.io/api v0.0.0-20230518150027-e073a8237a55 h1:hSFRo6K2TwbMEX1sCFhKNU4WrZuyF
istio.io/api v0.0.0-20230518150027-e073a8237a55/go.mod h1:dDMe1TsOtrRoUlBzdxqNolWXpXPQjLfbcXvqPMtQ6eo=
istio.io/client-go v1.18.0-alpha.0.0.20230518151028-33fdba04fa87 h1:0eUNPPzl9sdVLQVK8Bg5cIkXPl1dhoPOjduiGPC/r9g=
istio.io/client-go v1.18.0-alpha.0.0.20230518151028-33fdba04fa87/go.mod h1:tABhyDDKh6k9KHKKkosdEjda1kgA7baHGDZjCp9gRco=
istio.io/pkg v0.0.0-20230522185617-f67c6e9a86a3 h1:urJqPF5rt/Dl0QmDgEhTeG0NlBLYhOgXZd/aRkSACOY=
istio.io/pkg v0.0.0-20230522185617-f67c6e9a86a3/go.mod h1:FG1U+zhMPAPsxXODdBFwdGiQO96ZEqgVGJWe3wd7aOg=
k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78=
k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA=
k8s.io/api v0.18.4/go.mod h1:lOIQAKYgai1+vz9J7YcDZwC26Z0zQewYOGWdyIPUUQ4=
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import (
"istio.io/istio/pkg/config/analysis/msg"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/log"
"istio.io/istio/pkg/url"
"istio.io/pkg/log"
)

// AnalyzerFoundIssuesError indicates that at least one analyzer found problems.
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"istio.io/istio/istioctl/pkg/util/configdump"
"istio.io/istio/istioctl/pkg/util/handlers"
"istio.io/istio/pkg/kube"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

var configDumpFile string
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/spf13/viper"

"istio.io/istio/pkg/config/constants"
"istio.io/pkg/env"
"istio.io/istio/pkg/env"
)

// settableFlags are the flags used to istioctl
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"istio.io/istio/istioctl/pkg/clioptions"
"istio.io/istio/istioctl/pkg/util/handlers"
"istio.io/istio/pkg/kube"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import (
"istio.io/istio/pkg/config/mesh"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/kube/inject"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

type myProtoValue struct {
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/istioctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"

"istio.io/istio/istioctl/cmd"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/istiodconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"istio.io/api/label"
"istio.io/istio/istioctl/pkg/clioptions"
"istio.io/istio/istioctl/pkg/util/handlers"
"istio.io/pkg/log"
"istio.io/istio/pkg/log"
)

type flagState interface {
Expand Down
4 changes: 2 additions & 2 deletions istioctl/cmd/kubeinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ import (
"istio.io/istio/pkg/config/mesh"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/kube/inject"
"istio.io/istio/pkg/log"
"istio.io/istio/pkg/util/protomarshal"
"istio.io/pkg/log"
"istio.io/pkg/version"
"istio.io/istio/pkg/version"
)

const (
Expand Down
Loading

0 comments on commit bd9e52d

Please sign in to comment.