Skip to content

fix: improve ServiceAccount reconciliation with smart patching - #288

Merged
dmolik merged 4 commits into
hyperspike:mainfrom
alanhe:main
Sep 15, 2025
Merged

dmolik merged 4 commits into
hyperspike:mainfrom
alanhe:main

Conversation

@alanhe

@alanhe alanhe commented Aug 14, 2025

Copy link
Copy Markdown

Fix: #287

Enhance the ServiceAccount upsert logic to avoid unnecessary updates by:

  • Only patching when labels or controller references have changed
  • Using merge patches instead of full updates to preserve other fields
  • Adding helper functions for label comparison and merging
  • Implementing proper owner reference validation

This reduces API server load and prevents conflicts with other controllers that may modify ServiceAccount resources.

He, Zheng and others added 2 commits August 14, 2025 12:56
Enhance the ServiceAccount upsert logic to avoid unnecessary updates by:
- Only patching when labels or controller references have changed
- Using merge patches instead of full updates to preserve other fields
- Adding helper functions for label comparison and merging
- Implementing proper owner reference validation

This reduces API server load and prevents conflicts with other controllers
that may modify ServiceAccount resources.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread internal/controller/valkey_controller.go
@dmolik dmolik mentioned this pull request Sep 15, 2025
@dmolik
dmolik merged commit 9abc890 into hyperspike:main Sep 15, 2025
4 of 9 checks passed
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.

Bug Report: ServiceAccount Token Recreation Due to Full Updates

2 participants