From 1f147912e4c4eac30bcba41ebf3c4995c38c1c63 Mon Sep 17 00:00:00 2001 From: Kevin R Date: Tue, 25 Nov 2025 08:28:49 -0800 Subject: [PATCH] fix: Make CephCluster CRD health script deterministic (#25391) (#25392) Signed-off-by: rkevin --- .../ceph.rook.io/CephCluster/health.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resource_customizations/ceph.rook.io/CephCluster/health.lua b/resource_customizations/ceph.rook.io/CephCluster/health.lua index 6a0ca88a64..c5792a1fef 100644 --- a/resource_customizations/ceph.rook.io/CephCluster/health.lua +++ b/resource_customizations/ceph.rook.io/CephCluster/health.lua @@ -27,7 +27,13 @@ if obj.status.ceph ~= nil and obj.status.ceph.health ~= nil then -- Build details message from status.ceph.details if available if obj.status.ceph.details ~= nil then local detail_parts = {} - for detail_type, detail_info in pairs(obj.status.ceph.details) do + local sorted_detail_types = {} + for detail_type, _ in pairs(obj.status.ceph.details) do + table.insert(sorted_detail_types, detail_type) + end + table.sort(sorted_detail_types) + for _, detail_type in ipairs(sorted_detail_types) do + local detail_info = obj.status.ceph.details[detail_type] if detail_info.message ~= nil then table.insert(detail_parts, detail_info.message) end