From 238b8f3d03bf10b8e5594acb604b84a3e9efb33c Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Tue, 20 Aug 2024 10:26:59 +0200 Subject: [PATCH] pra: Add metrics federation Issue: ZENKO-4766 --- .../scripts/end2end/configs/prometheus.yaml | 48 +++++++++++++++++++ .../end2end/install-kind-dependencies.sh | 13 ++++- .github/scripts/end2end/run-e2e-ctst.sh | 1 + .github/workflows/end2end.yaml | 1 + tests/ctst/steps/dr/drctl.ts | 8 ++++ tests/ctst/steps/pra.ts | 4 ++ tests/ctst/world/Zenko.ts | 1 + 7 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 .github/scripts/end2end/configs/prometheus.yaml diff --git a/.github/scripts/end2end/configs/prometheus.yaml b/.github/scripts/end2end/configs/prometheus.yaml new file mode 100644 index 0000000000..e885d6325b --- /dev/null +++ b/.github/scripts/end2end/configs/prometheus.yaml @@ -0,0 +1,48 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: ${PROMETHEUS_NAME} +rules: +- apiGroups: + - "" + resources: + - pods + - services + - endpoints + verbs: + - '*' +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: ${PROMETHEUS_NAME} +subjects: +- kind: ServiceAccount + name: default + namespace: default +roleRef: + kind: Role + name: ${PROMETHEUS_NAME} + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: monitoring.coreos.com/v1 +kind: Prometheus +metadata: + name: ${PROMETHEUS_NAME} + labels: + prometheus: ${PROMETHEUS_NAME} +spec: + version: v2.35.0 + evaluationInterval: 30s + logFormat: logfmt + logLevel: info + podMonitorNamespaceSelector: {} + podMonitorSelector: + matchLabels: + metalk8s.scality.com/monitor: "" + probeSelector: + matchLabels: + metalk8s.scality.com/monitor: "" + ruleSelector: + matchLabels: + metalk8s.scality.com/monitor: "" diff --git a/.github/scripts/end2end/install-kind-dependencies.sh b/.github/scripts/end2end/install-kind-dependencies.sh index 0f07f6e1f4..f76c1ef97d 100755 --- a/.github/scripts/end2end/install-kind-dependencies.sh +++ b/.github/scripts/end2end/install-kind-dependencies.sh @@ -57,13 +57,22 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/${IN kubectl rollout status -n ingress-nginx deployment/ingress-nginx-controller --timeout=10m # cert-manager -kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml +kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml --wait +# kubectl apply --validate=false -f - <