From f00d07a471a5b8c222ee4e2105942725934e93d1 Mon Sep 17 00:00:00 2001 From: Robert Jacob Date: Wed, 27 Nov 2024 11:26:37 +0100 Subject: [PATCH] fix(operator): Fix RBAC permission for poddisruptionbudgets (#15107) --- .../manifests/loki-operator.clusterserviceversion.yaml | 4 ++-- .../manifests/loki-operator.clusterserviceversion.yaml | 4 ++-- .../manifests/loki-operator.clusterserviceversion.yaml | 4 ++-- operator/config/rbac/role.yaml | 2 +- operator/internal/controller/loki/lokistack_controller.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml index fc7c637b53b1d..3cf709858d43b 100644 --- a/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/community-openshift/manifests/loki-operator.clusterserviceversion.yaml @@ -150,7 +150,7 @@ metadata: categories: OpenShift Optional, Logging & Tracing certified: "false" containerImage: docker.io/grafana/loki-operator:0.7.1 - createdAt: "2024-11-08T17:18:30Z" + createdAt: "2024-11-25T18:28:02Z" description: The Community Loki Operator provides Kubernetes native deployment and management of Loki and related logging components. features.operators.openshift.io/disconnected: "true" @@ -1771,7 +1771,7 @@ spec: - update - watch - apiGroups: - - policy/v1 + - policy resources: - poddisruptionbudgets verbs: diff --git a/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml index e3b7c8b64ccf8..133aaf2a76854 100644 --- a/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/community/manifests/loki-operator.clusterserviceversion.yaml @@ -150,7 +150,7 @@ metadata: categories: OpenShift Optional, Logging & Tracing certified: "false" containerImage: docker.io/grafana/loki-operator:0.7.1 - createdAt: "2024-11-08T17:18:28Z" + createdAt: "2024-11-25T18:27:59Z" description: The Community Loki Operator provides Kubernetes native deployment and management of Loki and related logging components. operators.operatorframework.io/builder: operator-sdk-unknown @@ -1751,7 +1751,7 @@ spec: - update - watch - apiGroups: - - policy/v1 + - policy resources: - poddisruptionbudgets verbs: diff --git a/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml index 0c4f9624b3769..c988ae3dc2db2 100644 --- a/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml @@ -150,7 +150,7 @@ metadata: categories: OpenShift Optional, Logging & Tracing certified: "false" containerImage: quay.io/openshift-logging/loki-operator:0.1.0 - createdAt: "2024-11-08T17:18:32Z" + createdAt: "2024-11-25T18:28:06Z" description: | The Loki Operator for OCP provides a means for configuring and managing a Loki stack for cluster logging. ## Prerequisites and Requirements @@ -1756,7 +1756,7 @@ spec: - update - watch - apiGroups: - - policy/v1 + - policy resources: - poddisruptionbudgets verbs: diff --git a/operator/config/rbac/role.yaml b/operator/config/rbac/role.yaml index 136cf2e250ceb..59ca248171aee 100644 --- a/operator/config/rbac/role.yaml +++ b/operator/config/rbac/role.yaml @@ -146,7 +146,7 @@ rules: - update - watch - apiGroups: - - policy/v1 + - policy resources: - poddisruptionbudgets verbs: diff --git a/operator/internal/controller/loki/lokistack_controller.go b/operator/internal/controller/loki/lokistack_controller.go index a9ccfba019e5a..5c7c376d3bd06 100644 --- a/operator/internal/controller/loki/lokistack_controller.go +++ b/operator/internal/controller/loki/lokistack_controller.go @@ -125,7 +125,7 @@ type LokiStackReconciler struct { // +kubebuilder:rbac:urls=/api/v2/alerts,verbs=create // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;create;update // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update -// +kubebuilder:rbac:groups=policy/v1,resources=poddisruptionbudgets,verbs=get;list;watch;create;update +// +kubebuilder:rbac:groups=policy,resources=poddisruptionbudgets,verbs=get;list;watch;create;update // +kubebuilder:rbac:groups=config.openshift.io,resources=dnses;apiservers;proxies,verbs=get;list;watch // +kubebuilder:rbac:groups=route.openshift.io,resources=routes,verbs=get;list;watch;create;update;delete // +kubebuilder:rbac:groups=cloudcredential.openshift.io,resources=credentialsrequests,verbs=get;list;watch;create;update;delete