apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    docker-registry: default
  name: docker-registry
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      docker-registry: default
  template:
    metadata:
      labels:
        docker-registry: default
    spec:
      containers:
      - env:
        - name: REGISTRY_HTTP_ADDR
          value: :5000
        - name: REGISTRY_HTTP_NET
          value: tcp
        - name: REGISTRY_HTTP_SECRET
          value: '*** GENERATED ***'
        - name: REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_ENFORCEQUOTA
          value: "false"
        - name: REGISTRY_HTTP_TLS_KEY
          value: /etc/secrets/registry.key
        - name: OPENSHIFT_DEFAULT_REGISTRY
          value: docker-registry.default.svc:5000
        - name: REGISTRY_OPENSHIFT_SERVER_ADDR
          value: docker-registry.default.svc:5000
        - name: REGISTRY_CONFIGURATION_PATH
          value: /etc/registry/config.yml
        - name: REGISTRY_HTTP_TLS_CERTIFICATE
          value: /etc/secrets/registry.crt
        image: '*** GENERATED ***'
        livenessProbe:
          httpGet:
            path: /healthz
            port: 5000
            scheme: HTTPS
          initialDelaySeconds: 10
          timeoutSeconds: 5
        name: registry
        ports:
        - containerPort: 5000
        readinessProbe:
          httpGet:
            path: /healthz
            port: 5000
            scheme: HTTPS
          timeoutSeconds: 5
        resources:
          requests:
            cpu: 100m
            memory: 256Mi
        volumeMounts:
        - mountPath: /etc/secrets
          name: registry-certificates
        - mountPath: /etc/registry
          name: docker-config
      nodeSelector:
        node-role.kubernetes.io/infra: "true"
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: registry
      serviceAccountName: registry
      volumes:
      - name: registry-certificates
        secret:
          secretName: registry-certificates
      - name: docker-config
        secret:
          secretName: registry-config
