apiVersion: v1
kind: Pod
metadata:
  name: web
  labels:
    name: web
spec:
  containers:
  - name: web
    image: shuraliev/otus:webv1
    imagePullPolicy: IfNotPresent
    volumeMounts:
      - mountPath: /app
        name: app
    resources:
      limits:
        memory: "128Mi"
        cpu: "500m"
    ports:
      - containerPort: 80
  initContainers:
    - name: init-web
      image: busybox:1.34.1
      imagePullPolicy: IfNotPresent
      volumeMounts:
        - mountPath: /app
          name: app
      command: ['sh', '-c', 'wget -O- https://tinyurl.com/otus-k8s-intro | sh']
  volumes:
    - name: app
      emptyDir: {}
