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

Fix project service dependency #497

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions applications/jupyter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ module "infra" {
subnetwork_name = "default"
cpu_pools = var.cpu_pools
enable_gpu = false
depends_on = [module.project-services]
}

data "google_container_cluster" "default" {
count = var.create_cluster ? 0 : 1
name = var.cluster_name
location = var.cluster_location
count = var.create_cluster ? 0 : 1
name = var.cluster_name
location = var.cluster_location
depends_on = [module.project-services]
}

locals {
Expand Down
8 changes: 5 additions & 3 deletions applications/rag/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ module "infra" {
enable_gpu = true
gpu_pools = var.gpu_pools
kubernetes_version = var.kubernetes_version
depends_on = [module.project-services]
}

data "google_container_cluster" "default" {
count = var.create_cluster ? 0 : 1
name = var.cluster_name
location = var.cluster_location
count = var.create_cluster ? 0 : 1
name = var.cluster_name
location = var.cluster_location
depends_on = [module.project-services]
}

locals {
Expand Down
8 changes: 5 additions & 3 deletions applications/ray/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ module "infra" {
cpu_pools = var.cpu_pools
enable_gpu = var.enable_gpu
gpu_pools = var.gpu_pools
depends_on = [module.project-services]
}

data "google_container_cluster" "default" {
count = var.create_cluster ? 0 : 1
name = var.cluster_name
location = var.cluster_location
count = var.create_cluster ? 0 : 1
name = var.cluster_name
location = var.cluster_location
depends_on = [module.project-services]
}

locals {
Expand Down
8 changes: 6 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ steps:
terraform apply \
-var-file=tfvars_tests/standard-gke-public.platform.tfvars \
-var=project_id=$PROJECT_ID \
-var=network_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-$_AUTOPILOT_CLUSTER \
-var=subnetwork_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-$_AUTOPILOT_CLUSTER \
-var=cluster_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-cluster \
-var=autopilot_cluster=$_AUTOPILOT_CLUSTER \
-var=cluster_location=$_REGION \
Expand Down Expand Up @@ -202,7 +204,7 @@ steps:
cd /workspace/applications/rag/
terraform apply \
-var-file=workloads.tfvars \
-var=network_name=default \
-var=network_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-$_AUTOPILOT_CLUSTER \
-var=create_cluster=false \
-var=jupyter_add_auth=false \
-var=frontend_add_auth=false \
Expand Down Expand Up @@ -261,7 +263,7 @@ steps:
cd /workspace/applications/rag/
terraform destroy \
-var-file=workloads.tfvars \
-var=network_name=default \
-var=network_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-$_AUTOPILOT_CLUSTER \
-var=create_cluster=false \
-var=jupyter_add_auth=false \
-var=frontend_add_auth=false \
Expand Down Expand Up @@ -289,6 +291,8 @@ steps:
cd /workspace/infrastructure
terraform destroy -var-file=tfvars_tests/standard-gke-public.platform.tfvars -var=project_id=$PROJECT_ID \
-var=cluster_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-cluster \
-var=network_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-$_AUTOPILOT_CLUSTER \
-var=subnetwork_name=ml-$SHORT_SHA-$_PR_NUMBER-$_BUILD_ID-$_AUTOPILOT_CLUSTER \
-var=autopilot_cluster=$_AUTOPILOT_CLUSTER \
-var=cluster_location=$_REGION -auto-approve -no-color

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ project_id = "<project-id>"
# subnetwork_cidr = "10.100.0.0/16"
# subnetwork_region = "us-central1"

create_network = false
create_network = true
network_name = "default"
subnetwork_name = "default"
subnetwork_region = "us-central1"
Expand Down
3 changes: 2 additions & 1 deletion modules/kuberay-monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

# Temporary workaround to ensure the GMP webhook is installed before applying PodMonitorings.
resource "time_sleep" "wait_for_gmp_operator" {
count = var.autopilot_cluster ? 1 : 0
## Temporary workaroud, This is impacting for the standard cluster dependency graph
#count = var.autopilot_cluster ? 1 : 0
imreddy13 marked this conversation as resolved.
Show resolved Hide resolved
create_duration = "30s"
}

Expand Down