Skip to content

Commit

Permalink
Merge pull request #37 from vmware-samples/topic/xudongl/fix-using-av…
Browse files Browse the repository at this point in the history
…i-as-control-plane-ha

Fix avi as control plane ha bootstrap cluster error
  • Loading branch information
XudongLiuHarold authored Nov 8, 2021
2 parents 1457a10 + 6b736f7 commit f155db1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/haprovider/haprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,16 @@ func (r *HAProvider) annotateService(ctx context.Context, cluster *clusterv1.Clu
akoov1alpha1.TKGClusterNameSpaceLabel: cluster.Namespace,
}

if ako_operator.IsBootStrapCluster() {
return serviceAnnotation, nil
}

aviInfraSetting, err := r.getAviInfraSettingFromCluster(ctx, cluster)
if err != nil {
return serviceAnnotation, err
}
if aviInfraSetting != nil && !ako_operator.IsBootStrapCluster() {

if aviInfraSetting != nil {
// add AVIInfraSetting annotation when creating HA svc
serviceAnnotation[akoov1alpha1.HAAVIInfraSettingAnnotationsKey] = aviInfraSetting.Name
}
Expand Down

0 comments on commit f155db1

Please sign in to comment.