diff --git a/code-server/deployment.yaml b/code-server/deployment.yaml new file mode 100644 index 0000000..0c2f99a --- /dev/null +++ b/code-server/deployment.yaml @@ -0,0 +1,141 @@ +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -o deployment.yaml -n code-server + kompose.service.expose: code-server.wayl.one + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: code-server + name: code-server + namespace: code-server +spec: + ports: + - name: "8443" + port: 8443 + targetPort: 8443 + selector: + io.kompose.service: code-server +status: + loadBalancer: {} + +--- +apiVersion: v1 +kind: Namespace +metadata: + creationTimestamp: null + name: code-server + namespace: code-server +spec: {} +status: {} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -o deployment.yaml -n code-server + kompose.service.expose: code-server.wayl.one + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: code-server + name: code-server + namespace: code-server +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: code-server + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -o deployment.yaml -n code-server + kompose.service.expose: code-server.wayl.one + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.network/code-server-default: "true" + io.kompose.service: code-server + spec: + containers: + - env: + - name: DEFAULT_WORKSPACE + value: /config/workspace + - name: PASSWORD + value: password + - name: PGID + value: "1000" + - name: PROXY_DOMAIN + value: code-server.wayl.one + - name: PUID + value: "1000" + - name: SUDO_PASSWORD + value: password + - name: TZ + value: Etc/UTC + image: lscr.io/linuxserver/code-server:latest + name: code-server + ports: + - containerPort: 8443 + protocol: TCP + resources: {} + volumeMounts: + - mountPath: /config + name: code-server-data + restartPolicy: Always + volumes: + - name: code-server-data + persistentVolumeClaim: + claimName: code-server-data +status: {} + +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + kompose.cmd: kompose convert -o deployment.yaml -n code-server + kompose.service.expose: code-server.wayl.one + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: code-server + name: code-server + namespace: code-server +spec: + rules: + - host: code-server.wayl.one + http: + paths: + - backend: + service: + name: code-server + port: + number: 8443 + path: / + pathType: Prefix +status: + loadBalancer: {} + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: code-server-data + name: code-server-data + namespace: code-server +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} + diff --git a/code-server/docker-compose.yml b/code-server/docker-compose.yml new file mode 100644 index 0000000..4eeb27d --- /dev/null +++ b/code-server/docker-compose.yml @@ -0,0 +1,23 @@ +version: "2.1" +services: + code-server: + image: lscr.io/linuxserver/code-server:latest + container_name: code-server + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + - PASSWORD=password #optional + # - HASHED_PASSWORD= #optional + - SUDO_PASSWORD=password #optional + # - SUDO_PASSWORD_HASH= #optional + - PROXY_DOMAIN=code-server.wayl.one #optional + - DEFAULT_WORKSPACE=/config/workspace #optional + volumes: + - code-server-data:/config + labels: + kompose.service.expose: code-server.wayl.one + ports: + - 8443 +volumes: + code-server-data: diff --git a/code-server/justfile b/code-server/justfile new file mode 100644 index 0000000..6f2dec5 --- /dev/null +++ b/code-server/justfile @@ -0,0 +1,9 @@ +default: convert deploy viz +convert: + kompose convert -o deployment.yaml -n code-server +deploy: + kubectl apply -f deployment.yaml +viz: + k8sviz -n code-server --kubeconfig $KUBECONFIG -t png -o code-server-k8s.png +restart: + kubectl rollout restart -n code-server deployment/code-server