apiVersion: v1
kind: Service
metadata:
  annotations:
    #Mandatory annotations in order to enable the docker ingress rule (https://github.com/jenkins-x/exposecontroller)
    fabric8.io/expose: "true"
    fabric8.io/exposeUrl: https://docker.${NAMESPACE}.dev.nuxeo.com
    #Optional annotations in order to customize the docker ingress rule
    fabric8.io/ingress.path: "/(.*)"
    fabric8.io/ingress.tls-secret-name: "${NAMESPACE}-tls" #Configure the TLS certificate to be used by the docker ingress rule
    #proxy-body-size: Enable upload or download of large files
    #rewrite-target: Redirect incoming requests to the docker repository /repository/docker-registry/$1
    fabric8.io/ingress.annotations: |-
      kubernetes.io/tls-acme: 'false'
      kubernetes.io/ingress.class: nginx
      nginx.ingress.kubernetes.io/proxy-body-size: 3g
      nginx.ingress.kubernetes.io/rewrite-target: /repository/docker-registry/$1
  name: docker
  namespace: "${NAMESPACE}"
spec:
  type: ClusterIP
  ports:
  - name: docker
    port: 80
    protocol: TCP
    targetPort: 8081
  selector:
    app: nexus
    release: jenkins-x
