apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: registry
spec:
  serviceName: "registry"
  replicas: 1
  selector:
    matchLabels:
      app: registry
  template:
    metadata:
      labels:
        app: registry
    spec:
      containers:
      - name: registry
        image: registry:2.7.1
        ports:
        - containerPort: 5000
          name: registry
        volumeMounts:
        - name: registry-data
          mountPath: /var/lib/registry
  volumeClaimTemplates:
  - metadata:
      name: registry-data
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 10Gi


