Skip to content

feat(csmcp): support in-cluster CSM control plane log inspection - #1003

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
K53:push-muvopstuwnrt
Sep 15, 2026
Merged

kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
K53:push-muvopstuwnrt

Conversation

@K53

@K53 K53 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds inspection tasks and timeline models for in-cluster CSM control plane (Istiod) logs.

Changes

  • pkg/task/inspection/commonlogcsmcp:
    • Adds ParsePodIdentifier to extract client Pod names, namespaces, and connection IDs from Istiod log messages.
    • Implements MapPodAndConnectionTimelines to track xDS connection lifecycles (connect / terminate) and map events onto the respective Pod's timeline (CSM CP, connection-<id>).
  • pkg/task/inspection/googlecloudlogcsmcp:
    • Implements IstiodLogFilterTask to filter discovery container logs from istiod pods.
    • Adds extractor and timeline mapper tasks registered for Google Cloud Kubernetes inspection.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new parser and timeline mapper for CSM CP (Control Plane) logs, including pod identifier parsing, connection state tracking, and Google Cloud log extraction with comprehensive unit tests. The feedback advises replacing discouraged hex color notations with style.Color raw RGB values in log_type.go and timeline_type.go to align with KHI's display-p3 color space.

LogTypeCSMCP = style.MustRegisterLogType(
"csmcp",
"CSM CP Logs",
style.MustForceConvertSRGBHex("#4285F4"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Hex color notations are discouraged in KHI because it uses the display-p3 color space. Please use style.Color with raw RGB values instead.

Suggested change
style.MustForceConvertSRGBHex("#4285F4"),
style.Color{R: 66.0 / 255.0, G: 133.0 / 255.0, B: 244.0 / 255.0, A: 1.0},
References
  1. Discourage using hex notations (such as style.MustForceConvertSRGBHex) to represent colors in KHI, as it uses the display-p3 color space. Use style.Color with raw values instead.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ACK

0.6,
style.ColorWhite,
style.ColorBlack,
style.MustForceConvertSRGBHex("#ff8500"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Hex color notations are discouraged in KHI because it uses the display-p3 color space. Please use style.Color with raw RGB values instead.

Suggested change
style.MustForceConvertSRGBHex("#ff8500"),
style.Color{R: 255.0 / 255.0, G: 133.0 / 255.0, B: 0.0 / 255.0, A: 1.0},
References
  1. Discourage using hex notations (such as style.MustForceConvertSRGBHex) to represent colors in KHI, as it uses the display-p3 color space. Use style.Color with raw values instead.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ACK

0.6,
style.ColorWhite,
style.ColorBlack,
style.MustForceConvertSRGBHex("#ff8500"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Hex color notations are discouraged in KHI because it uses the display-p3 color space. Please use style.Color with raw RGB values instead.

Suggested change
style.MustForceConvertSRGBHex("#ff8500"),
style.Color{R: 255.0 / 255.0, G: 133.0 / 255.0, B: 0.0 / 255.0, A: 1.0},
References
  1. Discourage using hex notations (such as style.MustForceConvertSRGBHex) to represent colors in KHI, as it uses the display-p3 color space. Use style.Color with raw values instead.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ACK

@K53
K53 force-pushed the push-muvopstuwnrt branch from d3e1975 to 9309e9b Compare September 15, 2026 06:10
@kyasbal
kyasbal added this pull request to the merge queue Sep 15, 2026
Merged via the queue into GoogleCloudPlatform:main with commit fb33292 Sep 15, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants