From 061f52bd45b622e9f1f2e3057a54d80a3b0038f5 Mon Sep 17 00:00:00 2001 From: Zach Jones Date: Thu, 7 Jul 2022 15:53:51 -0600 Subject: [PATCH] feat: added private cluster flag for local development --- docs/deploy-development-rp.md | 2 ++ pkg/util/cluster/cluster.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/deploy-development-rp.md b/docs/deploy-development-rp.md index b7a8c356f..786cca97d 100644 --- a/docs/deploy-development-rp.md +++ b/docs/deploy-development-rp.md @@ -108,6 +108,8 @@ CLUSTER= go run ./hack/cluster delete ``` + By default, a public cluster will be created. In order to create a private cluster, set the `PRIVATE_CLUSTER` environment variable to `true` prior to creation. Internet access from the cluster can also be restricted by setting the `NO_INTERNET` environment variable to `true`. + [1]: https://docs.microsoft.com/en-us/azure/openshift/tutorial-create-cluster 1. The following additional RP endpoints are available but not exposed via `az diff --git a/pkg/util/cluster/cluster.go b/pkg/util/cluster/cluster.go index 67b1b1618..dda621acc 100644 --- a/pkg/util/cluster/cluster.go +++ b/pkg/util/cluster/cluster.go @@ -147,7 +147,7 @@ func (c *Cluster) Create(ctx context.Context, vnetResourceGroup, clusterName str visibility := api.VisibilityPublic - if os.Getenv("NO_INTERNET") != "" { + if os.Getenv("PRIVATE_CLUSTER") != "" || os.Getenv("NO_INTERNET") != "" { visibility = api.VisibilityPrivate }