Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/apis/clickhouse.altinity.com/v1/type_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,15 @@ func (s *Settings) SetScalarsFromMap(m map[string]string) *Settings {
return s
}

// Keys gets keys of the settings
// Keys gets keys of the settings in alphabetical order
func (s *Settings) Keys() (keys []string) {
s.WalkKeys(func(key string, setting *Setting) {
keys = append(keys, key)
})

// Sort keys to ensure deterministic ordering for Kubernetes manifest stability.
// Consistent ordering prevents unnecessary resource updates during reconciliation.
sort.Strings(keys)
return keys
}

Expand Down