apiVersion: apps/v1 kind: Deployment metadata: name: ychat namespace: services spec: replicas: 1 # Recreate: single-instance stateful-in-memory chat; avoid two pods racing # for the same Service while the old one drains its sessions. strategy: type: Recreate selector: matchLabels: app: ychat template: metadata: labels: app: ychat spec: securityContext: runAsNonRoot: true runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 containers: - name: ychat image: registry.lan.buetow.org:30001/ychat:651f762 imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 runAsGroup: 1000 ports: - containerPort: 2000 name: http # No liveness/readiness probes: yChat segfaults on an empty TCP # open+close (a TCP-socket probe would kill it). It serves real HTTP # requests fine, and kubelet restarts the pod if the process exits. resources: requests: memory: 32Mi cpu: 25m limits: memory: 128Mi cpu: 250m volumeMounts: - name: log mountPath: /app/log - name: tmp mountPath: /tmp volumes: - name: log emptyDir: {} - name: tmp emptyDir: {}