From 11b56d3fbe0fdadaf6801a210249fee237825e0b Mon Sep 17 00:00:00 2001 From: Alexei Dodon Date: Fri, 6 Oct 2023 18:26:43 +0300 Subject: [PATCH] fix: quick metrics setup in kind with prometheus Signed-off-by: Alexei Dodon --- examples/metrics/Dockerfile | 2 +- examples/metrics/Dockerfile-minimal | 2 +- examples/metrics/Dockerfile-zxp | 2 +- examples/metrics/Makefile | 6 +++--- examples/metrics/kind_setup.sh | 4 ++-- examples/metrics/kubernetes/prometheus/prom_rbac.yaml | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/metrics/Dockerfile b/examples/metrics/Dockerfile index 1239a18c9d..84cf1bcf8d 100644 --- a/examples/metrics/Dockerfile +++ b/examples/metrics/Dockerfile @@ -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 . . diff --git a/examples/metrics/Dockerfile-minimal b/examples/metrics/Dockerfile-minimal index d05d560635..0d76b2ec25 100644 --- a/examples/metrics/Dockerfile-minimal +++ b/examples/metrics/Dockerfile-minimal @@ -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 . . diff --git a/examples/metrics/Dockerfile-zxp b/examples/metrics/Dockerfile-zxp index ebe35685c4..f3e2f5442a 100644 --- a/examples/metrics/Dockerfile-zxp +++ b/examples/metrics/Dockerfile-zxp @@ -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 . . diff --git a/examples/metrics/Makefile b/examples/metrics/Makefile index 2dbe13a9c4..952c6556f4 100644 --- a/examples/metrics/Makefile +++ b/examples/metrics/Makefile @@ -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: @@ -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: @@ -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: diff --git a/examples/metrics/kind_setup.sh b/examples/metrics/kind_setup.sh index c52219a687..69d80e9141 100755 --- a/examples/metrics/kind_setup.sh +++ b/examples/metrics/kind_setup.sh @@ -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 ] diff --git a/examples/metrics/kubernetes/prometheus/prom_rbac.yaml b/examples/metrics/kubernetes/prometheus/prom_rbac.yaml index c6bf0e8fb7..5b8fd88ec5 100644 --- a/examples/metrics/kubernetes/prometheus/prom_rbac.yaml +++ b/examples/metrics/kubernetes/prometheus/prom_rbac.yaml @@ -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 @@ -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