Skip to content

Commit

Permalink
Ensure Hive subnet is included on ARO cluster resource for clusters c…
Browse files Browse the repository at this point in the history
…reated via Hive
  • Loading branch information
tsatam committed Nov 9, 2023
1 parent 1b346a7 commit ef0b751
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/operator/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ func (o *operator) resources() ([]kruntime.Object, error) {
serviceSubnets = append(serviceSubnets, "/subscriptions/"+o.env.SubscriptionID()+"/resourceGroups/"+o.env.GatewayResourceGroup()+"/providers/Microsoft.Network/virtualNetworks/gateway-vnet/subnets/gateway-subnet")
}

// this service subnet is added during install time if cluster is installed via Hive
if o.oc.Properties.HiveProfile.CreatedByHive {
// TODO: add AKS shard support
hiveShard := 1
serviceSubnets = append(serviceSubnets, fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/aks-net/subnets/PodSubnet-%03d", o.env.SubscriptionID(), o.env.ResourceGroup(), hiveShard))
}

cluster := &arov1alpha1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Name: arov1alpha1.SingletonClusterName,
Expand Down

0 comments on commit ef0b751

Please sign in to comment.