Skip to content

pyljain/kodespaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kodespaces

A codespaces clone that runs in Kubernetes

Installation

  1. Create the Namespaces
kubectl create ns kodeserver-control-plane
kubectl create ns kodeserver-data-plane
  1. Install Postgres
helm install postgres stable/postgres --namespace=kodeserver-control-plane
  1. Create the service for identity manager
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
  name: identity-service
  namespace: kodeserver-control-plane
spec:
  type: LoadBalancer
  selector:
    role: identity-service
  ports:
    - port: 80
      targetPort: 80
EOF
  1. Create secret for open ID config
kubectl create secret generic openid-config \
  -n kodeserver-control-plane \
  --from-literal=auth_url=$AUTH_URL \
  --from-literal=token_url=$TOKEN_URL \
  --from-literal=client_id=$CLIENT_ID \
  --from-literal=client_secret=$CLIENT_SECRET \
  --from-literal=redirect_uri=$REDIRECT_URI \
  --from-literal=issuer=$ISSUER
  1. Create a secret with the Go Daddy config details
export ID_SERVICE_IP=$(kubectl get svc -n kodeserver-control-plane identity-service --output jsonpath='{.status.loadBalancer.ingress[0].ip}')

kubectl create secret generic gd-dns-provider \
  -n kodeserver-control-plane \
  --from-literal=key=$GD_KEY \
  --from-literal=secret=$GD_SECRET \
  --from-literal=domain=$GD_DOMAIN \
  --from-literal=identity_service_ip=$ID_SERVICE_IP
  1. Apply the manifests
kubectl apply -k ./k8s