apiVersion: apps/v1
kind: Deployment
metadata:
  name: code-server
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: code-server
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: code-server
    helm.sh/chart: code-server-4.5.0
  namespace: code-server
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: code-server
      app.kubernetes.io/instance: code-server
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: code-server
        app.kubernetes.io/name: code-server
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: TZ
              value: US/Central
            - name: PUID
              value: "1000"
            - name: PGID
              value: "1000"
            - name: DEFAULT_WORKSPACE
              value: /config
          envFrom:
            - secretRef:
                name: codeserver-password-secret
          image: ghcr.io/linuxserver/code-server:4.107.0@sha256:e2ebedc28ab9e2ebe08093cf7e78515f97822956ff7cbac3d86fb0bd9e4b6bca
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
          volumeMounts:
            - mountPath: /config
              name: config
      volumes:
        - name: config
          persistentVolumeClaim:
            claimName: code-server-config
