GoogleCloudPlatform / ai-on-gke

AI on GKE is a collection of examples, best-practices, and prebuilt solutions to help build, deploy, and scale AI Platforms on Google Kubernetes Engine
Apache License 2.0
194 stars 143 forks source link

Re-Add private_cluster_config #669

Closed hubatish closed 2 months ago

hubatish commented 2 months ago

After initial PR was reverted, re-adding private_cluster-config setting so that public clusters can be created.

The initial commit had 2 private_cluster_configs defined & clearly didn't work, but I did testing prior to resolving some merge conflicts which I messed up.

Overall goal is allowing public clusters, which are much easier to run kubectl commands with.

hubatish commented 2 months ago

Ran terraform destroy & apply on my existing setup successfully. From blank, terraform apply with private_cluster_config = null in tfvars creates a cluster with "Private cluster" disabled & terraform plan with private_cluster_config = {} from there tries to swap it. Oddly, an already spun up private cluster didn't offer to swap with terraform plan private_cluster_config = null

annapendleton commented 2 months ago

Ran terraform destroy & apply on my existing setup successfully. From blank, terraform apply with private_cluster_config = null in tfvars creates a cluster with "Private cluster" disabled & terraform plan with private_cluster_config = {} from there tries to swap it. Oddly, an already spun up private cluster didn't offer to swap with terraform plan private_cluster_config = null

oh interesting - I wonder if we should document this behavior as well? IMO it's likely an implementation detail in the modules we rely on for not changing private back to public

hubatish commented 2 months ago

Ran terraform destroy & apply on my existing setup successfully. From blank, terraform apply with private_cluster_config = null in tfvars creates a cluster with "Private cluster" disabled & terraform plan with private_cluster_config = {} from there tries to swap it. Oddly, an already spun up private cluster didn't offer to swap with terraform plan private_cluster_config = null

oh interesting - I wonder if we should document this behavior as well? IMO it's likely an implementation detail in the modules we rely on for not changing private back to public

Sure, added a note in the variables.tf description.