Skip to content

Commit

Permalink
Merge branch 'master' into ambient-service-entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Dorosh committed Jul 6, 2023
2 parents 5c095d9 + d141058 commit ce14466
Show file tree
Hide file tree
Showing 28 changed files with 305 additions and 280 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ require (
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.12.0
istio.io/api v1.19.0-alpha.1.0.20230705175328-06b855377ac9
istio.io/client-go v1.19.0-alpha.1.0.20230705180028-f9f467b8f96c
istio.io/client-go v1.19.0-alpha.1.0.20230706021632-17aeadfe3d59
k8s.io/api v0.27.2
k8s.io/apiextensions-apiserver v0.27.2
k8s.io/apimachinery v0.27.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1410,8 +1410,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
istio.io/api v1.19.0-alpha.1.0.20230705175328-06b855377ac9 h1:cy0AAjnxE/gbhwRQgB6DQyVUVXKd6MwpVX1OjbzYj1g=
istio.io/api v1.19.0-alpha.1.0.20230705175328-06b855377ac9/go.mod h1:dDMe1TsOtrRoUlBzdxqNolWXpXPQjLfbcXvqPMtQ6eo=
istio.io/client-go v1.19.0-alpha.1.0.20230705180028-f9f467b8f96c h1:P3oYPV0jVnt+tCqoOe5PzB1be5ZCaC81Nsn8q2/AuNo=
istio.io/client-go v1.19.0-alpha.1.0.20230705180028-f9f467b8f96c/go.mod h1:iZEQKN0PqDCiJavyhJXa/L3F11TK0tHFEwtj4PoY1KQ=
istio.io/client-go v1.19.0-alpha.1.0.20230706021632-17aeadfe3d59 h1:B44fB+L9MQvtOen4QSSJmzsRlk09BJeU9BXrQ2+yh+o=
istio.io/client-go v1.19.0-alpha.1.0.20230706021632-17aeadfe3d59/go.mod h1:iZEQKN0PqDCiJavyhJXa/L3F11TK0tHFEwtj4PoY1KQ=
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 istio.deps
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "PROXY_REPO_SHA",
"repoName": "proxy",
"file": "",
"lastStableSHA": "27fa7c4e135ea1376b04ef417af53c348b54e643"
"lastStableSHA": "84f18fcd49d1a88d7157be055ab46ef82eb8ab04"
},
{
"_comment": "",
Expand Down
1 change: 0 additions & 1 deletion istioctl/pkg/proxyconfig/proxyconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,6 @@ func secretConfigCmd(ctx cli.Context) *cobra.Command {
secretConfigCmd.PersistentFlags().StringVarP(&outputFormat, "output", "o", summaryOutput, "Output format: one of json|yaml|short")
secretConfigCmd.PersistentFlags().StringVarP(&configDumpFile, "file", "f", "",
"Envoy config dump JSON file")
secretConfigCmd.Long += "\n\n" + istioctlutil.ExperimentalMsg
return secretConfigCmd
}

Expand Down
38 changes: 19 additions & 19 deletions istioctl/pkg/tag/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@ func tagSetCommand(ctx cli.Context) *cobra.Command {
Short: "Create or modify revision tags",
Long: `Create or modify revision tags. Tag an Istio control plane revision for use with namespace istio.io/rev
injection labels.`,
Example: ` # Create a revision tag from the "1-8-0" revision
istioctl tag set prod --revision 1-8-0
Example: ` # Create a revision tag from the "1-8-0" revision
istioctl tag set prod --revision 1-8-0
# Point namespace "test-ns" at the revision pointed to by the "prod" revision tag
kubectl label ns test-ns istio.io/rev=prod
# Point namespace "test-ns" at the revision pointed to by the "prod" revision tag
kubectl label ns test-ns istio.io/rev=prod
# Change the revision tag to reference the "1-8-1" revision
istioctl tag set prod --revision 1-8-1 --overwrite
# Change the revision tag to reference the "1-8-1" revision
istioctl tag set prod --revision 1-8-1 --overwrite
# Make revision "1-8-1" the default revision, both resulting in that revision handling injection for "istio-injection=enabled"
# and validating resources cluster-wide
istioctl tag set default --revision 1-8-1
# Make revision "1-8-1" the default revision, both resulting in that revision handling injection for "istio-injection=enabled"
# and validating resources cluster-wide
istioctl tag set default --revision 1-8-1
# Rollout namespace "test-ns" to update workloads to the "1-8-1" revision
kubectl rollout restart deployments -n test-ns
# Rollout namespace "test-ns" to update workloads to the "1-8-1" revision
kubectl rollout restart deployments -n test-ns
`,
SuggestFor: []string{"create"},
Args: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -164,17 +164,17 @@ func tagGenerateCommand(ctx cli.Context) *cobra.Command {
Short: "Generate configuration for a revision tag to stdout",
Long: `Create a revision tag and output to the command's stdout. Tag an Istio control plane revision for use with namespace istio.io/rev
injection labels.`,
Example: ` # Create a revision tag from the "1-8-0" revision
istioctl tag generate prod --revision 1-8-0 > tag.yaml
Example: ` # Create a revision tag from the "1-8-0" revision
istioctl tag generate prod --revision 1-8-0 > tag.yaml
# Apply the tag to cluster
kubectl apply -f tag.yaml
# Apply the tag to cluster
kubectl apply -f tag.yaml
# Point namespace "test-ns" at the revision pointed to by the "prod" revision tag
kubectl label ns test-ns istio.io/rev=prod
# Point namespace "test-ns" at the revision pointed to by the "prod" revision tag
kubectl label ns test-ns istio.io/rev=prod
# Rollout namespace "test-ns" to update workloads to the "1-8-0" revision
kubectl rollout restart deployments -n test-ns
# Rollout namespace "test-ns" to update workloads to the "1-8-0" revision
kubectl rollout restart deployments -n test-ns
`,
Args: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
Expand Down
24 changes: 12 additions & 12 deletions istioctl/pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,21 @@ func XdsVersionCommand(ctx cli.Context) *cobra.Command {
}
return nil
}
versionCmd.Example = `# Retrieve version information directly from the control plane, using token security
# (This is the usual way to get the control plane version with an out-of-cluster control plane.)
istioctl x version --xds-address istio.cloudprovider.example.com:15012
versionCmd.Example = ` # Retrieve version information directly from the control plane, using token security
# (This is the usual way to get the control plane version with an out-of-cluster control plane.)
istioctl x version --xds-address istio.cloudprovider.example.com:15012
# Retrieve version information via Kubernetes config, using token security
# (This is the usual way to get the control plane version with an in-cluster control plane.)
istioctl x version
# Retrieve version information via Kubernetes config, using token security
# (This is the usual way to get the control plane version with an in-cluster control plane.)
istioctl x version
# Retrieve version information directly from the control plane, using RSA certificate security
# (Certificates must be obtained before this step. The --cert-dir flag lets istioctl bypass the Kubernetes API server.)
istioctl x version --xds-address istio.example.com:15012 --cert-dir ~/.istio-certs
# Retrieve version information directly from the control plane, using RSA certificate security
# (Certificates must be obtained before this step. The --cert-dir flag lets istioctl bypass the Kubernetes API server.)
istioctl x version --xds-address istio.example.com:15012 --cert-dir ~/.istio-certs
# Retrieve version information via XDS from specific control plane in multi-control plane in-cluster configuration
# (Select a specific control plane in an in-cluster canary Istio configuration.)
istioctl x version --xds-label istio.io/rev=default
# Retrieve version information via XDS from specific control plane in multi-control plane in-cluster configuration
# (Select a specific control plane in an in-cluster canary Istio configuration.)
istioctl x version --xds-label istio.io/rev=default
`

versionCmd.Flags().VisitAll(func(flag *pflag.Flag) {
Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/apis/istio/v1alpha1/values_types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 1 addition & 11 deletions pilot/pkg/model/envoyfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func convertToEnvoyFilterWrapper(local *config.Config) *EnvoyFilterWrapper {
cpw := &EnvoyFilterConfigPatchWrapper{
Name: local.Name,
Namespace: local.Namespace,
FullName: genFullName(local.Namespace, local.Name),
FullName: local.Namespace + "/" + local.Name,
ApplyTo: cp.ApplyTo,
Match: cp.Match,
Operation: cp.Patch.Operation,
Expand Down Expand Up @@ -202,16 +202,6 @@ func (efw *EnvoyFilterWrapper) KeysApplyingTo(applyTo ...networking.EnvoyFilter_
return sets.SortedList(keys)
}

func genFullName(namespace, name string) string {
b := strings.Builder{}
b.Grow(len(namespace) + len(name) + 1)

b.WriteString(namespace)
b.WriteString("/")
b.WriteString(name)
return b.String()
}

func (cpw *EnvoyFilterConfigPatchWrapper) Key() string {
if cpw == nil {
return ""
Expand Down
10 changes: 5 additions & 5 deletions pilot/pkg/model/envoyfilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,29 +142,29 @@ func TestKeysApplyingTo(t *testing.T) {
{
Name: "http",
Namespace: "ns",
FullName: genFullName("ns", "http"),
FullName: "ns/http",
},
},
networking.EnvoyFilter_NETWORK_FILTER: {
{
Name: "b",
Namespace: "ns",
FullName: genFullName("ns", "b"),
FullName: "ns/b",
},
{
Name: "c",
Namespace: "ns",
FullName: genFullName("ns", "c"),
FullName: "ns/c",
},
{
Name: "a",
Namespace: "ns",
FullName: genFullName("ns", "a"),
FullName: "ns/a",
},
{
Name: "a",
Namespace: "ns",
FullName: genFullName("ns", "a"),
FullName: "ns/a",
},
},
},
Expand Down

0 comments on commit ce14466

Please sign in to comment.