Skip to content

Commit

Permalink
Fix Terraform error caused by unavailable metrics.k8s.io/v1beta1 (#1827)
Browse files Browse the repository at this point in the history
* Improve Terraform's wait_conditions

* Update timeouts of kubectl wait
  • Loading branch information
NimJay authored Jun 5, 2023
1 parent b554611 commit 6b64bc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ resource "null_resource" "apply_deployment" {
resource "null_resource" "wait_conditions" {
provisioner "local-exec" {
interpreter = ["bash", "-exc"]
command = "kubectl wait --for=condition=ready pods --all -n ${var.namespace} --timeout=-1s"
command = <<-EOT
kubectl wait --for=condition=AVAILABLE apiservice/v1beta1.metrics.k8s.io --timeout=180s
kubectl wait --for=condition=ready pods --all -n ${var.namespace} --timeout=280s
EOT
}

depends_on = [
Expand Down

0 comments on commit 6b64bc8

Please sign in to comment.