From 6486ce370236639477c96d2f0cc4891ff9d123c9 Mon Sep 17 00:00:00 2001
From: eromanova <eromanova@mirantis.com>
Date: Mon, 17 Jun 2024 19:59:39 +0400
Subject: [PATCH] Fix apiVersion duplication in RBAC

---
 config/rbac/awsprovider_editor_role.yaml             | 4 ++--
 config/rbac/awsprovider_viewer_role.yaml             | 4 ++--
 config/rbac/deployment_editor_role.yaml              | 4 ++--
 config/rbac/deployment_viewer_role.yaml              | 4 ++--
 config/rbac/management_editor_role.yaml              | 4 ++--
 config/rbac/management_viewer_role.yaml              | 4 ++--
 config/rbac/template_editor_role.yaml                | 4 ++--
 config/rbac/template_viewer_role.yaml                | 4 ++--
 templates/hmc/templates/awsprovider-editor-rbac.yaml | 4 ++--
 templates/hmc/templates/awsprovider-viewer-rbac.yaml | 4 ++--
 templates/hmc/templates/deployment-editor-rbac.yaml  | 4 ++--
 templates/hmc/templates/deployment-viewer-rbac.yaml  | 4 ++--
 templates/hmc/templates/management-editor-rbac.yaml  | 4 ++--
 templates/hmc/templates/management-viewer-rbac.yaml  | 4 ++--
 templates/hmc/templates/template-editor-rbac.yaml    | 4 ++--
 templates/hmc/templates/template-viewer-rbac.yaml    | 4 ++--
 16 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/config/rbac/awsprovider_editor_role.yaml b/config/rbac/awsprovider_editor_role.yaml
index d952a3f21..445732837 100644
--- a/config/rbac/awsprovider_editor_role.yaml
+++ b/config/rbac/awsprovider_editor_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: awsprovider-editor-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders
   verbs:
@@ -20,7 +20,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders/status
   verbs:
diff --git a/config/rbac/awsprovider_viewer_role.yaml b/config/rbac/awsprovider_viewer_role.yaml
index 89eb7f7ba..6ac793eb3 100644
--- a/config/rbac/awsprovider_viewer_role.yaml
+++ b/config/rbac/awsprovider_viewer_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: awsprovider-viewer-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders
   verbs:
@@ -16,7 +16,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders/status
   verbs:
diff --git a/config/rbac/deployment_editor_role.yaml b/config/rbac/deployment_editor_role.yaml
index 2d144e4ee..63b45cf4d 100644
--- a/config/rbac/deployment_editor_role.yaml
+++ b/config/rbac/deployment_editor_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: deployment-editor-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments
   verbs:
@@ -20,7 +20,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments/status
   verbs:
diff --git a/config/rbac/deployment_viewer_role.yaml b/config/rbac/deployment_viewer_role.yaml
index 288f1bdc1..73bde70b3 100644
--- a/config/rbac/deployment_viewer_role.yaml
+++ b/config/rbac/deployment_viewer_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: deployment-viewer-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments
   verbs:
@@ -16,7 +16,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments/status
   verbs:
diff --git a/config/rbac/management_editor_role.yaml b/config/rbac/management_editor_role.yaml
index 7ead123ab..90d81ee03 100644
--- a/config/rbac/management_editor_role.yaml
+++ b/config/rbac/management_editor_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: management-editor-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements
   verbs:
@@ -20,7 +20,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements/status
   verbs:
diff --git a/config/rbac/management_viewer_role.yaml b/config/rbac/management_viewer_role.yaml
index fcf9a131c..044531ef2 100644
--- a/config/rbac/management_viewer_role.yaml
+++ b/config/rbac/management_viewer_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: management-viewer-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements
   verbs:
@@ -16,7 +16,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements/status
   verbs:
diff --git a/config/rbac/template_editor_role.yaml b/config/rbac/template_editor_role.yaml
index 9d5fef4fe..197896482 100644
--- a/config/rbac/template_editor_role.yaml
+++ b/config/rbac/template_editor_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: template-editor-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates
   verbs:
