Skip to content

Automated cherry pick of #1493: fix(component): recreate DaemonSet/Deployment when selector mismatches template labels#1494

Merged
zexi merged 1 commit intoyunionio:masterfrom
zexi:automated-cherry-pick-of-#1493-upstream-master
Apr 7, 2026
Merged

Automated cherry pick of #1493: fix(component): recreate DaemonSet/Deployment when selector mismatches template labels#1494
zexi merged 1 commit intoyunionio:masterfrom
zexi:automated-cherry-pick-of-#1493-upstream-master

Conversation

@zexi
Copy link
Copy Markdown
Member

@zexi zexi commented Apr 7, 2026

Cherry pick of #1493 on master.

#1493: fix(component): recreate DaemonSet/Deployment when selector mismatches template labels

…s template labels

When a DaemonSet or Deployment's immutable selector no longer matches
the desired template labels (e.g. stale labels like
onecloud.yunion.io/host-deployer in selector but not in template),
Kubernetes rejects the update. Detect this mismatch before updating
and automatically delete+recreate the resource.

Also fix instance label generation to use deterministic cluster name
instead of random string to prevent future mismatches across restarts.
@zexi zexi merged commit 3c0a13d into yunionio:master Apr 7, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants