apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: registry-mirror
  name: registry-mirror
spec:
  replicas: 1
  selector:
    matchLabels:
      app: registry-mirror
  template:
    metadata:
      labels:
        app: registry-mirror
    spec:
      volumes:
        - name: registry-storage-mirror
          nfs: 
            server: nas.crazyzone.be 
            path: /volume1/docker-storage/docker-registry-mirror
      containers:
      - name: registry-mirror
        image: registry:latest
        ports:
        - containerPort: 5000
          name: registry-mirror
        readinessProbe:
          httpGet:
            scheme: HTTP
            path: /
            port: 5000
          initialDelaySeconds: 10
          periodSeconds: 5        
        volumeMounts:
        - name: registry-storage-mirror
          mountPath: /var/lib/registry
        env:
        - name: REGISTRY_PROXY_REMOTEURL
          value: "https://registry-1.docker.io"
