# Source: docker-registry/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: docker-registry
  labels:
    app: docker-registry
    chart: docker-registry-1.9.4
    release: docker-registry
    heritage: Helm
    gitops.jenkins-x.io/pipeline: 'namespaces'
  namespace: jx
  annotations:
    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: c99bb016eb280d8a0195307400df7b878be6f707f12c3a8ad76046a69aba3767
    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
