Renamed zot-exporter to zxp and added its image to zot release

Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
Alexei Dodon
2022-01-17 16:36:13 +02:00
committed by Ramkumar Chinchani
parent cec66f6bc2
commit c9a81baa10
13 changed files with 108 additions and 21 deletions
@@ -1,5 +1,5 @@
# ---
# Stage 1: Install certs, build binary, create default config file
# Stage 1: Build binary, create default config file
# ---
FROM ghcr.io/project-zot/golang:1.17 AS builder
RUN mkdir -p /go/src/github.com/project-zot/zot
@@ -21,12 +21,11 @@ RUN echo '{\n\
}\n' > config.json && cat config.json
# ---
# Stage 2: Final image with nothing but certs, binary, and default config file
# Stage 2: Final image with nothing but binary and default config file
# ---
FROM scratch AS final
COPY --from=builder /go/src/github.com/project-zot/zot/bin/zot-exporter /zot-exporter
COPY --from=builder /go/src/github.com/project-zot/zot/config.json /etc/zot/config.json
ENTRYPOINT ["/zot-exporter"]
COPY --from=builder /go/src/github.com/project-zot/zot/bin/zxp /zxp
COPY --from=builder /go/src/github.com/project-zot/zot/config.json /etc/zxp/config.json
ENTRYPOINT ["/zxp"]
EXPOSE 5051
VOLUME ["/var/lib/registry"]
CMD ["config", "/etc/zot/config.json"]
CMD ["config", "/etc/zxp/config.json"]
+2 -3
View File
@@ -20,9 +20,8 @@ run-minimal-container:
.PHONY: binary-exporter-container
binary-exporter-container:
${CONTAINER_RUNTIME} build -f Dockerfile-exporter -t zot-exporter:latest ../../.
${CONTAINER_RUNTIME} build -f Dockerfile-zxp -t zxp:latest ../../.
.PHONY: run-exporter-container
run-exporter-container:
${CONTAINER_RUNTIME} run --rm --security-opt label=disable -v $$(pwd)/../..:/go/src/github.com/project-zot/zot \
zot-exporter:latest
${CONTAINER_RUNTIME} run --rm --security-opt label=disable zxp:latest
+1 -1
View File
@@ -24,5 +24,5 @@ At the end of the script below ports are locally available (using *kubectl port-
* 9090 - for accessing Prometheus server
* 5000 - for zot with all extensions enabled
* 5050 - for accessing dist-spec-only zot server
* 5051 - for zot-exporter access (a Prometheus Node exporter)
* 5051 - for zxp access (a Prometheus Node exporter)
+2 -2
View File
@@ -40,14 +40,14 @@ kind load docker-image quay.io/prometheus-operator/prometheus-operator:v0.51.2 -
kind load docker-image quay.io/prometheus-operator/prometheus-config-reloader:v0.51.2 --name ${CLUSTER_NAME}
kind load docker-image quay.io/prometheus/prometheus:v2.22.1 --name ${CLUSTER_NAME}
## Build zot & zot-exporter related images
## Build zot & zxp images
make binary-container
make binary-minimal-container
make binary-exporter-container
kind load docker-image zot-build:latest --name ${CLUSTER_NAME}
kind load docker-image zot-minimal:latest --name ${CLUSTER_NAME}
kind load docker-image zot-exporter:latest --name ${CLUSTER_NAME}
kind load docker-image zxp:latest --name ${CLUSTER_NAME}
## Deploy prometheus operator
kubectl create -f kubernetes/prometheus/bundle.yaml
@@ -22,7 +22,7 @@ spec:
- name: zot-minimal
containerPort: 5050
- name: zot-exporter
image: zot-exporter:latest
image: zxp:latest
imagePullPolicy: IfNotPresent
ports:
- name: zot-exporter