apiVersion: v1
kind: Pod
metadata:
  name: xidunku-xode-server
  labels:
    app: xidunku-xode-server
spec:
  terminationGracePeriodSeconds: 0
  volumes:
    - name: hostdir
      hostPath:
        # 這個目錄會掛在內部 /home/coder/project
        path: /tmp
        type: Directory
  containers:
    - name: code-server
      image: localhost:32000/xidunku-xode-server
      ports:
        - name: web
          containerPort: 8443
      #
      # https://github.com/cdr/code-server/blob/master/src/node/cli.ts
      #
      #command:
      #  - /usr/bin/dumb-init
      #  - --
      #args:
        #- /bin/bash
        #- -c
        #- |
          # http version
          # dumb-init code-server --host 0.0.0.0 --port 8080
          # https version
          # code-server --host 0.0.0.0 --port 8443 --cert
      volumeMounts:
        - name: hostdir
          mountPath: /home/coder/project
      # env:
      #  - name: PASSWORD
      #    value: letmepass1234
      resources:
        limits:
          memory: "512Mi"
          cpu: "500m"