Skip to content

Conversation

cjc7373
Copy link
Contributor

@cjc7373 cjc7373 commented Jul 7, 2025

In #8328, pod's serviceaccount name has been changed to kb-{cmpdName} so that pods with the same cmpd can share one serviceaccount. However, this leads to a problem that when upgrading a component's cmpd (by changing the .spec.compDef field in component object), it will trigger a pod restart since serviceaccount has changed.

To avoid pod restarting, we can rollback a serviceaccount change if the underlying policyrules do not change.

An alternate solution is to change the serviceaccount name rule back to kb-{clusterName}-{componentName}. But this way can lead to a pod restart to all existing clusters.

@apecloud-bot
Copy link
Collaborator

Auto Cherry-pick Instructions

Usage:
  - /nopick: Not auto cherry-pick when PR merged.
  - /pick: release-x.x [release-x.x]: Auto cherry-pick to the specified branch when PR merged.

Example:
  - /nopick
  - /pick release-1.0

@github-actions github-actions bot added the size/M Denotes a PR that changes 30-99 lines. label Jul 7, 2025
@cjc7373 cjc7373 added the pick-1.0 Auto cherry-pick to release-1.0 when PR merged label Jul 7, 2025
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment

@github-actions github-actions bot added the Stale label Aug 25, 2025
@cjc7373 cjc7373 force-pushed the support/rollback-service-account-name-when-upgrade-cmpd branch from 999e169 to 8e2364b Compare September 3, 2025 06:22
@github-actions github-actions bot added size/L Denotes a PR that changes 100-499 lines. and removed size/M Denotes a PR that changes 30-99 lines. labels Sep 3, 2025
@cjc7373 cjc7373 force-pushed the support/rollback-service-account-name-when-upgrade-cmpd branch from 35c0a3a to a8ea87f Compare September 3, 2025 07:17
@cjc7373 cjc7373 force-pushed the support/rollback-service-account-name-when-upgrade-cmpd branch from a8ea87f to f9a98f1 Compare September 3, 2025 08:25
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 76.47059% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.12%. Comparing base (605b802) to head (96045af).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...llers/apps/component/transformer_component_rbac.go 75.00% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9518      +/-   ##
==========================================
+ Coverage   59.60%   60.12%   +0.52%     
==========================================
  Files         551      551              
  Lines       59739    60326     +587     
==========================================
+ Hits        35607    36274     +667     
+ Misses      20888    20768     -120     
- Partials     3244     3284      +40     
Flag Coverage Δ
unittests 60.12% <76.47%> (+0.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cjc7373 cjc7373 marked this pull request as ready for review September 3, 2025 08:37
@cjc7373 cjc7373 requested a review from a team as a code owner September 3, 2025 08:37
@apecloud-bot apecloud-bot added the approved PR Approved Test label Sep 4, 2025
@github-actions github-actions bot removed the Stale label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR Approved Test pick-1.0 Auto cherry-pick to release-1.0 when PR merged size/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants