From 4aa241465f3c24eae9fb3eeca032cb348c35163d Mon Sep 17 00:00:00 2001 From: Kevin Hicks <47251987+khicks720@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:41:05 -0600 Subject: [PATCH] ASTRACTL-34182:update cluster role so asup can get CRDs (#1725) * ASTRACTL-34182:update cluster role so asup can get CRDs * ASTRACTL-34182:update role in yaml factory too for cli --- cli/k8s_client/yaml_factory.go | 3 +++ helm/trident-operator/templates/clusterrole.yaml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/cli/k8s_client/yaml_factory.go b/cli/k8s_client/yaml_factory.go index a3eda9808..546e39e5f 100644 --- a/cli/k8s_client/yaml_factory.go +++ b/cli/k8s_client/yaml_factory.go @@ -175,6 +175,9 @@ rules: verbs: ["use"] resourceNames: - {CLUSTER_ROLE_NAME} + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["get"] ` func GetRoleYAML(namespace, roleName string, labels, controllingCRDetails map[string]string) string { diff --git a/helm/trident-operator/templates/clusterrole.yaml b/helm/trident-operator/templates/clusterrole.yaml index 6d8bbaea8..c554956a7 100644 --- a/helm/trident-operator/templates/clusterrole.yaml +++ b/helm/trident-operator/templates/clusterrole.yaml @@ -408,3 +408,9 @@ rules: - use resourceNames: - tridentoperatorpods + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get