Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/e2e/util/common/e2e_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/istio-ecosystem/sail-operator/pkg/test/project"
. "github.com/istio-ecosystem/sail-operator/tests/e2e/util/gomega"
"github.com/istio-ecosystem/sail-operator/tests/e2e/util/helm"
"github.com/istio-ecosystem/sail-operator/tests/e2e/util/istioctl"
"github.com/istio-ecosystem/sail-operator/tests/e2e/util/kubectl"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -217,6 +218,10 @@ func logIstioDebugInfo(k kubectl.Kubectl) {

events, err := k.WithNamespace(controlPlaneNamespace).GetEvents()
logDebugElement("=====Events in "+controlPlaneNamespace+"=====", events, err)

// Running istioctl proxy-status to get the status of the proxies.
proxyStatus, err := istioctl.GetProxyStatus()
logDebugElement("=====Istioctl Proxy Status=====", proxyStatus, err)
}

func logCNIDebugInfo(k kubectl.Kubectl) {
Expand Down
10 changes: 10 additions & 0 deletions tests/e2e/util/istioctl/istioctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,13 @@ func CreateRemoteSecret(remoteKubeconfig, namespace, secretName, internalIP stri

return yaml, err
}

// GetProxyStatus runs istioctl proxy-status command and return the output
func GetProxyStatus() (string, error) {
cmd := istioctl("proxy-status")
status, err := shell.ExecuteCommand(cmd)
if err != nil {
return "", fmt.Errorf("failed to get proxy status: %w", err)
}
return status, nil
}