Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_kubernetes_cluster_extension Flux extension takes more than 30 min to apply/destroy #25952

Open
1 task done
Dariusz-Jalowiec opened this issue May 13, 2024 · 1 comment

Comments

@Dariusz-Jalowiec
Copy link

Dariusz-Jalowiec commented May 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.8.1

AzureRM Provider Version

3.103.1

Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster_extension

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "centralus"
}

resource "azurerm_kubernetes_cluster" "example" {
  name                = "example-aks"
  location            = "centralus"
  resource_group_name = azurerm_resource_group.example.name
  dns_prefix          = "example-aks"

  default_node_pool {
    name       = "default"
    node_count = 1
    vm_size    = "Standard_DS2_v2"
  }

  identity {
    type = "SystemAssigned"
  }
}

resource "azurerm_kubernetes_cluster_extension" "example" {
  name           = "example-ext"
  cluster_id     = azurerm_kubernetes_cluster.example.id
  extension_type = "microsoft.flux"
}

Debug Output/Panic Output

azurerm_kubernetes_cluster_extension.flux-front: Still destroying... [id=/subscriptions/8015957b-b9d6-485d-90e4-...ubernetesConfiguration/extensions/flux, 29m40s elapsed]
azurerm_kubernetes_cluster_extension.flux-back: Still destroying... [id=/subscriptions/8015957b-b9d6-485d-90e4-...ubernetesConfiguration/extensions/flux, 29m40s elapsed]
azurerm_kubernetes_cluster_extension.flux-back: Still destroying... [id=/subscriptions/8015957b-b9d6-485d-90e4-...ubernetesConfiguration/extensions/flux, 29m50s elapsed]
azurerm_kubernetes_cluster_extension.flux-front: Still destroying... [id=/subscriptions/8015957b-b9d6-485d-90e4-...ubernetesConfiguration/extensions/flux, 29m50s elapsed]
azurerm_kubernetes_cluster_extension.flux-front: Still destroying... [id=/subscriptions/8015957b-b9d6-485d-90e4-...ubernetesConfiguration/extensions/flux, 30m0s elapsed]
azurerm_kubernetes_cluster_extension.flux-back: Still destroying... [id=/subscriptions/8015957b-b9d6-485d-90e4-...ubernetesConfiguration/extensions/flux, 30m0s elapsed]
╷
│ Error: deleting Scoped Extension (Scope: "/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.ContainerService/managedClusters/xxxx"
│ Extension Name: "flux"): polling after Delete: context deadline exceeded
│ 
│ deleting Scoped Extension (Scope:
│ "/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.ContainerService/managedClusters/xxxxx"
│ Extension Name: "flux"): polling after Delete: context deadline exceeded

This is happening in both East Us 2 and Central Us. We have terraform timing out because to apply or destory the flux extension is taking minimum 10 min or up to 30 min causing a failure.

Other times where the same apply is ran it might take normal amount of time:

azurerm_kubernetes_cluster_extension.flux-back: Destruction complete after 13s

Expected Behaviour

Flux extension addition to AKS should not cause terraform to take 2x amount of time and time out.

Actual Behaviour

Flux extension causes apply and destroy functions to take a long time and might even time out after 30 min.

If we remove the Flux extension the AKS is able to provision and destroy again within maximum of 4 minutes.

Steps to Reproduce

  1. terraform apply
  2. terraform destroy

Important Factoids

No response

References

No response

@github-actions github-actions bot added the v/3.x label May 13, 2024
@aristosvo
Copy link
Collaborator

Hi @Dariusz-Jalowiec!

Have you seen similar behavior when using az cli for instance? The question is whether this is Terraform specific or generic for Flux on AKS. If the latter is the case, this issue should be brought to the AKS team instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants