From 4875b0ff0efce397296fb2ffdfbb9fa9705e8fe9 Mon Sep 17 00:00:00 2001 From: Francisc Munteanu Date: Tue, 5 Mar 2024 18:08:04 +0100 Subject: [PATCH] Create templates with host ToolchainCluster-related manifests (#974) * add toolchaincluster SA templates --------- Co-authored-by: Matous Jobanek --- deploy/resources.go | 3 ++ .../templates/toolchaincluster/host-sa.yaml | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 deploy/templates/toolchaincluster/host-sa.yaml diff --git a/deploy/resources.go b/deploy/resources.go index 8c192874b..2923d8043 100644 --- a/deploy/resources.go +++ b/deploy/resources.go @@ -4,3 +4,6 @@ import "embed" //go:embed templates/notificationtemplates/* var NotificationTemplateFS embed.FS + +//go:embed templates/toolchaincluster/* +var ToolchainClusterTemplateFS embed.FS diff --git a/deploy/templates/toolchaincluster/host-sa.yaml b/deploy/templates/toolchaincluster/host-sa.yaml new file mode 100644 index 000000000..70dc0c132 --- /dev/null +++ b/deploy/templates/toolchaincluster/host-sa.yaml @@ -0,0 +1,32 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: toolchaincluster-host + namespace: {{.Namespace}} +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: toolchaincluster-host + namespace: {{.Namespace}} +rules: +- apiGroups: + - toolchain.dev.openshift.com + resources: + - "*" + verbs: + - "*" +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: toolchaincluster-host + namespace: {{.Namespace}} +subjects: +- kind: ServiceAccount + name: toolchaincluster-host +roleRef: + kind: Role + name: toolchaincluster-host + apiGroup: rbac.authorization.k8s.io