---
apiVersion: v1
kind: Pod
metadata:
  name: fail-stability-best-practices-for-pod
  labels:
    environment: prod
    app: test
    owner: test-at-datree.io
spec:
  containers:
    - name: nginx
      image: nginx:1.14.2
      ports:
        - containerPort: 80
      resources:
        requests:
          cpu: "50m"
          memory: "256Mi"
        limits:
          cpu: "1500m"
          memory: "5120Mi"
      securityContext:
        readOnlyRootFilesystem: false
        allowPrivilegeEscalation: true
        runAsUser: 0
        runAsNonRoot: false
      volumeMounts:
        - name: nginx-certs
          mountPath: /etc/nginx/certs
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: fail-stability-best-practices-for-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:1.14.2
          ports:
            - containerPort: 80
          resources:
            requests:
              cpu: "50m"
              memory: "256Mi"
            limits:
              cpu: "1500m"
              memory: "5120Mi"
          securityContext:
            readOnlyRootFilesystem: false
            allowPrivilegeEscalation: true
            runAsUser: 0
            runAsNonRoot: false
          volumeMounts:
            - name: nginx-certs
              mountPath: /etc/nginx/certs
