diff --git a/pkg/agent/baker.go b/pkg/agent/baker.go index bedac824749..e0d2a66232a 100644 --- a/pkg/agent/baker.go +++ b/pkg/agent/baker.go @@ -356,10 +356,10 @@ func getContainerServiceFuncMap(config *datamodel.NodeBootstrappingConfiguration return cs.Properties.OrchestratorProfile.IsKubernetes() && IsKubernetesVersionGe(cs.Properties.OrchestratorProfile.OrchestratorVersion, version) }, "GetAgentKubernetesLabels": func(profile *datamodel.AgentPoolProfile) string { - return profile.GetKubernetesLabels(false, config.EnableNvidia, config.FIPSEnabled, config.OSSKU) + return profile.GetKubernetesLabels() }, "GetAgentKubernetesLabelsDeprecated": func(profile *datamodel.AgentPoolProfile) string { - return profile.GetKubernetesLabels(true, config.EnableNvidia, config.FIPSEnabled, config.OSSKU) + return profile.GetKubernetesLabels() }, "GetGPUInstanceProfile": func() string { return config.GPUInstanceProfile diff --git a/pkg/agent/datamodel/types.go b/pkg/agent/datamodel/types.go index 290927bbec3..8c90646173e 100644 --- a/pkg/agent/datamodel/types.go +++ b/pkg/agent/datamodel/types.go @@ -1127,7 +1127,7 @@ func (a *AgentPoolProfile) IsAvailabilitySets() bool { } // GetKubernetesLabels returns a k8s API-compliant labels string for nodes in this profile. -func (a *AgentPoolProfile) GetKubernetesLabels(deprecated bool, nvidiaEnabled bool, fipsEnabled bool, osSku string) string { +func (a *AgentPoolProfile) GetKubernetesLabels() string { var buf bytes.Buffer buf.WriteString(fmt.Sprintf("agentpool=%s", a.Name)) buf.WriteString(fmt.Sprintf(",kubernetes.azure.com/agentpool=%s", a.Name)) diff --git a/pkg/agent/datamodel/types_test.go b/pkg/agent/datamodel/types_test.go index bdafd681116..d45f0b86d56 100644 --- a/pkg/agent/datamodel/types_test.go +++ b/pkg/agent/datamodel/types_test.go @@ -1115,9 +1115,9 @@ func TestAgentPoolProfileGetKubernetesLabels(t *testing.T) { c := c t.Run(c.name, func(t *testing.T) { t.Parallel() - if c.expected != c.ap.GetKubernetesLabels(c.deprecated, c.nvidiaEnabled, c.fipsEnabled, c.osSku) { + if c.expected != c.ap.GetKubernetesLabels() { t.Fatalf("Got unexpected AgentPoolProfile.GetKubernetesLabels(%s, %t) result. Expected: %s. Got: %s.", - c.rg, c.deprecated, c.expected, c.ap.GetKubernetesLabels(c.deprecated, c.nvidiaEnabled, c.fipsEnabled, c.osSku)) + c.rg, c.deprecated, c.expected, c.ap.GetKubernetesLabels()) } }) }