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

Update frontend dependency with cloudsql #302

Merged
merged 1 commit into from
Mar 6, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 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 @@ -200,7 +200,7 @@ module "frontend" {
google_service_account = var.rag_service_account
namespace = var.kubernetes_namespace
inference_service_endpoint = module.inference-server.inference_service_endpoint
cloudsql_instance = var.cloudsql_instance
cloudsql_instance = module.cloudsql.instance
db_secret_name = module.cloudsql.db_secret_name
db_secret_namespace = module.cloudsql.db_secret_namespace
dataset_embeddings_table_name = var.dataset_embeddings_table_name
Expand All @@ -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]
}
7 changes: 6 additions & 1 deletion modules/cloudsql/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ output "db_secret_name" {
output "db_secret_namespace" {
description = "Cloud SQL DB secret namespace"
value = kubernetes_secret.secret.metadata[0].namespace
}
}

output "instance" {
description = "Cloud SQL Instance name"
value = google_sql_database_instance.main.name
}
Loading