apiVersion: v1
kind: ReplicationController
metadata:
  name: registry
  labels:
    app: registry
spec:
  replicas: 1
  template:
    metadata:
      name: registry
      labels:
        app: registry
    spec:
      containers:
        - name: registry
          image: registry:2
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
              hostPort: 5000
          volumeMounts:
            - mountPath: /var/lib/registry
              name: registry-volume
          readinessProbe:
            httpGet:
              path: /v2/_catalog
              port: 5000
            initialDelaySeconds: 3
            timeoutSeconds: 1
          env:
            - name: REGISTRY_STORAGE_DELETE_ENABLED
              value: "true"
      nodeSelector:
        app: ccp-registry
      volumes:
        - name: registry-volume
          hostPath:
            path: /var/lib/ccp-registry
