Skip to content

TommyLike/code-server-operator

Repository files navigation

Code sever operator

Publish Docker images

This project used to launch multiple code server instances in k8s cluster.

Features

  1. Release compute resource if the code server keeps inactive for some time.
  2. Release volume resource if the code server has not been used for a period of long time.
  3. Git clone code automatically before running code sever.
  4. TLS/SSL enabled.
  5. x86&arm supported

Sample Yaml

The sample yaml can be found in example folder:

apiVersion: cs.tommylike.com/v1alpha1
kind: CodeServer
metadata:
  name: codeserver-tommy
spec:
  url: codeservertommy
  image: "codercom/code-server:v2"
  volumeSize: "200m"
  storageClassName: "local-nfs"
  inactiveAfterSeconds: 600
  recycleAfterSeconds: 1200
  resources:
    requests:
      cpu: "2"
      memory: "2048m"
  serverCipher: "1234"
  initPlugins:
    git:
      - --repourl
      - https://github.com/TommyLike/tommylike.me.git

Image templates

Supported base images are list below:

OS\Arch x86 aarch64
Ubuntu
Centos
openEuler

Develop

We use kind to boot up the kubernetes cluster, please use the script file to prepare cluster.

./local_development/local_up.sh

export KUBECONFIG:

export KUBECONFIG="$(kind get kubeconfig-path development)"

generate latest CRD yaml file:

make manifests

apply CRD into cluster:

make install

then test locally:

make run

About

Running multiple code server instances in k8s cluster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •