From 11acaf8783f3109ff4b3b3fadd5cb1d2066213e3 Mon Sep 17 00:00:00 2001 From: Garrett Date: Tue, 16 Mar 2021 03:16:15 +0000 Subject: [PATCH] Clean up providers create docs --- internal/cmd/providers.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/cmd/providers.go b/internal/cmd/providers.go index abc88bc1..086856c1 100644 --- a/internal/cmd/providers.go +++ b/internal/cmd/providers.go @@ -2,6 +2,7 @@ package cmd import ( "fmt" + "net/url" "cdr.dev/coder-cli/internal/x/xcobra" @@ -64,6 +65,11 @@ coder providers create my-provider --hostname=https://provider.example.com --clu } cemanagerURL := client.BaseURL() + ingressHost, err := url.Parse(hostname) + if err != nil { + return xerrors.Errorf("parse hostname: %w", err) + } + version, err := client.APIVersion(ctx) if err != nil { return xerrors.Errorf("get application version: %w", err) @@ -87,15 +93,15 @@ helm upgrade coder-workspace-provider coder/workspace-provider \ --install \ --force \ --set envproxy.token=`+wp.EnvproxyToken+` \ - --set ingress.host=`+hostname+` \ + --set ingress.host=`+ingressHost.Hostname()+` \ --set envproxy.clusterAddress=`+clusterAddress+` \ - --set cemanager.AccessURL=`+cemanagerURL.String()+` + --set cemanager.accessURL=`+cemanagerURL.String()+` WARNING: The 'envproxy.token' is a secret value that authenticates the workspace provider, make sure not to share this token or make it public. Other values can be set on the helm chart to further customize the deployment, see -https:/github.com/cdr/enterprise-helm/blob/workspace-providers-envproxy-only/README.md +https://github.com/cdr/enterprise-helm/blob/workspace-providers-envproxy-only/README.md `) return nil