Skip to content

docs: simplify PostgreSQL setup by using 'postgresql' as release name #18754

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

blink-so[bot]
Copy link
Contributor

@blink-so blink-so bot commented Jul 4, 2025

Fixes #18751

Use postgresql as the Helm release name instead of coder-db to make the service name more intuitive and eliminate confusion entirely.

Changes

  • Changed helm install coder-db bitnami/postgresql to helm install postgresql bitnami/postgresql
  • Updated PostgreSQL URLs from coder-db-postgresql.coder.svc.cluster.local to postgresql.coder.svc.cluster.local
  • Removed explanatory notes about service naming (no longer needed)

Benefits

✅ Makes examples work out-of-the-box for most users
✅ Uses the most straightforward and intuitive release name
✅ Eliminates confusion about service naming entirely
✅ Simpler documentation without complex explanations

Testing

  • Verified that helm install postgresql bitnami/postgresql creates service named postgresql
  • Confirmed this approach works with the connection URL postgresql.coder.svc.cluster.local

Suggested by @EdwardAngert as a cleaner solution than explaining the service naming dependency.

The PostgreSQL service name depends on the Helm release name used during
installation. Added notes to clarify that users need to adjust the service
name in the connection URL based on their actual release name.

Fixes #18751

Co-authored-by: matifali <[email protected]>
@EdwardAngert EdwardAngert added the docs Area: coder.com/docs label Jul 7, 2025
@EdwardAngert
Copy link
Contributor

thanks for starting this, @matifali (and for reporting, @sharkymark! )

I tried setting up a quick (it ended up not being quick 😭 ) 3-node kubernetes cluster and ran through without errors, so I think a breakdown of the commands should be alright.

@sharkymark , if this feels like an alright solution, I'll edit the copy and we can merge it

@EdwardAngert EdwardAngert requested a review from matifali July 8, 2025 16:19
@EdwardAngert EdwardAngert self-assigned this Jul 8, 2025
@ericpaulsen
Copy link
Member

@EdwardAngert - i think the simpler fix here is to set the URL as

postgres://coder:[email protected]:5432/coder?sslmode=disable

thoughts?

Copy link
Contributor Author

blink-so bot commented Jul 8, 2025

Hi @ericpaulsen! I tested this earlier and when using helm install coder-db bitnami/postgresql, the Bitnami chart creates a service named coder-db-postgresql, not coder-db.

Here's what I verified:

  • helm install coder-db bitnami/postgresql → Service: coder-db-postgresql
  • helm install postgresql bitnami/postgresql → Service: postgresql

The service naming follows the pattern {release-name}-postgresql (unless the release name already contains "postgresql").

Are you thinking of a different approach, or did you find that coder-db service exists in addition to coder-db-postgresql? I'd be happy to test any specific scenario you have in mind!

@EdwardAngert
Copy link
Contributor

EdwardAngert commented Jul 8, 2025

@ericpaulsen

@EdwardAngert - i think the simpler fix here is to set the URL as

postgres://coder:[email protected]:5432/coder?sslmode=disable

thoughts?

I'm super unfamiliar with kubernetes and helm, so I defer to you and @sharkymark.

If all we need to do is remove coder-db from the examples to make it work both as a proof-of-concept and for use cases like @sharkymark's (CI?) then I prefer more universally applicable examples--my goal is to make the examples in the docs work without too much modification, regardless of what docs examples the user started with and goes on to.

so

L47:

- helm install coder-db bitnami/postgresql \
+ helm install postgresql bitnami/postgresql \

L58:

- postgres://coder:[email protected]:5432/coder?sslmode=disable
+ postgres://coder:[email protected]:5432/coder?sslmode=disable

LL80-81:

kubectl create secret generic coder-db-url -n coder \
-  --from-literal=url="postgres://coder:[email protected]:5432/coder?sslmode=disable"
+  --from-literal=url="postgres://coder:[email protected]:5432/coder?sslmode=disable"

would that work?

Copy link
Contributor Author

blink-so bot commented Jul 8, 2025

That's a great approach @EdwardAngert! Using postgresql as the release name is indeed more universal and simpler. It eliminates the confusion entirely by making the service name match the most intuitive expectation.

Your suggested changes would:
✅ Make the examples work out-of-the-box for most users
✅ Eliminate the need for explanatory notes about service naming
✅ Use the most straightforward release name

I'll update the PR to implement these changes instead of the current approach. This is definitely cleaner!

Use 'postgresql' as the Helm release name instead of 'coder-db' to make
the service name more intuitive and eliminate confusion. This approach:

- Makes examples work out-of-the-box for most users
- Uses the most straightforward release name
- Eliminates need for explanatory notes about service naming

Suggested-by: EdwardAngert <[email protected]>
Fixes #18751

Co-authored-by: matifali <[email protected]>
@blink-so blink-so bot changed the title docs: clarify PostgreSQL service naming in Kubernetes installation docs: simplify PostgreSQL setup by using 'postgresql' as release name Jul 8, 2025
Copy link
Contributor Author

blink-so bot commented Jul 8, 2025

Changes implemented!

I've updated the PR to implement @EdwardAngert's suggested approach:

Changes made:

  • helm install coder-db bitnami/postgresqlhelm install postgresql bitnami/postgresql
  • coder-db-postgresql.coder.svc.cluster.localpostgresql.coder.svc.cluster.local
  • Removed all explanatory notes (no longer needed)

This is much cleaner and eliminates the confusion entirely. The examples now work out-of-the-box with the most intuitive service name. Thanks for the great suggestion! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Area: coder.com/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: inaccurate in-cluster Postgres URL
2 participants