Skip to content

Commit ebd9791

Browse files
Merge branch 'main' into brymut/add-hetzner-template
2 parents 96c431c + cf66809 commit ebd9791

File tree

5 files changed

+401
-7
lines changed

5 files changed

+401
-7
lines changed

registry/coder/modules/hcp-vault-secrets/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ tags: [integration, vault, hashicorp, hvs]
1515
>
1616
> **Use these Coder registry modules instead:**
1717
>
18-
> - **[vault-token](https://registry.coder.com/modules/vault-token)** - Connect to Vault using access tokens
19-
> - **[vault-jwt](https://registry.coder.com/modules/vault-jwt)** - Connect to Vault using JWT/OIDC authentication
20-
> - **[vault-github](https://registry.coder.com/modules/vault-github)** - Connect to Vault using GitHub authentication
18+
> - **[vault-token](https://registry.coder.com/modules/coder/vault-token)** - Connect to Vault using access tokens
19+
> - **[vault-jwt](https://registry.coder.com/modules/coder/vault-jwt)** - Connect to Vault using JWT/OIDC authentication
20+
> - **[vault-github](https://registry.coder.com/modules/coder/vault-github)** - Connect to Vault using GitHub authentication
2121
>
2222
> These modules work with both self-hosted Vault and HCP Vault Dedicated. For migration help, see the [official HashiCorp announcement](https://developer.hashicorp.com/hcp/docs/vault-secrets/end-of-sale-announcement).
2323
@@ -26,7 +26,7 @@ This module lets you fetch all or selective secrets from a [HCP Vault Secrets](h
2626
```tf
2727
module "vault" {
2828
source = "registry.coder.com/coder/hcp-vault-secrets/coder"
29-
version = "1.0.33"
29+
version = "1.0.34"
3030
agent_id = coder_agent.example.id
3131
app_name = "demo-app"
3232
project_id = "aaa-bbb-ccc"
@@ -52,7 +52,7 @@ To fetch all secrets from the HCP Vault Secrets app, skip the `secrets` input.
5252
```tf
5353
module "vault" {
5454
source = "registry.coder.com/coder/hcp-vault-secrets/coder"
55-
version = "1.0.33"
55+
version = "1.0.34"
5656
agent_id = coder_agent.example.id
5757
app_name = "demo-app"
5858
project_id = "aaa-bbb-ccc"
@@ -66,7 +66,7 @@ To fetch selective secrets from the HCP Vault Secrets app, set the `secrets` inp
6666
```tf
6767
module "vault" {
6868
source = "registry.coder.com/coder/hcp-vault-secrets/coder"
69-
version = "1.0.33"
69+
version = "1.0.34"
7070
agent_id = coder_agent.example.id
7171
app_name = "demo-app"
7272
project_id = "aaa-bbb-ccc"
@@ -81,7 +81,7 @@ Set `client_id` and `client_secret` as module inputs.
8181
```tf
8282
module "vault" {
8383
source = "registry.coder.com/coder/hcp-vault-secrets/coder"
84-
version = "1.0.33"
84+
version = "1.0.34"
8585
agent_id = coder_agent.example.id
8686
app_name = "demo-app"
8787
project_id = "aaa-bbb-ccc"
23.3 KB
Loading

registry/ericpaulsen/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
display_name: "Eric Paulsen"
3+
bio: "Field CTO, EMEA @ Coder"
4+
avatar_url: "./.images/avatar.png"
5+
github: "ericpaulsen"
6+
linkedin: "https://www.linkedin.com/in/ericpaulsen17" # Optional
7+
website: "https://ericpaulsen.io" # Optional
8+
support_email: "[email protected]" # Optional
9+
status: "community"
10+
---
11+
12+
# Eric Paulsen
13+
14+
I'm Eric Paulsen, Coder's EMEA Field CTO based in London, originating from Miami.
15+
Outside of working with our customers, I enjoy teaching myself things,
16+
playing volleyball, and dabbling in a bit of DJing & photography.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
display_name: Kubernetes (Deployment) with Dynamic Username
3+
description: Provision Kubernetes Deployments as Coder workspaces with your Username
4+
icon: ../../../../.icons/kubernetes.svg
5+
verified: true
6+
tags: [kubernetes, container, username]
7+
---
8+
9+
# Remote development on Kubernetes with dynamic usernames
10+
11+
Provision Kubernetes Pods as [Coder workspaces](https://coder.com/docs/workspaces) with this example template. This template
12+
will run the workspace container as a non-root UID using your Coder username.
13+
14+
Here is the entrypoint logic in the template that enables Coder to source your username and write it to the Ubuntu operating system at start-up.
15+
16+
> These commands may differ if you run your workspace image with a distro other than Ubuntu.
17+
18+
```terraform
19+
command = ["sh", "-c", <<EOF
20+
# Create user and setup home directory
21+
sudo useradd ${data.coder_workspace_owner.me.name} --home=/home/${data.coder_workspace_owner.me.name} --shell=/bin/bash --uid=1001 --user-group
22+
sudo chown -R ${data.coder_workspace_owner.me.name}:${data.coder_workspace_owner.me.name} /home/${data.coder_workspace_owner.me.name}
23+
24+
# Switch to user and run agent
25+
exec sudo --preserve-env=CODER_AGENT_TOKEN -u ${data.coder_workspace_owner.me.name} sh -c '${coder_agent.main.init_script}'
26+
EOF
27+
]
28+
```
29+
30+
<!-- TODO: Add screenshot -->
31+
32+
## Prerequisites
33+
34+
### Infrastructure
35+
36+
**Cluster**: This template requires an existing Kubernetes cluster
37+
38+
**Container Image**: This template uses the [codercom/enterprise-base:ubuntu image](https://github.com/coder/enterprise-images/tree/main/images/base) with some dev tools preinstalled. To add additional tools, extend this image or build it yourself.
39+
40+
### Authentication
41+
42+
This template authenticates using a `~/.kube/config`, if present on the server, or via built-in authentication if the Coder provisioner is running on Kubernetes with an authorized ServiceAccount. To use another [authentication method](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#authentication), edit the template.
43+
44+
## Architecture
45+
46+
This template provisions the following resources:
47+
48+
- Kubernetes Deployment (ephemeral)
49+
- Kubernetes persistent volume claim (persistent on `/home/${username}`, where `${username}` is your Coder username)
50+
51+
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the container image. Alternatively, individual developers can [personalize](https://coder.com/docs/dotfiles) their workspaces with dotfiles.

0 commit comments

Comments
 (0)