@@ -20,7 +20,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates/status
   verbs:
diff --git a/config/rbac/template_viewer_role.yaml b/config/rbac/template_viewer_role.yaml
index 627bd2a80..1c78288e6 100644
--- a/config/rbac/template_viewer_role.yaml
+++ b/config/rbac/template_viewer_role.yaml
@@ -8,7 +8,7 @@ metadata:
   name: template-viewer-role
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates
   verbs:
@@ -16,7 +16,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates/status
   verbs:
diff --git a/templates/hmc/templates/awsprovider-editor-rbac.yaml b/templates/hmc/templates/awsprovider-editor-rbac.yaml
index 426bc30ec..4e44ac1df 100644
--- a/templates/hmc/templates/awsprovider-editor-rbac.yaml
+++ b/templates/hmc/templates/awsprovider-editor-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders
   verbs:
@@ -18,7 +18,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders/status
   verbs:
diff --git a/templates/hmc/templates/awsprovider-viewer-rbac.yaml b/templates/hmc/templates/awsprovider-viewer-rbac.yaml
index 5c71a39fd..9c80267bc 100644
--- a/templates/hmc/templates/awsprovider-viewer-rbac.yaml
+++ b/templates/hmc/templates/awsprovider-viewer-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders
   verbs:
@@ -14,7 +14,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - awsproviders/status
   verbs:
diff --git a/templates/hmc/templates/deployment-editor-rbac.yaml b/templates/hmc/templates/deployment-editor-rbac.yaml
index 88b8919e7..ac9b60b2a 100644
--- a/templates/hmc/templates/deployment-editor-rbac.yaml
+++ b/templates/hmc/templates/deployment-editor-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments
   verbs:
@@ -18,7 +18,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments/status
   verbs:
diff --git a/templates/hmc/templates/deployment-viewer-rbac.yaml b/templates/hmc/templates/deployment-viewer-rbac.yaml
index 7af1a91b6..3c28a89cc 100644
--- a/templates/hmc/templates/deployment-viewer-rbac.yaml
+++ b/templates/hmc/templates/deployment-viewer-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments
   verbs:
@@ -14,7 +14,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - deployments/status
   verbs:
diff --git a/templates/hmc/templates/management-editor-rbac.yaml b/templates/hmc/templates/management-editor-rbac.yaml
index 243f40fd1..bd04c7da6 100644
--- a/templates/hmc/templates/management-editor-rbac.yaml
+++ b/templates/hmc/templates/management-editor-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements
   verbs:
@@ -18,7 +18,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements/status
   verbs:
diff --git a/templates/hmc/templates/management-viewer-rbac.yaml b/templates/hmc/templates/management-viewer-rbac.yaml
index 90c102bbb..9ea69d43a 100644
--- a/templates/hmc/templates/management-viewer-rbac.yaml
+++ b/templates/hmc/templates/management-viewer-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements
   verbs:
@@ -14,7 +14,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - managements/status
   verbs:
diff --git a/templates/hmc/templates/template-editor-rbac.yaml b/templates/hmc/templates/template-editor-rbac.yaml
index 398363f19..45065be28 100644
--- a/templates/hmc/templates/template-editor-rbac.yaml
+++ b/templates/hmc/templates/template-editor-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates
   verbs:
@@ -18,7 +18,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates/status
   verbs:
diff --git a/templates/hmc/templates/template-viewer-rbac.yaml b/templates/hmc/templates/template-viewer-rbac.yaml
index 127ca4b29..f609cd9a8 100644
--- a/templates/hmc/templates/template-viewer-rbac.yaml
+++ b/templates/hmc/templates/template-viewer-rbac.yaml
@@ -6,7 +6,7 @@ metadata:
   {{- include "hmc.labels" . | nindent 4 }}
 rules:
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates
   verbs:
@@ -14,7 +14,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - hmc.mirantis.com.hmc.mirantis.com
+  - hmc.mirantis.com
   resources:
   - templates/status
   verbs: