You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("m.root is nil, cannot validate namespace labels")
251
+
}
252
+
249
253
ifm.root.Labels() ==nil {
250
-
returnfmt.Errorf("namespace labels are nil, but it should contain at least '%s' labels. Please add them to your environment config under 'Labels' key", strings.Join(requiredChainLinkNsLabels, ", "))
254
+
returnfmt.Errorf("namespace labels are nil, but it should contain at least '%s' labels. Please add them to your environment config under 'Labels' key",
255
+
strings.Join(requiredChainLinkNsLabels, ", "))
251
256
}
252
257
253
258
varmissingNsLabels []string
259
+
// Safely access the map
254
260
for_, l:=rangerequiredChainLinkNsLabels {
255
-
if_, ok:= (*m.root.Labels())[l]; !ok {
261
+
labels:=m.root.Labels()
262
+
iflabels==nil {
263
+
// This additional check is defensive; can be omitted if Labels() is guaranteed non-nil
264
+
returnfmt.Errorf("unexpected nil labels while iterating")
0 commit comments