You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Creating a service account to manage cluster extensions
9
+
10
+
Unlike {olmv0-first}, {olmv1} does not have permissions to install, update, and manage cluster extensions. Cluster administrators must create a service account and assign the role-based access controls (RBAC) required to install, update, and manage cluster extensions.
* Access to an {product-title} cluster using an account with `cluster-admin` permissions.
20
+
21
+
.Procedure
22
+
23
+
. Create a service account, similar to the following example:
24
+
+
25
+
[source,yaml]
26
+
----
27
+
apiVersion: v1
28
+
kind: ServiceAccount
29
+
metadata:
30
+
name: <extension>-installer
31
+
namespace: <namespace>
32
+
----
33
+
+
34
+
.Example `extension-service-account.yaml` file
35
+
[%collapsible]
36
+
====
37
+
[source,yaml]
38
+
----
39
+
apiVersion: v1
40
+
kind: ServiceAccount
41
+
metadata:
42
+
name: pipelines-installer
43
+
namespace: pipelines
44
+
----
45
+
====
46
+
47
+
. Apply the service account by running the following command:
48
+
+
49
+
[source,terminal]
50
+
----
51
+
$ oc apply -f extension-service-account.yaml
52
+
----
53
+
. Create a cluster role and assign RBAC, similar to the following example:
54
+
+
55
+
[WARNING]
56
+
====
57
+
The following cluster role does not follow the principle of least privilege. This cluster role is intended for testing purposes only. Do not use it on production clusters.
58
+
====
59
+
+
60
+
[source,yaml]
61
+
----
62
+
apiVersion: rbac.authorization.k8s.io/v1
63
+
kind: ClusterRole
64
+
metadata:
65
+
name: <extension>-installer-clusterrole
66
+
rules:
67
+
- apiGroups: ["*"]
68
+
resources: ["*"]
69
+
verbs: ["*"]
70
+
----
71
+
+
72
+
.Example `pipelines-cluster-role.yaml` file
73
+
[%collapsible]
74
+
====
75
+
[source,yaml]
76
+
----
77
+
apiVersion: rbac.authorization.k8s.io/v1
78
+
kind: ClusterRole
79
+
metadata:
80
+
name: pipelines-installer-clusterrole
81
+
rules:
82
+
- apiGroups: ["*"]
83
+
resources: ["*"]
84
+
verbs: ["*"]
85
+
----
86
+
====
87
+
88
+
. Add the cluster role to the cluster by running the following command:
89
+
+
90
+
[source,terminal]
91
+
----
92
+
$ oc apply -f pipelines-role.yaml
93
+
----
94
+
95
+
. Bind the permissions granted by the cluster role to the service account by creating a cluster role binding, similar to the following example:
* You have downloaded a local copy of the catalog file.
22
22
* You have installed the `jq` CLI tool.
23
+
* You have created a service account and assigned enough role-based access controls (RBAC) to install, update, and manage the extension you want to install. For more information, see _Creating a service account_.
23
24
24
25
.Procedure
25
26
@@ -120,13 +121,16 @@ metadata:
120
121
spec:
121
122
packageName: openshift-pipelines-operator-rh
122
123
installNamespace: <namespace>
124
+
serviceAccount:
125
+
name: <service_account>
123
126
channel: <channel>
124
127
version: "<version>"
125
128
----
126
129
+
127
130
where:
128
131
+
129
-
`<namespace>`:: Specifies the namespace where you want the bundle installed, such as `openshift-operators` or `my-extension`. Extensions are still cluster-scoped and might contain resources that are installed in different namespaces.
132
+
`<namespace>`:: Specifies the namespace where you want the bundle installed, such as `pipelines` or `my-extension`. Extensions are still cluster-scoped and might contain resources that are installed in different namespaces.
133
+
`<service_account>`:: Specifies the name of the service account you created to install, update, and manage your extension.
130
134
`<channel>`:: Optional: Specifies the channel, such as `pipelines-1.11` or `latest`, for the package you want to install or update.
131
135
`<version>`:: Optional: Specifies the version or version range, such as `1.11.1`, `1.12.x`, or `>=1.12.1`, of the package you want to install or update. For more information, see "Example custom resources (CRs) that specify a target version" and "Support for version ranges".
There is a known issue in {olmv1}. If you do not assign the correct role-based access controls (RBAC) to an extension's service account, {olmv1} gets stuck and reconciliation stops.
9
+
10
+
Currently, {olmv1} does not have tools to help extension administrators find the correct RBAC for a service account.
11
+
12
+
Because {olmv1} is a Technology Preview feature and must not be used on production clusters, you can avoid this issue by using the more permissive RBAC included in the documentation.
13
+
14
+
This RBAC is intended for testing purposes only. Do not use it on production clusters.
0 commit comments