Demo Coder
kubectl create namespace coder
You can install Postgres manually on your cluster using the Bitnami PostgreSQL Helm chart. There are some helpful guides on the internet that explain sensible configurations for this chart. Example:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm upgrade --install coder-db bitnami/postgresql \
--namespace coder \
-f values-postgres.yaml
The cluster-internal DB URL for the above database is:
postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable
Ensure you set up periodic backups so you don't lose data.
kubectl create secret generic coder-db-url -n coder \
--from-literal=url="postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable"
helm repo add coder-v2 https://helm.coder.com/v2
helm upgrade --install coder coder-v2/coder \
--namespace coder \
-f secrets.yaml -f values.yaml
I'm using an ingress to expose Coder. You can use a LoadBalancer or NodePort.
Update the values.yaml
file to include the following:
coder:
env:
- name: CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS
value: "true"
- name: CODER_OAUTH2_GITHUB_CLIENT_ID
value: "533...des"
- name: CODER_OAUTH2_GITHUB_CLIENT_SECRET
value: "G0CSP...7qSM"
# If setting allowed orgs, comment out CODER_OAUTH2_GITHUB_ALLOW_EVERYONE and its value
- name: CODER_OAUTH2_GITHUB_ALLOWED_ORGS
value: "your-org"
# If allowing everyone, comment out CODER_OAUTH2_GITHUB_ALLOWED_ORGS and it's value
#- name: CODER_OAUTH2_GITHUB_ALLOW_EVERYONE
# value: "true"
then upgrade:
helm repo update
helm upgrade coder coder-v2/coder \
--namespace coder \
-f values.yaml
minikube start --cpus=3 --memory=6GB