apiVersion: apps/v1
kind: Deployment
metadata:
  name: webserver
  labels:
    app: apache
spec:
  replicas: 3
  selector:
    matchLabels:
      app: apache
  template:
    metadata:
      labels:
        app: apache
    spec:
      containers:
      - name: userapp
        image: usersapp:latest
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
        volumeMounts:
          - name: config-volume
            mountPath: /var/www/html/index.php
            subPath: indexOverride.php
      volumes:
        - name: config-volume
          configMap:
            name: webapp-home-override

