Skip to content

Commit

Permalink
Merge pull request #109 from vmware-tanzu/fix-control-plane-empty-issue
Browse files Browse the repository at this point in the history
Fix control plane network empty add usable network error
  • Loading branch information
XudongLiuHarold authored Aug 17, 2022
2 parents ee67ae5 + f71672a commit b3655da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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.6.0+vmware.15
TKG_VERSION ?= v1.6.0+vmware.16

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,11 @@ func (r *AKODeploymentConfigReconciler) reconcileCloudUsableNetwork(
log = log.WithValues("cloud", obj.Spec.CloudName)
log.Info("Start reconciling AVI cloud usable network")

if err := r.AddUsableNetwork(r.aviClient, obj.Spec.CloudName, obj.Spec.ControlPlaneNetwork.Name, log); err != nil {
log.Error(err, "Failed to add usable network", "network", obj.Spec.ControlPlaneNetwork.Name)
return ctrl.Result{}, err
if obj.Spec.ControlPlaneNetwork.Name != "" && obj.Spec.ControlPlaneNetwork.CIDR != "" {
if err := r.AddUsableNetwork(r.aviClient, obj.Spec.CloudName, obj.Spec.ControlPlaneNetwork.Name, log); err != nil {
log.Error(err, "Failed to add usable network", "network", obj.Spec.ControlPlaneNetwork.Name)
return ctrl.Result{}, err
}
}

if err := r.AddUsableNetwork(r.aviClient, obj.Spec.CloudName, obj.Spec.DataNetwork.Name, log); err != nil {
Expand Down

0 comments on commit b3655da

Please sign in to comment.