Skip to content

feat: dynamic username template #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 31, 2025
Merged

Conversation

ericpaulsen
Copy link
Member

Description

this PR adds a new template that creates & runs Coder workspaces on K8s with the user's Coder username as the Linux UID. a commonly requested use-case by customers.

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/ericpaulsen/templates/k8s-pod-username.tf

Testing & Validation

  • Changes tested locally

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new Terraform template for Coder that creates Kubernetes workspaces with dynamic usernames, where the Linux user inside the container matches the Coder username. This addresses a common customer requirement for workspace identity management.

Key changes:

  • New Kubernetes deployment template with dynamic username support
  • User creation logic that maps Coder usernames to Linux UIDs
  • Documentation explaining the template's purpose and usage

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

File Description
registry/ericpaulsen/templates/k8s-username.tf Main template file implementing Kubernetes deployment with dynamic username creation
registry/ericpaulsen/templates/README.md Template documentation explaining usage and prerequisites
registry/ericpaulsen/README.md Author profile information for the template registry

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ericpaulsen. A few suggestions, and we are good to merge.

@ericpaulsen ericpaulsen requested a review from matifali July 30, 2025 08:57
@ericpaulsen
Copy link
Member Author

@matifali good for a final review

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Eric.

@ericpaulsen ericpaulsen enabled auto-merge (squash) July 30, 2025 09:54
@ericpaulsen ericpaulsen requested review from bpmct and stirby July 30, 2025 09:54
@matifali matifali requested a review from DevelopmentCats July 31, 2025 13:02
@phorcys420
Copy link
Member

@ericpaulsen you forgot to create a subfolder for your k8s-username template.

can you move templates/README.md and templates/k8s-username.tf
to templates/k8s-username/README.md and templates/k8s-username/main.tf?

Copy link
Member

@phorcys420 phorcys420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

@ericpaulsen
Copy link
Member Author

done @phorcys420 thank you

@phorcys420 phorcys420 self-requested a review July 31, 2025 14:21
@ericpaulsen ericpaulsen merged commit 3fd7b47 into main Jul 31, 2025
4 checks passed
@ericpaulsen ericpaulsen deleted the ericpaulsen-template-pod-username branch July 31, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants