Skip to content

Commit 8fa8ecc

Browse files
hubatishcopybara-github
authored andcommitted
Instantiate a network to ensure the resource group is deleted
AzureNetwork generally handles the lifecycle of the Azure resource group. With recent #6442 no longer instantiating an AzureVirtualMachine during AksCluster initialization, a network was no longer being instantiated. Apparently this was critical code, as `az group delete` was no longer being called. Added it back in & deletion is working again. Thanks to @vofish for pointing out the error. PiperOrigin-RevId: 872013241
1 parent 39ae4f4 commit 8fa8ecc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

perfkitbenchmarker/providers/azure/azure_kubernetes_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def __init__(self, spec):
126126
# to make it work with ACR
127127
self.cluster_version = FLAGS.container_cluster_version
128128
self._deleted = False
129+
# Instantiation required to delete the resource group.
130+
self.network = azure_network.AzureNetwork.GetNetwork(spec.vm_spec)
129131

130132
def InitializeNodePoolForCloud(
131133
self,

0 commit comments

Comments
 (0)