Skip to content

Commit f0a1fa8

Browse files
johnstcndwahler
andauthored
[1.35 cherry] document postgres.noPasswordEnv and seccompProfile workspace template fields (coder#1132)
* chore: document postgres.noPasswordEnv (coder#1131) * chore: document postgres.noPasswordEnv * fixup! chore: document postgres.noPasswordEnv (cherry picked from commit 089544b) * feat: add docs for seccompProfile workspace template fields (coder#1130) (cherry picked from commit bad9895) Co-authored-by: David Wahler <david@coder.com>
1 parent 0e4a5a6 commit f0a1fa8

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

guides/deployments/postgres.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ or cluster.
4444
the console, to avoid inadvertently storing credentials in shell history
4545
files.
4646

47+
> Normally, we set the PostgreSQL password as an environment variable in the
48+
> `coderd` deployment with a reference to the Kubernetes secret. If this is
49+
> not desirable, you can instead mount the secret as a file which Coder will
50+
> read at startup. To do this, set the Helm value `postgres.noPasswordEnv` to
51+
> `true`. This will mount the secret under
52+
> `/run/secrets/<.Values.postgres.passwordSecret>/password` and set the
53+
> environment variable `DB_PASSWORD_PATH` for `coderd` to that value.
54+
4755
1. Get the port number for your PostgreSQL instance:
4856

4957
```sql

workspaces/workspace-templates/templates.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ workspace:
6464
value:
6565
- key: annotation-key
6666
value: annotation-value
67+
seccomp-profile-type:
68+
value: Localhost
69+
seccomp-profile-localhost-profile:
70+
value: profiles/custom-profile.json
6771
configure:
6872
start:
6973
value:
@@ -262,6 +266,47 @@ node-selector:
262266

263267
`node-selector` is disabled by default and must be enabled by a site admin.
264268

269+
#### workspace.specs.kubernetes.seccomp-profile-type.value
270+
271+
Applies a [seccomp profile](https://kubernetes.io/docs/tutorials/security/seccomp/)
272+
to the workspace pod. The value is a string, corresponding to the `type`
273+
subfield of the PodSecurityContext `seccompProfile` attribute.
274+
275+
For example, the following snippet would explicitly disable seccomp protection:
276+
277+
```yaml
278+
seccomp-profile-type:
279+
value: Unconfined
280+
```
281+
282+
`seccomp-profile-type` is disabled by default and must be enabled by a site
283+
admin.
284+
285+
#### workspace.specs.kubernetes.seccomp-profile-localhost-profile.value
286+
287+
Applies a custom [seccomp profile](https://kubernetes.io/docs/tutorials/security/seccomp/)
288+
to the workspace pod. The value is a string, corresponding to the
289+
`localhostProfile` subfield of the PodSecurityContext `seccompProfile`
290+
attribute.
291+
292+
Per the [Kubernetes
293+
documentation](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#seccompprofile-v1-core),
294+
this attribute is only valid if used in combination with the `Localhost` seccomp
295+
profile type. Its value must correspond to the path of a valid JSON profile that
296+
is already configured on the Kubernetes worker nodes.
297+
298+
The following snippet demonstrates setting a custom profile:
299+
300+
```yaml
301+
seccomp-profile-type:
302+
value: Localhost
303+
seccomp-profile-localhost-profile:
304+
value: profiles/my-custom-profile.json
305+
```
306+
307+
`seccomp-profile-localhost-profile` is disabled by default and must be enabled
308+
by a site admin.
309+
265310
#### workspace.configure
266311

267312
This section lists the commands that run within the workspace after Coder builds

0 commit comments

Comments
 (0)