apiVersion: v1
kind: Pod
metadata:
  name: demo-pod
  labels:
    test: health
  namespace: demo
spec:
#  securityContext:
#    runAsUser: 1001
#    fsGroup: 2000 
  containers:
  - name: demo
#    image: docker-registry.mudryy.engineer/custom_nginx:1.3
    image: nginx
    imagePullPolicy: IfNotPresent
    ports:
    - containerPort: 80
      name: "http-server"
    resources:
      limits:
        memory: "150Mi"
        cpu: "200m"
      requests:
        memory: "100Mi"
        cpu: "100m"
    volumeMounts:
    - name: task-pv-storage
      mountPath: "/usr/share/nginx/html/data" 
    command: []
    args: []
    readinessProbe:
      tcpSocket:
        port: 80
      initialDelaySeconds: 15
      periodSeconds: 20
    livenessProbe:
      tcpSocket:
        port: 80
      initialDelaySeconds: 25
      periodSeconds: 30
    securityContext:
      allowPrivilegeEscalation: false
      capabilities:
        add:
        - SYS_PTRACE
    stdin: true
    tty: true
    env:
    - name: MAP_FORMAT8_VERSION
      valueFrom:
        configMapKeyRef:
          # The ConfigMap containing the value you want to assign to SPECIAL_LEVEL_KEY
          name: map-config
          # Specify the key associated with the value
          key: map_version
  imagePullSecrets:
    - name: regcred
  volumes:
    - name: nginx-storage
      emptyDir: {}
    - name: task-pv-storage
      persistentVolumeClaim:
        claimName: task-pv-claim
  dnsPolicy: Default
