apiVersion: v1
kind: Pod
metadata:
  name: server-script-p4
  labels:
    version: "1.1"
    role: web_server_P4
spec:
  containers:
  - image: vicentehdiazupm/comp-nub-p4:v1.1
    name: server-script
    volumeMounts:
      - mountPath: /html
        name: html
    ports:
      - containerPort: 8080
        protocol: TCP
    lifecycle:
        postStart:
          exec:
            command:
              - "sh"
              - "-c"
              - >
                mv /app/template.html /html;
                ln -s /html/template.html /app/template.html
  volumes:
    - name: html
      emptyDir: {}
