diff --git a/README.md b/README.md index 9c2d060..b8f3613 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,20 @@ To run with a custom TZ: -e TZ=America/Los_Angeles +### Run UI in K8S + +For first fill config.yml with your values and create secret: + + kubectl create secret generic docker-registry-ui-conf --from-file=config.yml=./config.yml + +Then deploy app: + + kubectl apply -f k8s-docker-registry-ui.yaml + +After it you can access to UI via port forwarding: + + kubectl port-forward svc/docker-registry-ui 8000 + ## Configure event listener on Docker Registry To receive events you need to configure Registry as follow: diff --git a/k8s-docker-registry-ui.yaml b/k8s-docker-registry-ui.yaml new file mode 100644 index 0000000..4f5f529 --- /dev/null +++ b/k8s-docker-registry-ui.yaml @@ -0,0 +1,40 @@ +apiVersion: v1 +kind: Service +metadata: + name: docker-registry-ui +spec: + ports: + - port: 8000 + targetPort: 8000 + selector: + app: docker-registry-ui +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: docker-registry-ui +spec: + selector: + matchLabels: + app: docker-registry-ui + replicas: 1 + template: + metadata: + labels: + app: docker-registry-ui + spec: + containers: + - name: docker-registry-ui + image: quiq/docker-registry-ui:latest + command: ['/opt/docker-registry-ui'] + args: ['-config-file=/opt/conf/config.yml'] + ports: + - containerPort: 8000 + volumeMounts: + - name: docker-registry-ui-conf + mountPath: /opt/conf + readOnly: true + volumes: + - name: docker-registry-ui-conf + secret: + secretName: docker-registry-ui-conf