@@ -29,6 +29,7 @@ import (
2929 "sigs.k8s.io/cluster-api-provider-azure/azure"
3030 "sigs.k8s.io/cluster-api-provider-azure/azure/converters"
3131 azureutil "sigs.k8s.io/cluster-api-provider-azure/util/azure"
32+ "sigs.k8s.io/cluster-api-provider-azure/util/tele"
3233)
3334
3435// KubeletConfig defines the set of kubelet configurations for nodes in pools.
@@ -160,6 +161,9 @@ func (s *AgentPoolSpec) CustomHeaders() map[string]string {
160161
161162// Parameters returns the parameters for the agent pool.
162163func (s * AgentPoolSpec ) Parameters (ctx context.Context , existing interface {}) (params interface {}, err error ) {
164+ _ , log , done := tele .StartSpanWithLogger (ctx , "agentpools.Service.Parameters" )
165+ defer done ()
166+
163167 nodeLabels := s .NodeLabels
164168 if existing != nil {
165169 existingPool , ok := existing .(containerservice.AgentPool )
@@ -234,8 +238,10 @@ func (s *AgentPoolSpec) Parameters(ctx context.Context, existing interface{}) (p
234238 diff := cmp .Diff (normalizedProfile , existingProfile )
235239 if diff == "" {
236240 // agent pool is up to date, nothing to do
241+ log .V (4 ).Info ("no changes found between user-updated spec and existing spec" )
237242 return nil , nil
238243 }
244+ log .V (4 ).Info ("found a diff between the desired spec and the existing agentpool" , "difference" , diff )
239245 // We do a just-in-time merge of existent kubernetes.azure.com-prefixed labels
240246 // So that we don't unintentionally delete them
241247 // See https://github.com/Azure/AKS/issues/3152
0 commit comments