apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: alpine-pv
  labels:
    app: alpine-pv
spec:
  replicas: 3
  selector:
    matchLabels:
      app: alpine-pv
  serviceName: alpine-pv
  template:
    metadata:
      labels:
        app: alpine-pv
    spec:
      containers:
        - name: alpine-pv
          image: docker.io/library/alpine:latest
          imagePullPolicy: IfNotPresent
          command: ["tail", "-f", "/dev/null"]
          volumeMounts:
            - name: spire-data
              mountPath: /run/spire/data
              readOnly: false
  volumeClaimTemplates:
    - metadata:
        name: spire-data
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
