# Source: docker-registry/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: docker-registry
  namespace: jx
  labels:
    app: docker-registry
    chart: docker-registry-2.1.0
    release: docker-registry
    heritage: Helm
    gitops.jenkins-x.io/pipeline: 'namespaces'
  annotations:
    meta.helm.sh/release-name: 'docker-registry'
    wave.pusher.com/update-on-config-change: 'true'
spec:
  selector:
    matchLabels:
      app: docker-registry
      release: docker-registry
  replicas: 1
  minReadySeconds: 5
  template:
    metadata:
      labels:
        app: docker-registry
        release: docker-registry
      annotations:
        checksum/config: d09c961f4bfb6f760fffc29d3d4b1d5e18393539671c7fe3e7a2368d2957b874
        checksum/secret: e2db06e23dcd7ee21d024b6c1a270371da79aab6b006cd90f2e80abf832617b5
    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: docker-registry-secret
                  key: haSharedSecret
            - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
              value: "/var/lib/registry"
          volumeMounts:
            - name: data
              mountPath: /var/lib/registry/
            - name: "docker-registry-config"
              mountPath: "/etc/docker/registry"
      volumes:
        - name: data
          emptyDir: {}
        - name: docker-registry-config
          configMap:
            name: docker-registry-config
