From 8e0cf5f2641808aa9c192b26781155411653c591 Mon Sep 17 00:00:00 2001 From: samidbb <40062553+samidbb@users.noreply.github.com> Date: Mon, 16 Jan 2023 16:15:47 +0100 Subject: [PATCH] update aws role template with servicemonitors rule --- .../Repositories/Kubernetes/RoleRepository.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/K8sJanitor.WebApi/Repositories/Kubernetes/RoleRepository.cs b/src/K8sJanitor.WebApi/Repositories/Kubernetes/RoleRepository.cs index 03296eb..da75e07 100644 --- a/src/K8sJanitor.WebApi/Repositories/Kubernetes/RoleRepository.cs +++ b/src/K8sJanitor.WebApi/Repositories/Kubernetes/RoleRepository.cs @@ -212,6 +212,21 @@ public async Task CreateNamespaceFullAccessRole(string namespaceName) "*" } }, + new V1PolicyRule + { + ApiGroups = new List + { + "monitoring.coreos.com", + }, + Resources = new List + { + "servicemonitors" + }, + Verbs = new List + { + "*" + } + }, } }; try