fullnameOverride: code-server

image:
  repository: codercom/code-server
  tag: 4.104.2
  pullPolicy: Always

# Persistence configuration for workspace data
persistence:
  enabled: true
  accessMode: ReadWriteOnce
  size: 5Gi
  storageClassName: local-path-retain

# Use existing secret for password
existingSecret: code-server-password
existingSecretKey: password

ingress:
  enabled: true
  ingressClassName: traefik
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    traefik.ingress.kubernetes.io/router.middlewares: authelia-authelia-auth@kubernetescrd
  hosts:
    - host: vscode0213.kro.kr
      paths:
        - /
    - host: www.vscode0213.kro.kr
      paths:
        - /
  tls:
    - secretName: code-server-tls
      hosts:
        - vscode0213.kro.kr
        - www.vscode0213.kro.kr

# Service configuration
service:
  type: ClusterIP
  port: 8080

# Resource settings (no CPU limit for stability)
resources:
  requests:
    cpu: 15m
    memory: 225Mi
  limits:
    memory: 302Mi

# Security context
securityContext:
  enabled: true
  fsGroup: 1000
  runAsUser: 1000

# Volume permissions
volumePermissions:
  enabled: true

# Extra arguments for code-server
extraArgs:
  - --auth
  - none

# Extra environment variables
extraVars:
  - name: TZ
    value: "Asia/Seoul"
  - name: PS1
    value: "coder:\\w~ "

# Health checks
startupProbe:
  enabled: true
  httpGet:
    path: /healthz
    port: 8080
  periodSeconds: 10
  failureThreshold: 30

livenessProbe:
  enabled: true
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 0
  periodSeconds: 10

readinessProbe:
  enabled: true
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 0
  periodSeconds: 5
