Skip to content

Commit

Permalink
Merge pull request #4095 from pluralsh/fix/cluster-diff
Browse files Browse the repository at this point in the history
fix: fix API server access profile diff
  • Loading branch information
k8s-ci-robot authored Oct 6, 2023
2 parents 5aba3bb + 6c5917f commit b9430aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azure/services/managedclusters/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,13 +614,13 @@ func computeDiffOfNormalizedClusters(managedCluster armcontainerservice.ManagedC
}
}

if managedCluster.Properties.APIServerAccessProfile != nil {
if managedCluster.Properties.APIServerAccessProfile != nil && managedCluster.Properties.APIServerAccessProfile.AuthorizedIPRanges != nil {
propertiesNormalized.APIServerAccessProfile = &armcontainerservice.ManagedClusterAPIServerAccessProfile{
AuthorizedIPRanges: managedCluster.Properties.APIServerAccessProfile.AuthorizedIPRanges,
}
}

if existingMC.Properties.APIServerAccessProfile != nil {
if existingMC.Properties.APIServerAccessProfile != nil && existingMC.Properties.APIServerAccessProfile.AuthorizedIPRanges != nil {
existingMCPropertiesNormalized.APIServerAccessProfile = &armcontainerservice.ManagedClusterAPIServerAccessProfile{
AuthorizedIPRanges: existingMC.Properties.APIServerAccessProfile.AuthorizedIPRanges,
}
Expand Down

0 comments on commit b9430aa

Please sign in to comment.