Skip to content

Commit

Permalink
fix: sts will restart when use kubectl (#1989)
Browse files Browse the repository at this point in the history
sts will restart when use kubectl

Co-authored-by: guozhi.li <[email protected]>
  • Loading branch information
jiuker and guozhi.li authored Feb 20, 2024
1 parent 0eb342d commit ba9ccc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controller/pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ func poolSSMatchesSpec(expectedStatefulSet, existingStatefulSet *appsv1.Stateful
if !equality.Semantic.DeepEqual(expectedMetadata.Labels, existingStatefulSet.ObjectMeta.Labels) {
return false, nil
}
expectedAnnotations := expectedMetadata.Annotations
expectedAnnotations := map[string]string{}
for k, v := range expectedMetadata.Annotations {
expectedAnnotations[k] = v
}
currentAnnotations := existingStatefulSet.ObjectMeta.Annotations
delete(expectedAnnotations, corev1.LastAppliedConfigAnnotation)
delete(currentAnnotations, corev1.LastAppliedConfigAnnotation)
Expand Down

0 comments on commit ba9ccc6

Please sign in to comment.