apiVersion: apps/v1
kind: Deployment
metadata:
  name: static-content
  labels:
    app: static-content
spec:
  replicas: 1
  selector:
    matchLabels:
      app: static-content
  template:
    metadata:
      labels:
        app: static-content
    spec:
      containers:
      - name: nginx
        image: nginx:latest
        ports:
        - containerPort: 80
        volumeMounts:
        - name: static-files
          mountPath: /usr/share/nginx/html
        - name: nginx-config
          mountPath: /etc/nginx/conf.d/default.conf
          subPath: default.conf
      volumes:
      - name: static-files
        persistentVolumeClaim:
          claimName: static-pvc
      - name: nginx-config
        configMap:
          name: nginx-config

