func()

in internal/utils/controller/operation_helper.go [98:115]


func (ou OperationHelper) isEnvVarsIdentical(a, b []corev1.EnvVar) bool {
	if len(a) != len(b) {
		return false
	}
	// sort environment variables to ensure consistent hashing
	sort.Slice(a, func(i, j int) bool {
		return a[i].Name < a[j].Name
	})
	sort.Slice(b, func(i, j int) bool {
		return b[i].Name < b[j].Name
	})
	for i, env := range a {
		if env.Name != b[i].Name || env.Value != b[i].Value {
			return false
		}
	}
	return true
}