apiVersion: v1
kind: Pod
metadata:
  name: myapp-ntest
  labels:
    name: "myapp-ntest"
    test: "true"
spec:
  volumes:
  - name: app-volume
    emptyDir: {}
  containers:
  - name: ntest-core
    image: klimdos/ntest
    volumeMounts:
    - mountPath: /usr/share/nginx/html/app
      name: app-volume
    resources:
      limits:
        memory: "128Mi"
        cpu: "500m"
    ports:
      - containerPort: 8000
    readinessProbe:
        httpGet:
          path: /index.html
          port: 80
    livenessProbe:
        tcpSocket:
          port: 8000
  initContainers:
  - name: init-ntest-index
    image: busybox
    command: ['sh', '-c', 'wget -O- https://raw.githubusercontent.com/express42/otus-platform-snippets/master/Module-02/Introduction-to-Kubernetes/wget.sh | sh']
    volumeMounts:
    - mountPath: /app
      name: app-volume
  - name: init-ntest-jpg
    image: busybox
    command: ['sh', '-c', 'wget -O /app/img.jpg https://nextcloud.klimdos.ml/s/LPiyB5MJMHDc9gN/preview']
    volumeMounts:
    - mountPath: /app
      name: app-volume
