apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: docker-registry
  name: registry
  annotations:
    ingress.kubernetes.io/proxy-body-size: "5g"
spec:
  tls:
  - hosts:
      - registry.k8s.objectif-libre.corp
    secretName: docker-registry-tls
  rules:
  - host: registry.k8s.objectif-libre.corp
    http:
      paths:
      - backend:
          serviceName: docker-registry
          servicePort: 80

---
apiVersion: v1
kind: Service
metadata:
  namespace: docker-registry
  name: docker-registry
  labels:
    app: registry
spec:
  ports:
  - port: 80
    targetPort: 5000
    protocol: TCP
  selector:
    app: registry

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  namespace: docker-registry
  name: registry
  labels:
    app: registry
spec:
  replicas: 1
  selector:
    matchLabels:
      app: registry
  template:
    metadata:
      labels:
        app: registry
    spec:
      containers:
      - image: registry:2
        imagePullPolicy: Always
        name: registry
        ports:
        - containerPort: 5000
          protocol: TCP
        volumeMounts:
        - mountPath: /var/lib/registry
          name: var-lib-registry
      volumes:
        - name: var-lib-registry
          persistentVolumeClaim:
            claimName: docker-registry-data

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: docker-registry
  name: docker-registry-data
  annotations:
    volume.beta.kubernetes.io/storage-class: default
spec:
  accessModes:
  - ReadWriteOnce
  resources:
     requests:
       storage: 30G

---
apiVersion: v1
kind: Secret
type: kubernetes.io/tls
data:
  tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURLVENDQWhHZ0F3SUJBZ0lKQUlPbFpuT0pjc3hlTUEwR0NTcUdTSWIzRFFFQkN3VUFNQ3N4S1RBbkJnTlYKQkFNTUlISmxaMmx6ZEhKNUxtczRjeTV2WW1wbFkzUnBaaTFzYVdKeVpTNWpiM0p3TUI0WERURTNNRGd3TkRFMApNalUxTTFvWERURTRNRGd3TkRFME1qVTFNMW93S3pFcE1DY0dBMVVFQXd3Z2NtVm5hWE4wY25rdWF6aHpMbTlpCmFtVmpkR2xtTFd4cFluSmxMbU52Y25B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