---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: centos-xfce-ja
spec:
  serviceName: centos-xfce-ja
  selector:
    matchLabels:
      app: centos-xfce-ja
  replicas: 1
  template:
    metadata:
      labels:
        app: centos-xfce-ja
    spec:
      containers:
      - name: centos
        image: tmatsuo/centos-xfce-ja
        livenessProbe:
          exec:
            command:
            - "curl"
            - "-s"
            - "-f"
            - "--insecure"
            - "-o"
            - "/dev/null"
            - "http://127.0.0.1:8080/desktop/vnc_lite.html"
            - "&&"
            - curl
            - "-s"
            - "-f"
            - "--insecure"
            - "-o"
            - "/dev/null"
            - "http://127.0.0.1:8080/term/static/main.css"
          initialDelaySeconds: 10
          failureThreshold: 3
          periodSeconds: 20
          timeoutSeconds: 5
        env:
        - name: PASSWORD
          value: password
        - name: PORT
          value: "8080"
        - name: VNC_RESOLUTION
          value: "1800x850"
        - name: NOSSL
          value: "true"
        - name: DISABLE_DESKTOP
          value: "false"
        - name: DISABLE_TERMINAL
          value: "false"
        - name: DISABLE_FILER
          value: "false"
        - name: DISABLE_SSH
          value: "false"
        - name: DISABLE_RDP
          value: "false"
        volumeMounts:
        - name: shm
          mountPath: "/dev/shm"
      volumes:
      - name: shm
        emptyDir:
          medium: Memory

