From 2b4381c267dcc8223cabc39108b1755a76e6730b Mon Sep 17 00:00:00 2001 From: Fiona Waters Date: Thu, 15 Jun 2023 12:19:29 +0100 Subject: [PATCH 1/4] updating rbacs for instascale --- config/internal/instascale/clusterrole.yaml.tmpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/internal/instascale/clusterrole.yaml.tmpl b/config/internal/instascale/clusterrole.yaml.tmpl index 13eb1461..2fe66ef4 100644 --- a/config/internal/instascale/clusterrole.yaml.tmpl +++ b/config/internal/instascale/clusterrole.yaml.tmpl @@ -21,6 +21,13 @@ rules: - delete - patch +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - apiGroups: - apps resources: From 60bc22ead5c229f75478450dddae9476dcf9693e Mon Sep 17 00:00:00 2001 From: Fiona Waters Date: Thu, 15 Jun 2023 14:15:48 +0100 Subject: [PATCH 2/4] addressing feedback, specifying required secret --- config/internal/instascale/clusterrole.yaml.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/internal/instascale/clusterrole.yaml.tmpl b/config/internal/instascale/clusterrole.yaml.tmpl index 2fe66ef4..333fbf24 100644 --- a/config/internal/instascale/clusterrole.yaml.tmpl +++ b/config/internal/instascale/clusterrole.yaml.tmpl @@ -23,6 +23,8 @@ rules: - apiGroups: - "" + resourceNames: + - instascale-ocm-secret resources: - secrets verbs: From 8a721b347525fc8621f5b56a81227a8aa7490a9f Mon Sep 17 00:00:00 2001 From: Fiona Waters Date: Mon, 19 Jun 2023 15:41:13 +0100 Subject: [PATCH 3/4] adding clusterversions --- config/internal/instascale/clusterrole.yaml.tmpl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/config/internal/instascale/clusterrole.yaml.tmpl b/config/internal/instascale/clusterrole.yaml.tmpl index 333fbf24..8f27f57f 100644 --- a/config/internal/instascale/clusterrole.yaml.tmpl +++ b/config/internal/instascale/clusterrole.yaml.tmpl @@ -24,11 +24,19 @@ rules: - apiGroups: - "" resourceNames: - - instascale-ocm-secret + - instascale-ocm-secret resources: - - secrets + - secrets verbs: - - get + - get + +- apiGroups: + - config.openshift.io + resources: + - clusterversions + verbs: + - get + - list - apiGroups: - apps From 366af24319bbd1d03dd4d775fd4f75c6bb0cfa27 Mon Sep 17 00:00:00 2001 From: Fiona Waters Date: Mon, 19 Jun 2023 15:55:09 +0100 Subject: [PATCH 4/4] updating test data --- .../case_1/clusterrole.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/controllers/testdata/instascale_test_results/case_1/clusterrole.yaml b/controllers/testdata/instascale_test_results/case_1/clusterrole.yaml index 11a22d45..c4053cdb 100644 --- a/controllers/testdata/instascale_test_results/case_1/clusterrole.yaml +++ b/controllers/testdata/instascale_test_results/case_1/clusterrole.yaml @@ -16,6 +16,24 @@ rules: resources: - nodes - configmaps + + - verbs: + - get + apiGroups: + - '' + resourceNames: + - instascale-ocm-secret + resources: + - secrets + + - verbs: + - get + - list + apiGroups: + - config.openshift.io + resources: + - clusterversions + - verbs: - list - watch