Skip to content

istioctl x proxy-status via istio agents. #40623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 17, 2022

Conversation

ingwonsong
Copy link
Contributor

@ingwonsong ingwonsong commented Aug 24, 2022

This PR proposes an experimental option --xds-via-agents only for istioctl x proxy-status command, which sends a query for istioctl x proxy-status via istio agents, instead of direct query to istiod.

istioctl x proxy-status try to find all the istiod instances by searching pods in istio-system namespace.
But, if we use the external istiods, this way may not work.

For example, istiod can be deployed in the other cluster or out of K8S. Moreover, in front of the istiod instances, some sort of load balancer can be set to distribute the connections to multiple istiods. This kind of configuration may happen when the customer want to isolate their control plane from the workloads, or when they are using some managed control plane.

In such case, istioctl x proxy-status cannot enumerate and access to each istiod instance directly. So, this PR proposes to access istiod via "istio agent".

Please note that, by #40566, we can make a query to istiod via istio agents efficiently.

@ingwonsong ingwonsong requested review from a team as code owners August 24, 2022 03:53
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 24, 2022
@ingwonsong ingwonsong added the release-notes-none Indicates a PR that does not require release notes. label Aug 24, 2022
@ingwonsong ingwonsong requested a review from hzxuzhonghu August 24, 2022 12:35
Copy link
Member

@zirain zirain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ingwonsong
Copy link
Contributor Author

@therealmitchconnors Wam reminder

@ingwonsong ingwonsong added the do-not-merge Block automatic merging of a PR. label Aug 30, 2022
@ingwonsong
Copy link
Contributor Author

To wait for #40721, I set this to do-not-merge.

@ingwonsong
Copy link
Contributor Author

As #40721 supports the 15004 port as well, don't need to wait for the PR.

@ingwonsong ingwonsong added area/user experience and removed do-not-merge Block automatic merging of a PR. area/user experience labels Sep 1, 2022
@ingwonsong
Copy link
Contributor Author

/retest

@istio-testing istio-testing merged commit d86fa8b into istio:master Sep 17, 2022
ingwonsong added a commit to ingwonsong/istio that referenced this pull request Sep 17, 2022
* `istioctl ps` via istio agents.

* Fix lint errors

* Fix lint errors

* Use k8s client_go instead of RESTClient

* Update pkg/kube/client.go

Co-authored-by: John Howard <howardjohn@google.com>

* Use constant for "status.phase=Running"

* Use the revision in the annotation instead of labels for the injected pods

* Add xds-via-agents-limit flag

* Reflect the comments and refactoring

Co-authored-by: John Howard <howardjohn@google.com>
@ingwonsong ingwonsong deleted the istio-ps-via-agent branch September 17, 2022 22:29
ingwonsong added a commit to ingwonsong/istio that referenced this pull request Sep 18, 2022
* `istioctl ps` via istio agents.

* Fix lint errors

* Fix lint errors

* Use k8s client_go instead of RESTClient

* Update pkg/kube/client.go

Co-authored-by: John Howard <howardjohn@google.com>

* Use constant for "status.phase=Running"

* Use the revision in the annotation instead of labels for the injected pods

* Add xds-via-agents-limit flag

* Reflect the comments and refactoring

Co-authored-by: John Howard <howardjohn@google.com>
@ingwonsong
Copy link
Contributor Author

/cherrypick release-1.15

@istio-testing
Copy link
Collaborator

@ingwonsong: #40623 failed to apply on top of branch "release-1.15":

Applying: `istioctl ps` via istio agents.
Applying: Fix lint errors
Applying: Fix lint errors
Applying: Use k8s client_go instead of RESTClient
Applying: Update pkg/kube/client.go
Applying: Use constant for "status.phase=Running"
Applying: Use the revision in the annotation instead of labels for the injected pods
Applying: Add xds-via-agents-limit flag
Applying: Reflect the comments and refactoring
Using index info to reconstruct a base tree...
M	istioctl/cmd/internal-debug.go
M	istioctl/cmd/proxystatus.go
M	istioctl/pkg/multixds/gather.go
Falling back to patching base and 3-way merge...
Auto-merging istioctl/pkg/multixds/gather.go
CONFLICT (content): Merge conflict in istioctl/pkg/multixds/gather.go
Auto-merging istioctl/cmd/proxystatus.go
Auto-merging istioctl/cmd/internal-debug.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0009 Reflect the comments and refactoring
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@istio-testing
Copy link
Collaborator

@ingwonsong: new issue created for failed cherrypick: #41040

In response to this:

/cherrypick release-1.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

istio-testing pushed a commit that referenced this pull request Sep 19, 2022
* `istioctl ps` via istio agents.

* Fix lint errors

* Fix lint errors

* Use k8s client_go instead of RESTClient

* Update pkg/kube/client.go

Co-authored-by: John Howard <howardjohn@google.com>

* Use constant for "status.phase=Running"

* Use the revision in the annotation instead of labels for the injected pods

* Add xds-via-agents-limit flag

* Reflect the comments and refactoring

Co-authored-by: John Howard <howardjohn@google.com>

Co-authored-by: John Howard <howardjohn@google.com>
ingwonsong added a commit to ingwonsong/istio that referenced this pull request Sep 19, 2022
* `istioctl ps` via istio agents.

* Fix lint errors

* Fix lint errors

* Use k8s client_go instead of RESTClient

* Update pkg/kube/client.go

Co-authored-by: John Howard <howardjohn@google.com>

* Use constant for "status.phase=Running"

* Use the revision in the annotation instead of labels for the injected pods

* Add xds-via-agents-limit flag

* Reflect the comments and refactoring

Co-authored-by: John Howard <howardjohn@google.com>
istio-testing pushed a commit that referenced this pull request Sep 19, 2022
* Send only the Cluster ID (#40477)

* Add Tap gRPC handler to Istio Agent. (#40566)

* Add Tap GRPC handler to Istio Agent.

* Fix lint errors

* Add the integration test

* `istioctl x proxy-status` via istio agents. (#40623)

* `istioctl ps` via istio agents.

* Fix lint errors

* Fix lint errors

* Use k8s client_go instead of RESTClient

* Update pkg/kube/client.go

Co-authored-by: John Howard <howardjohn@google.com>

* Use constant for "status.phase=Running"

* Use the revision in the annotation instead of labels for the injected pods

* Add xds-via-agents-limit flag

* Reflect the comments and refactoring

Co-authored-by: John Howard <howardjohn@google.com>

Co-authored-by: John Howard <howardjohn@google.com>
ingwonsong added a commit to ingwonsong/istio that referenced this pull request Oct 25, 2022
* `istioctl ps` via istio agents.

* Fix lint errors

* Fix lint errors

* Use k8s client_go instead of RESTClient

* Update pkg/kube/client.go

Co-authored-by: John Howard <howardjohn@google.com>

* Use constant for "status.phase=Running"

* Use the revision in the annotation instead of labels for the injected pods

* Add xds-via-agents-limit flag

* Reflect the comments and refactoring

Co-authored-by: John Howard <howardjohn@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user experience release-notes-none Indicates a PR that does not require release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants