Skip to content

Commit 3870f86

Browse files
committed
Fix stale SecretHashes on nodeset status after node removal
When a node is removed from a nodeset and a full deployment (no ServicesOverride) succeeds, overwrite the nodeset's SecretHashes with the deployment's hashes instead of merging. This drops stale TLS cert secret hash entries for the removed node. Partial deployments (with ServicesOverride) continue to merge additively to preserve hashes from other deployments. Change-Id: I12abffa18af63b14630f80f5a0e6235158f4a9ef Signed-off-by: rabi <ramishra@redhat.com>
1 parent ed19ffe commit 3870f86

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

internal/controller/dataplane/openstackdataplanenodeset_controller.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,12 @@ func checkDeployment(ctx context.Context, helper *helper.Helper,
592592
for k, v := range deployment.Status.ConfigMapHashes {
593593
instance.Status.ConfigMapHashes[k] = v
594594
}
595-
for k, v := range deployment.Status.SecretHashes {
596-
instance.Status.SecretHashes[k] = v
595+
if len(deployment.Spec.ServicesOverride) == 0 {
596+
instance.Status.SecretHashes = deployment.Status.SecretHashes
597+
} else {
598+
for k, v := range deployment.Status.SecretHashes {
599+
instance.Status.SecretHashes[k] = v
600+
}
597601
}
598602
for k, v := range deployment.Status.ContainerImages {
599603
instance.Status.ContainerImages[k] = v

0 commit comments

Comments
 (0)