---
# Source: docker-registry/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: local
  namespace: registry
  labels:
    app: local
    chart: docker-registry-2.1.0
    release: local
    heritage: Helm
spec:
  selector:
    matchLabels:
      app: local
      release: local
  replicas: 1
  minReadySeconds: 5
  template:
    metadata:
      labels:
        app: local
        release: local
      annotations:
        checksum/config: 042402c17f5d8f8d60d32ad22af536e82d105e0e5d4308c9ef50209c470e806a
        checksum/secret: af5da08065442939d38b1cf32d6c97e0d858a7b2d4f9c9d1ec503e32349e6511
    spec:
      securityContext:
        fsGroup: 1000
        runAsUser: 1000
      containers:
        - name: docker-registry
          image: "registry:2.7.1"
          imagePullPolicy: IfNotPresent
          command:
          - /bin/registry
          - serve
          - /etc/docker/registry/config.yml
          ports:
            - containerPort: 5000
          livenessProbe:
            httpGet:
              path: /
              port: 5000
          readinessProbe:
            httpGet:
              path: /
              port: 5000
          resources:
            {}
          env:
            - name: REGISTRY_HTTP_SECRET
              valueFrom:
                secretKeyRef:
                  name: local-secret
                  key: haSharedSecret
            - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
              value: "/var/lib/registry"
          volumeMounts:
            - name: data
              mountPath: /var/lib/registry/
            - name: "local-config"
              mountPath: "/etc/docker/registry"
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: local
        - name: local-config
          configMap:
            name: local-config
