Skip to content

Commit

Permalink
fix: quick metrics setup in kind with prometheus
Browse files Browse the repository at this point in the history
Signed-off-by: Alexei Dodon <[email protected]>
  • Loading branch information
adodon2go committed Oct 6, 2023
1 parent 044ea85 commit 11b56d3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/metrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Install certs, build binary, create default config file
# ---
FROM ghcr.io/project-zot/golang:1.19 AS builder
FROM ghcr.io/project-zot/golang:1.20 AS builder
RUN mkdir -p /go/src/github.com/project-zot/zot
WORKDIR /go/src/github.com/project-zot/zot
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion examples/metrics/Dockerfile-minimal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Install certs, build binary, create default config file
# ---
FROM ghcr.io/project-zot/golang:1.19 AS builder
FROM ghcr.io/project-zot/golang:1.20 AS builder
RUN mkdir -p /go/src/github.com/project-zot/zot
WORKDIR /go/src/github.com/project-zot/zot
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion examples/metrics/Dockerfile-zxp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Build binary, create default config file
# ---
FROM ghcr.io/project-zot/golang:1.19 AS builder
FROM ghcr.io/project-zot/golang:1.20 AS builder
RUN mkdir -p /go/src/github.com/project-zot/zot
WORKDIR /go/src/github.com/project-zot/zot
COPY . .
Expand Down
6 changes: 3 additions & 3 deletions examples/metrics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CONTAINER_RUNTIME := docker

.PHONY: binary-container
binary-container:
${CONTAINER_RUNTIME} build -f build/Dockerfile -t zot-build:latest ../../.
${CONTAINER_RUNTIME} build -f Dockerfile -t zot-build:latest ../../.

.PHONY: run-container
run-container:
Expand All @@ -11,7 +11,7 @@ run-container:

.PHONY: binary-minimal-container
binary-minimal-container:
${CONTAINER_RUNTIME} build -f build/Dockerfile-minimal -t zot-minimal:latest ../../.
${CONTAINER_RUNTIME} build -f Dockerfile-minimal -t zot-minimal:latest ../../.

.PHONY: run-minimal-container
run-minimal-container:
Expand All @@ -20,7 +20,7 @@ run-minimal-container:

.PHONY: binary-exporter-container
binary-exporter-container:
${CONTAINER_RUNTIME} build -f build/Dockerfile-zxp -t zxp:latest ../../.
${CONTAINER_RUNTIME} build -f Dockerfile-zxp -t zxp:latest ../../.

.PHONY: run-exporter-container
run-exporter-container:
Expand Down
4 changes: 2 additions & 2 deletions examples/metrics/kind_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set -e
CLUSTER_NAME=zot

# Script tested with below kubectl & kind versions
KUBECTL_VERSION=v1.17.5
KIND_VERSION=v0.7.0
KUBECTL_VERSION=v1.27.3
KIND_VERSION=v0.20.0

function install_bin() {
if [ "$EUID" -ne 0 ]
Expand Down
4 changes: 2 additions & 2 deletions examples/metrics/kubernetes/prometheus/prom_rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ServiceAccount
metadata:
name: prometheus
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
Expand All @@ -28,7 +28,7 @@ rules:
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
Expand Down

0 comments on commit 11b56d3

Please sign in to comment.