Skip to content

[release-1.9] fix: sort map keys to prevent non-deterministic pod spec diffs [RHDHBUGS-3084]#2788

Merged
rm3l merged 1 commit intoredhat-developer:release-1.9from
rm3l:RHDHBUGS-3084--operator-reconciliation-loop-caused-by-non-deterministic-go-map-iteration-order-in-configmap-key-handling-pod-restarts-when-using-statefulset-workload--backport-1.9
May 7, 2026
Merged

[release-1.9] fix: sort map keys to prevent non-deterministic pod spec diffs [RHDHBUGS-3084]#2788
rm3l merged 1 commit intoredhat-developer:release-1.9from
rm3l:RHDHBUGS-3084--operator-reconciliation-loop-caused-by-non-deterministic-go-map-iteration-order-in-configmap-key-handling-pod-restarts-when-using-statefulset-workload--backport-1.9

Conversation

@rm3l
Copy link
Copy Markdown
Member

@rm3l rm3l commented May 7, 2026

Description

Backporting #2785 to 1.9

Which issue(s) does this PR fix or relate to

PR acceptance criteria

  • Tests
  • Documentation

How to test changes / Special notes to the reviewer

…UGS-3084] (redhat-developer#2785)

* fix: sort map keys to prevent non-deterministic pod spec diffs

Go map iteration order is randomized, so maps.Keys() produced
different key orderings on each reconciliation. This caused
VolumeMounts and --config args to shuffle, making the controller
detect a spec change and restart pods in a loop.

Signed-off-by: Armel Soro <armel@rm3l.org>

* update docs

---------

Signed-off-by: Armel Soro <armel@rm3l.org>
@rm3l rm3l deployed to internal May 7, 2026 07:21 — with GitHub Actions Active
@rm3l rm3l changed the title [release-1.9] fix: sort map keys to prevent non-deterministic pod spec diffs [RHDHBUGS-3084] (#2785) [release-1.9] fix: sort map keys to prevent non-deterministic pod spec diffs [RHDHBUGS-3084] May 7, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

@rm3l
Copy link
Copy Markdown
Member Author

rm3l commented May 7, 2026

Merging as #2785 was already approved. This one is just a backport PR.

@rm3l rm3l merged commit ed70faa into redhat-developer:release-1.9 May 7, 2026
8 of 9 checks passed
@rm3l rm3l deleted the RHDHBUGS-3084--operator-reconciliation-loop-caused-by-non-deterministic-go-map-iteration-order-in-configmap-key-handling-pod-restarts-when-using-statefulset-workload--backport-1.9 branch May 7, 2026 07:36
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.

1 participant