Skip to content

Commit

Permalink
fix management cluster endpoint vip provision race condition (#139)
Browse files Browse the repository at this point in the history
Signed-off-by: Xudong Liu <[email protected]>
  • Loading branch information
XudongLiuHarold authored Apr 11, 2023
1 parent d519280 commit 3774b4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PUBLISH?=publish
BUILD_VERSION ?= $(shell git describe --always --match "v*" | sed 's/v//')

# TKG Version
TKG_VERSION ?= v1.8.0+vmware.1
TKG_VERSION ?= v1.9.0+vmware.1

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down
4 changes: 4 additions & 0 deletions pkg/haprovider/haprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ func (r *HAProvider) annotateService(ctx context.Context, cluster *clusterv1.Clu
}
//no adc is selected for cluster, no annotation is needed.
if adcForCluster == nil {
// for the management cluster, it needs to requeue until the install-ako-for-management-cluster AKODeploymentConfig created
if _, ok := cluster.Labels[akoov1alpha1.TKGManagememtClusterRoleLabel]; ok {
return serviceAnnotation, errors.New("management cluster's AKODeploymentConfig didn't find, requeue to wait for AKODeploymentConfig created")
}
return serviceAnnotation, nil
}

Expand Down

0 comments on commit 3774b4e

Please sign in to comment.