Skip to content

Conversation

@ArnobKumarSaha
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new debug utility for gateway components to the CLI tool. The debug command provides comprehensive collection of gateway-related Kubernetes resources, logs, and configurations for troubleshooting purposes.

Key changes:

  • Adds a new debug command with gateway subcommand functionality
  • Implements collection of gateway resources (gateways, routes, secrets, certificates, etc.)
  • Includes log collection from gateway operators and envoy proxies
  • Updates Go version and adds required dependencies for gateway APIs

Reviewed Changes

Copilot reviewed 12 out of 5266 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/cmds/root.go Adds debug command and comments out cloud_swap command
pkg/cmds/debug/debug.go Main debug command entry point
pkg/cmds/debug/gateway/gateway.go Core gateway debug functionality and command setup
pkg/cmds/debug/gateway/yamls_gw.go Gateway resource collection (gateways, classes, envoy proxy)
pkg/cmds/debug/gateway/yamls.go Additional resource collection (helm releases, secrets, services)
pkg/cmds/debug/gateway/routes.go Route resource collection with parent reference filtering
pkg/cmds/debug/gateway/logs.go Log collection from operator and gateway pods
pkg/cmds/debug/gateway/helpers.go Utility functions for YAML writing and resource mapping
pkg/cmds/debug/gateway/config_dump.go Envoy configuration dump collection via port forwarding
pkg/cmds/debug/gateway/cert.go Certificate-related resource collection
pkg/cmds/debug/gateway/binding.go Database binding resource collection
go.mod Updates Go version and adds gateway API dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

func (g *gatewayOpts) getKindFromResource(res string) string {
kind, exists := g.resMap[res]
if !exists {
_ = fmt.Errorf("resource %s not supported", res)
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

Error is created but discarded with underscore assignment. This should either return the error or log it for debugging purposes.

Copilot uses AI. Check for mistakes.
@ArnobKumarSaha ArnobKumarSaha force-pushed the gw branch 3 times, most recently from 23e7fdd to 0d07eab Compare October 30, 2025 16:43
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha ArnobKumarSaha merged commit a993746 into master Oct 31, 2025
4 checks passed
@ArnobKumarSaha ArnobKumarSaha deleted the gw branch October 31, 2025 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants