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.Sprintf("%s is \"true\" (legacy webhook client-registration sidecar; operator-managed registration disabled for this workload)", LabelClientRegistrationInject)
60
+
}
61
+
switchlabels[LabelAgentType] {
62
+
caseLabelValueAgent:
63
+
return""
64
+
caseLabelValueTool:
65
+
if!injectTools {
66
+
return"kagenti.io/type is tool but cluster injectTools feature gate is disabled"
67
+
}
68
+
return""
69
+
default:
70
+
t:=labels[LabelAgentType]
71
+
ift=="" {
72
+
return"kagenti.io/type label is missing or not agent/tool"
73
+
}
74
+
returnfmt.Sprintf("kagenti.io/type=%q is not agent or tool", t)
75
+
}
76
+
}
77
+
78
+
// WorkloadWantsOperatorClientReg returns true when the workload's labels and the cluster
79
+
// injectTools gate both permit operator-managed client registration.
returnfmt.Sprintf("%s is \"true\" (legacy webhook client-registration sidecar; operator-managed registration disabled for this workload)", LabelClientRegistrationInject)
314
-
}
315
-
switchlabels[LabelAgentType] {
316
-
caseLabelValueAgent:
317
-
return""
318
-
casestring(agentv1alpha1.RuntimeTypeTool):
319
-
if!injectTools {
320
-
return"kagenti.io/type is tool but cluster injectTools feature gate is disabled"
321
-
}
322
-
return""
323
-
default:
324
-
t:=labels[LabelAgentType]
325
-
ift=="" {
326
-
return"kagenti.io/type label is missing or not agent/tool"
327
-
}
328
-
returnfmt.Sprintf("kagenti.io/type=%q is not agent or tool", t)
0 commit comments