Skip to content

Commit

Permalink
add github actions for tf lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
umeshkumhar committed Mar 6, 2024
1 parent 383b5e3 commit c947223
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 31 deletions.
8 changes: 4 additions & 4 deletions applications/jupyter/workloads-without-iap.example.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ cluster_membership_id = "" # required only for private clusters, default: cluste
#######################################################

## JupyterHub variables
namespace = "jupyter"
gcs_bucket = "<gcs-bucket>"
create_gcs_bucket = true
workload_identity_service_account = "jupyter-service-account"
namespace = "jupyter"
gcs_bucket = "<gcs-bucket>"
create_gcs_bucket = true
workload_identity_service_account = "jupyter-service-account"

# Jupyterhub without IAP
add_auth = false
20 changes: 10 additions & 10 deletions applications/rag/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ provider "helm" {
}

module "namespace" {
source = "../../modules/kubernetes-namespace"
providers = { helm = helm.rag}
source = "../../modules/kubernetes-namespace"
providers = { helm = helm.rag }
create_namespace = true
namespace = var.kubernetes_namespace
namespace = var.kubernetes_namespace
}

module "kuberay-operator" {
Expand All @@ -115,12 +115,12 @@ module "gcs" {
}

module "cloudsql" {
source = "../../modules/cloudsql"
providers = { kubernetes = kubernetes.rag }
project_id = var.project_id
instance_name = var.cloudsql_instance
namespace = var.kubernetes_namespace
depends_on = [module.namespace]
source = "../../modules/cloudsql"
providers = { kubernetes = kubernetes.rag }
project_id = var.project_id
instance_name = var.cloudsql_instance
namespace = var.kubernetes_namespace
depends_on = [module.namespace]
}

module "jupyterhub" {
Expand Down Expand Up @@ -220,5 +220,5 @@ module "frontend" {
url_domain_addr = var.frontend_url_domain_addr
url_domain_name = var.frontend_url_domain_name
members_allowlist = var.frontend_members_allowlist
depends_on = [ module.namespace ]
depends_on = [module.namespace]
}
4 changes: 2 additions & 2 deletions applications/rag/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ variable "autopilot_cluster" {
}

variable "cloudsql_instance" {
type = string
type = string
description = "Name of the CloudSQL instance for RAG VectorDB"
default = "pgvector-instance"
default = "pgvector-instance"
}

variable "cpu_pools" {
Expand Down
2 changes: 1 addition & 1 deletion applications/rag/workloads.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rag_service_account = "rag-system-account"

# Creates a google service account & k8s service account & configures workload identity with appropriate permissions.
# Set to false & update the variable `jupyter_service_account` to use an existing IAM service account.
jupyter_service_account = "jupyter-system-account"
jupyter_service_account = "jupyter-system-account"

## Embeddings table name - change this to the TABLE_NAME used in the notebook.
dataset_embeddings_table_name = "googlemaps_reviews_db"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
source = "hashicorp/google"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
4 changes: 2 additions & 2 deletions applications/ray/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
source = "hashicorp/google-beta"
}
helm = {
source = "hashicorp/helm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ tokenizer = "tiiuae/falcon-7b"
# Benchmark configuration for triggering single test via Locust Runner
test_duration = 60
# Increase test_users to allow more parallelism (especially when testing HPA)
test_users = 1
test_rate = 5
test_users = 1
test_rate = 5
2 changes: 1 addition & 1 deletion infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module "custom-network" {
}

locals {
network_name= var.create_network ? module.custom-network[0].network_name : var.network_name
network_name = var.create_network ? module.custom-network[0].network_name : var.network_name
subnetwork_name = var.create_network ? module.custom-network[0].subnets_names[0] : var.subnetwork_name
}

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/platform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ gpu_pools = [{
machine_type = "g2-standard-24"
node_locations = "us-central1-a"
autoscaling = true
min_count = 1
min_count = 1
max_count = 3
disk_size_gb = 100
disk_type = "pd-balanced"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ gpu_pools = [{
accelerator_count = 2
accelerator_type = "nvidia-tesla-t4"
gpu_driver_version = "LATEST"
},
{
},
{
name = "gpu-pool-l4"
machine_type = "g2-standard-24"
node_locations = "us-central1-a"
Expand Down
4 changes: 2 additions & 2 deletions modules/iap/iap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "helm_release" "iap_jupyter" {
name = "iap-jupyter"
chart = "${path.module}/charts/iap/"
namespace = var.namespace
create_namespace = true
create_namespace = true
# timeout increased to support autopilot scaling resources, and give enough time to complete the deployment
timeout = 1200
set {
Expand Down Expand Up @@ -108,7 +108,7 @@ resource "helm_release" "iap_frontend" {
name = "iap-frontend"
chart = "${path.module}/charts/iap/"
namespace = var.namespace
create_namespace = true
create_namespace = true
# timeout increased to support autopilot scaling resources, and give enough time to complete the deployment
timeout = 1200
set {
Expand Down
2 changes: 1 addition & 1 deletion modules/iap/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ variable "jupyter_k8s_backend_service_name" {
variable "jupyter_k8s_backend_service_port" {
type = number
description = "Name of the Backend Service Port"
default = 80
default = 80
}

variable "jupyter_url_domain_addr" {
Expand Down
2 changes: 1 addition & 1 deletion modules/kuberay-monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ resource "helm_release" "grafana" {
}

data "kubernetes_service" "example" {
count = var.enable_grafana_on_ray_dashboard ? 1 : 0
count = var.enable_grafana_on_ray_dashboard ? 1 : 0
metadata {
name = "grafana"
namespace = var.namespace
Expand Down
2 changes: 1 addition & 1 deletion tutorials/hf-tgi/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ output "inference_service_namespace" {

output "inference_service_endpoint" {
description = "Endpoint of model inference service"
value = kubernetes_service.inference_service.status != null ? (kubernetes_service.inference_service.status[0].load_balancer != null ? "${kubernetes_service.inference_service.status[0].load_balancer[0].ingress[0].ip}" : "") : ""
value = kubernetes_service.inference_service.status != null ? (kubernetes_service.inference_service.status[0].load_balancer != null ? "${kubernetes_service.inference_service.status[0].load_balancer[0].ingress[0].ip}" : "") : ""
}

0 comments on commit c947223

Please sign in to comment.