Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 1abada7

Browse files
authored
Add documentation after provider create (#287)
* Add documentation after provider create * Add secret warning
1 parent c3d86f1 commit 1abada7

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

internal/cmd/providers.go

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,41 @@ coder providers create my-provider --hostname=https://provider.example.com --clu
6363
return xerrors.Errorf("create workspace provider: %w", err)
6464
}
6565

66-
err = tablewriter.WriteTable(cmd.OutOrStdout(), 1, func(i int) interface{} {
67-
return *wp
68-
})
66+
cemanagerURL := client.BaseURL()
67+
version, err := client.APIVersion(ctx)
6968
if err != nil {
70-
return xerrors.Errorf("write table: %w", err)
69+
return xerrors.Errorf("get application version: %w", err)
7170
}
71+
72+
clog.LogSuccess(fmt.Sprintf(`
73+
Created workspace provider "%s"
74+
`, createReq.Name))
75+
_ = tablewriter.WriteTable(cmd.OutOrStdout(), 1, func(i int) interface{} {
76+
return *wp
77+
})
78+
_, _ = fmt.Fprint(cmd.OutOrStdout(), `
79+
Now that the workspace provider is provisioned, it must be deployed into the cluster. To learn more,
80+
visit https://coder.com/docs/guides/deploying-workspace-provider
81+
82+
When connected to the cluster you wish to deploy onto, use the following helm command:
83+
84+
helm upgrade coder-workspace-provider coder/workspace-provider \
85+
--version=`+version+` \
86+
--atomic \
87+
--install \
88+
--force \
89+
--set envproxy.token=`+wp.EnvproxyToken+` \
90+
--set ingress.host=`+hostname+` \
91+
--set envproxy.clusterAddress=`+clusterAddress+` \
92+
--set cemanager.AccessURL=`+cemanagerURL.String()+`
93+
94+
WARNING: The 'envproxy.token' is a secret value that authenticates the workspace provider,
95+
make sure not to share this token or make it public.
96+
97+
Other values can be set on the helm chart to further customize the deployment, see
98+
https:/github.com/cdr/enterprise-helm/blob/workspace-providers-envproxy-only/README.md
99+
`)
100+
72101
return nil
73102
},
74103
}

0 commit comments

Comments
 (0)