Skip to content

Commit 9e81e2f

Browse files
committed
Clean-up some typos and explanations
1 parent f957c93 commit 9e81e2f

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

content/modules/ROOT/examples/rbac/appproject.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: workshop
55
namespace: user%USERNUM%-argocd
66
spec:
7-
description: Team%USERNUM%'s' Project
7+
description: Team%USERNUM%'s Project
88
clusterResourceBlacklist:
99
- group: '*'
1010
kind: '*'

content/modules/ROOT/pages/02-argocd-rbac.adoc

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ spec:
162162
----
163163

164164
Note the `default` Project has no restrictions associated with it, Applications using this Project can deploy any resource, namespace or cluster
165-
that Argo CD itself has access to. However no permissions have been defined here either which means that unless we have permissions
165+
that Argo CD itself has access to. Also note that no permissions have been defined here either which means that unless we have permissions
166166
defined in the Global RBAC, which we already checked, we cannot deploy any Applications with the `default` project.
167167

168168
[NOTE]
@@ -175,7 +175,7 @@ Since we don't want to use the `default` Project, we will create a new Project t
175175
[.console-input]
176176
[source,sh,subs="attributes",role=execute]
177177
----
178-
sed "s/%USERNUM%/{usernum}/" ~/workshop/content/modules/ROOT/examples/rbac/appproject.yaml | sed "s/%USERNUM%\//{usernum}\//" | oc apply -n user{usernum}-argocd -f -
178+
sed "s/%USERNUM%/{usernum}/" ~/workshop/content/modules/ROOT/examples/rbac/appproject.yaml | oc apply -n user{usernum}-argocd -f -
179179
----
180180

181181
Now view the AppProject we just created:
@@ -197,7 +197,7 @@ spec:
197197
clusterResourceBlacklist: <1>
198198
- group: '*'
199199
kind: '*'
200-
description: Team2's' Project <2>
200+
description: Team{usernum}'s Project <2>
201201
destinations: <3>
202202
- namespace: {user}-dev
203203
server: https://kubernetes.default.svc
@@ -233,7 +233,7 @@ spec:
233233

234234
Review the items defined by the `workshop` AppProject:
235235

236-
<1> First all cluster scoped resources, i.e. resources that don't have a namespace such as ClusterRole. This prevents users from deploying cluster level resources
236+
<1> First deny all cluster scoped resources, i.e. resources that don't have a namespace such as ClusterRole. This prevents users from deploying cluster level resources like ClusterRole
237237
<2> We define a friendly description for the project
238238
<3> The destinations that Applications that belong to this AppProject are permitted to deploy resources. Specifically we permit the `{user}-dev`, `{user}-stage` and `{user}-prod` namespaces in the local cluster Kubernetes server `https://kubernetes.default.svc`. We could wildcard the namespaces with a single destination using `{user}-*`, however we do not want to have `{user}-argocd` as a valid destination.
239239
<4> Certain namespace scoped resources that are typically the purview of the platform team are blacklisted
@@ -257,30 +257,30 @@ Now let's focus on the RBAC defined in the `workshop` Project that we created:
257257
[source,bash,subs="attributes+,+macros"]
258258
----
259259
roles:
260-
- description: Team2 Admins
260+
- description: Team{usernum} Admins
261261
groups:
262262
- team{usernum} <1>
263263
name: admin <2>
264264
policies: <3>
265-
- p, proj:workshop:admin, applications, *, workshop/*, allow
266-
- p, proj:workshop:admin, exec, create, workshop/*, allow
265+
- p, proj:workshop:admin, applications, *, workshop/*, allow <4>
266+
- p, proj:workshop:admin, exec, create, workshop/*, allow <5>
267267
----
268268

269269
Here we are defining a single role:
270270

271271
<1> This role is linked to the group `team{usernum}` which your user is a member of.
272-
<2> The name of the role is `admin`, note that this role is scoped to this Project.
272+
<2> The name of the role is `admin`, note that this role is scoped specifically to this Project
273273
<3> The policies, i.e permissions, that are applied by this role.
274274

275275
Let's break down the first policy into it's constituent parts:
276276

277277
[.console-output]
278278
[source,bash,subs="attributes+,+macros"]
279279
----
280-
p , <1>
280+
p, <1>
281281
proj:workshop:admin, <2>
282282
applications, <3>
283-
* , <4>
283+
*, <4>
284284
workshop/*, <5>
285285
allow <6>
286286
----
@@ -299,7 +299,7 @@ are available.
299299
we have `workshop/*` which allows all Applications that belong to the `workshop` Project.
300300
<6> Finally whether we `allow` or `deny` the permission, in this case we `allow` to grant permissions.
301301

302-
The second policy line with the `exec` permission enables usage of the terminal in the Argo CD user interface.
302+
The second policy line with the `exec` permission enables usage of the terminal in the Argo CD user interface which we will see in the next module.
303303

304304
Now let's try to create Application again using the same steps as previously, it is the same Application yaml as previously
305305
but the project is changed from `default` to `workshop`
@@ -327,7 +327,7 @@ spec:
327327
selfHeal: true
328328
----
329329

330-
Wait for the Application to become Healthy and Synched as follows:
330+
Wait for the Application to become Healthy and Synced as follows:
331331

332332
image::argocd-bgd-app.png[]
333333

@@ -372,8 +372,8 @@ A few items to note about this global configuration:
372372
to be explicitly enabled.
373373
* Next we have the policy section where we define policies and assign them to groups.
374374
** Users in the `system:cluster-admins` group are assigned to the `role:admin` role, this group only applies to the `kube-admin` user.
375-
** The next line operates similarly but grants the `role:admin` role to any users in the cluster-admins group.
376-
* Finally scopes are set to include accounts, groups and email. Argo CD uses OIDC for authentication and this
375+
** The next line operates similarly but grants the `role:admin` role to any users in the `cluster-admins` group.
376+
* Finally scopes are set to include groups. Argo CD uses OIDC for authentication and this
377377
matches OIDC link:https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims[scopes, window="_blank"], scopes selected
378378
here can be used to match groups in the policy section.
379379

@@ -423,9 +423,7 @@ reviewed earlier. While `groups` is the most commonly set scope, having scopes l
423423
allows you to match roles to individual users. In a nutshell, when adding additional scopes, like `email`, these
424424
are treated as groups by Argo CD for matching purposes.
425425

426-
We can also define our own policies here, as we can see with the new `role:none` that was added, if we need to define
427-
fine-grained permissions. We will look at the more later when talking about Argo CD Projects and RBAC but first we
428-
need to understand what an Argo CD Project is and why it is needed.
426+
We can also define our own policies here, as we can see with the new `role:none` policy that was added as mentioned earlier.
429427

430428
Confirm that you can now see all Projects by going back to Settings > Projects:
431429

@@ -455,4 +453,4 @@ image::argocd-delete-app-dialog.png[]
455453
[NOTE]
456454
Foreground and Background delete will remove all of the resources associated with the Application, Non-cascading will
457455
leave the resources in place. Non-cascading can be useful when you need to temporarily remove an Application for some
458-
reason such as restructuring Applications.
456+
reason such as migrating or restructuring Applications.

0 commit comments

Comments
 (0)