Skip to content

Commit 9b9e914

Browse files
deansheatherKatie Horne
and
Katie Horne
authored
Avoid pulling full values file during install (#401)
Co-authored-by: Katie Horne <katie@coder.com>
1 parent a9f2829 commit 9b9e914

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"format:check": "prettier --check '**/*.{css,html,js,json,jsx,ts,tsx,yaml,yml}'",
1313
"format:write": "prettier --write '**/*.{css,html,js,json,jsx,ts,tsx,yaml,yml}'",
1414
"lint": "markdownlint --config .markdownlint.jsonc --rules .markdownlint-rules '**/*.md'",
15-
"lint:fix": "markdownlint --fix '**/*.md'"
15+
"lint:fix": "markdownlint --config .markdownlint.jsonc --rules .markdownlint-rules --fix '**/*.md'"
1616
},
1717
"devDependencies": {
1818
"@types/minimist": "^1.2.1",

setup/installation.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,42 +46,40 @@ kubectl config set-context --current --namespace=coder
4646
`helm search repo coder -l`)
4747

4848
```console
49-
helm install coder coder/coder --namespace coder
49+
helm install coder coder/coder --namespace coder --version=<VERSION>
5050
```
5151

5252
**Steps 3-5 are optional for non-production deployments.**
5353

54-
1. Get a copy of your Helm chart so that you can modify it; you'll need to
55-
modify the Helm chart to update your PostgreSQL databases (step 4) and enable
56-
dev URLs (step 5):
54+
1. Get a copy of your Helm config values so that you can modify it; you'll need
55+
to modify these values to update your PostgreSQL databases (step 4) and
56+
enable dev URLs (step 5):
5757

58-
a. Get a copy of your existing Helm chart and save it as `current-values.yaml`:
59-
`helm show values coder/coder > current-values.yaml`
58+
a. Create an empty file called `values.yaml` which will contain your
59+
deployment configuration options.
6060

61-
b. Edit the `current-values.yaml` file as needed. Be sure to remove the lines
62-
that you are _not_ modifying, otherwise the contents of `current-values.yaml`
63-
will override those in the default chart.
61+
b. Edit the `values.yaml` file as needed.
6462

6563
> View the
6664
> [configuration options available in the `values.yaml` file.](https://github.com/cdr/enterprise-helm#values)
6765
6866
c. Upgrade/install your Coder deployment with the updated Helm chart (be sure
69-
to replace the placeholder value with your Coder version). **This must be done
70-
whenever you update the Helm chart:**
67+
to replace the placeholder value with your Coder version). **This must be
68+
done whenever you update the Helm chart:**
7169

7270
```console
73-
helm upgrade coder coder/coder -n coder --version=<VERSION> --values current-values.yaml
71+
helm upgrade coder coder/coder --namespace coder --version=<VERSION> --values values.yaml
7472
```
7573

7674
> If you omit `--version`, you'll upgrade to the latest version, excluding
7775
> release candidates (RCs). To include RCs, provide the `--devel` flag.
7876
>
7977
> We do not provide documentation for RCs, and you should not use them unless
80-
you've been instructed to do so by Coder. You can identify RCs by the
81-
presence of `-rc` in the version number (e.g., `1.16.0-rc.1`).
78+
> you've been instructed to do so by Coder. You can identify RCs by the
79+
> presence of `-rc` in the version number (e.g., `1.16.0-rc.1`).
8280
8381
1. Ensure that you have superuser privileges to your PostgreSQL database. Add
84-
the following to your Helm chart so that Coder uses your external PostgreSQL
82+
the following to your Helm values so that Coder uses your external PostgreSQL
8583
databases:
8684

8785
```yaml
@@ -96,14 +94,22 @@ kubectl config set-context --current --namespace=coder
9694
```
9795
9896
To create the `passwordSecret`, run
99-
`kubectl create secret generic <NAME> --from-file=test=/dev/stdin`
97+
`kubectl create secret generic <NAME> --from-literal="password=UserDefinedPassword"`
10098
(be sure to replace `UserDefinedPassword` with your actual password).
10199

100+
> Put a space before the command to prevent it from being saved in your shell
101+
> history.
102+
>
103+
> Running this command could potentially expose your database password to
104+
> other users on your system through `/proc`. If this is a concern, you can
105+
> use `--from-file=password=/dev/stdin` instead of `--from-literal=...` to
106+
> enter your password and press `Ctrl+D` when you're done to submit it.
107+
102108
You can find/define these values in your
103109
[PostgreSQL server configuration file](https://www.postgresql.org/docs/current/config-setting.html).
104110

105111
> For more information, [see our guide](../guides/deployments/postgres.md) on
106-
setting up a PostgreSQL instance.
112+
> setting up a PostgreSQL instance.
107113

108114
1. [Enable dev URL usage](../admin/devurls.md). Dev URLs allow users to access
109115
the web servers running in your workspace. To enable, provide a wildcard

0 commit comments

Comments
 (0)