Skip to content

feat(googlecloudcaik8s): generate GKE cluster and nodepool timeline revisions from Cloud Asset Inventory - #1002

Merged
kyasbal merged 12 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-nsuuoyzxtuwz
Sep 15, 2026
Merged

kyasbal merged 12 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-nsuuoyzxtuwz

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary

This pull request adds support for generating GKE cluster and nodepool timeline revisions from Cloud Asset Inventory (CAI) temporal assets, and integrates them with GKE API audit logs.

Key Changes

  1. CAI GKE Resource Fetcher and Ingester:
    • Implemented CAIGKEResourceFetcherTask to query temporal history for container.googleapis.com/Cluster and container.googleapis.com/NodePool from CAI.
    • Implemented CAIGKEResourceLogIngesterTask to parse and normalize temporal asset entries.
  2. CAI GKE Resource Timeline Mapper:
    • Implemented CAIGKEResourceTimelineMapperTask to construct timeline revisions (SnapshotFromCAI, NodePoolExistenceUndetermined) for clusters and nodepools.
    • Handled cases where nodepools are created after the query window start time.
    • Added task selector logic to automatically enable the CAI GKE timeline mapper when GKE audit logging is enabled.
  3. Integration with GKE API Audit Logs:
    • Implemented CAIGKEInitialResourceStateProvider to supply initial cluster and nodepool manifests at the start of the inspection window to the audit log parser.
    • Implemented InitialResourceStateTask in googlecloudloggkeapiaudit to inject initial state into the operation tracker.
    • Enhanced OperationTracker and audit log parser tasks to suppress redundant LogNotFound revisions when an initial resource state exists, and accurately record initial manifests and update operations.
  4. Style Assets:
    • Updated MSDF icon codepoints and atlas assets for cluster and nodepool visual indicators.

Testing

  • Comprehensive unit tests added for all new tasks, providers, timeline mappers, and parser integrations.
  • Verified passes with make test-go, make lint-go, and make pre-commit.
@kyasbal kyasbal added type:feature New feature or request area:backend-parser Log parsers and log timeline mapper tasks area:khifile .khi file format, serialization, and schema labels Sep 15, 2026

@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 support for fetching and mapping GKE cluster and node pool snapshots from Cloud Asset Inventory (CAI) to the timeline, including initial state extraction and integration with GKE API audit logs. Feedback on the changes suggests avoiding hex color conversions in favor of raw style.Color values to align with the display-p3 color space, and simplifying redundant nil checks before calling protobuf getter methods in the newly added files.

@kyasbal
kyasbal marked this pull request as ready for review September 15, 2026 06:53
@kyasbal
kyasbal added this pull request to the merge queue Sep 15, 2026
Merged via the queue into GoogleCloudPlatform:main with commit e47b20d Sep 15, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-nsuuoyzxtuwz branch September 15, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend-parser Log parsers and log timeline mapper tasks area:khifile .khi file format, serialization, and schema type:feature New feature or request

1 participant