Skip to content

Add kyma alpha diagnose istio subcommand (programmatic istioctl analyze) #2650

@kwiatekus

Description

@kwiatekus

Description
Introduce a new subcommand kyma alpha diagnose istio that runs Istio configuration diagnostics (equivalent to istioctl analyze) using the Istio Go analysis pkg and outputs findings (warnings/errors) to stdout (human or JSON/YAML) or an optional file, enabling CI and deeper Day‑2 troubleshooting.

Reason
It takes too much time to gather all the information from the target cluster in order to detect misconfigurations. The cluster user or the support engineer would need to install istioctl separately. Embedding it's capabilities in kyma alpha diagnose would :

  • Reduces tooling friction (single CLI).
  • Allows structured machine‑/human-readable output for CI gates and support tickets.

Ideas (to refine)

kyma alpha diagnose istio [flags]

Flags

  • --namespace/-n <ns>: Limit analysis to a namespace (default: all).
  • --all-namespaces/-A: Explicitly analyze all namespaces (mutually exclusive with --namespace).
  • --format: Output format (possible values: json, yaml)
  • --output: Path to the diagnostic output file. If not provided the output is printed to stdout
  • --verbose: Display verbose output, including error details during diagnostics collection
  • --timeout : Timeout for analysis

Please be thoughtful of the final binary size when including istio analyse package

Acceptance Criteria

  • Running without flags analyses all namespaces and returns warnings/errors similar to istioctl analyze.
  • JSON/YAML format modes produce valid content for for jq/yq parsing.
  • Command completes under default timeout value
  • Match dependency versions with the istio version

Attachments
https://istio.io/latest/docs/ops/diagnostic-tools/istioctl-analyze/
https://github.com/istio/istio/tree/master/pkg/config/analysis

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions