apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: wordpress
  name: wordpress
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: wordpress
  template:
    metadata:
      labels:
        app: wordpress
    spec:
      containers:
        - image: wordpress
          imagePullPolicy: Always
          name: wordpress
          envFrom:
            - configMapRef:
                name: wordpress
            - secretRef:
                name: wordpress
          ports:
            - containerPort: 80
              protocol: TCP
          volumeMounts:
            - name: data
              mountPath: /var/www/html/wp-content/
      restartPolicy: Always
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: wordpress-pvc
