Skip to content

Commit c000e71

Browse files
Adding time_sleep to solve kueue webhook errors
1 parent 36bd490 commit c000e71

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

modules/management/kubectl-apply/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ limitations under the License.
190190
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | ~> 2.17 |
191191
| <a name="requirement_http"></a> [http](#requirement\_http) | ~> 3.0 |
192192
| <a name="requirement_kubectl"></a> [kubectl](#requirement\_kubectl) | >= 1.7.0 |
193+
| <a name="requirement_time"></a> [time](#requirement\_time) | ~> 0.9 |
193194

194195
## Providers
195196

@@ -198,6 +199,7 @@ limitations under the License.
198199
| <a name="provider_google"></a> [google](#provider\_google) | >= 7.2 |
199200
| <a name="provider_http"></a> [http](#provider\_http) | ~> 3.0 |
200201
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |
202+
| <a name="provider_time"></a> [time](#provider\_time) | ~> 0.9 |
201203

202204
## Modules
203205

@@ -219,6 +221,7 @@ limitations under the License.
219221
| [terraform_data.initial_gib_version](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data) | resource |
220222
| [terraform_data.jobset_validations](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data) | resource |
221223
| [terraform_data.kueue_validations](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data) | resource |
224+
| [time_sleep.wait_for_webhook](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
222225
| [google_client_config.default](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/client_config) | data source |
223226
| [google_container_cluster.gke_cluster](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/container_cluster) | data source |
224227
| [http_http.manifest_from_url](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |

modules/management/kubectl-apply/main.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ module "install_kueue" {
102102
depends_on = [var.gke_cluster_exists]
103103
}
104104

105+
resource "time_sleep" "wait_for_webhook" {
106+
create_duration = "120s"
107+
depends_on = [module.install_kueue]
108+
}
109+
105110
module "configure_kueue" {
106111
source = "./helm_install"
107112
count = local.install_kueue ? ((var.kueue.config_path == null ? "" : var.kueue.config_path) != "" ? 1 : 0) : 0
@@ -127,7 +132,7 @@ module "configure_kueue" {
127132
})
128133
]
129134

130-
depends_on = [module.install_kueue]
135+
depends_on = [time_sleep.wait_for_webhook]
131136

132137
}
133138

modules/management/kubectl-apply/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ terraform {
3232
source = "hashicorp/http"
3333
version = "~> 3.0"
3434
}
35+
time = {
36+
source = "hashicorp/time"
37+
version = "~> 0.9"
38+
}
3539
}
3640

3741
provider_meta "google" {

0 commit comments

Comments
 (0)