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
Copy file name to clipboardExpand all lines: resource-definitions/template-driver/serviceaccount/README.md
+34-4
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,42 @@ The [`workload` Resource Type](https://developer.humanitec.com/platform-orchestr
6
6
7
7
This `workload` Resource Definition adds the `serviceAccountName` item to the Pod spec and references a [`k8s-service-account` type Resource](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#k8s-service-account), causing it to be provisioned. The `k8s-service-account` Resource Definition generates the Kubernetes manifest for the actual ServiceAccount.
8
8
9
-
A Resource Graph for a Workload using those Resource Definitions will look like this:
9
+
The examples demonstrates two alternative approaches:
10
+
11
+
1. Providing a separate Kubernetes ServiceAccount for each Workload
12
+
13
+
This approach lets you fine tune the permissions obtained via the ServiceAccount for each Workload, but create more objects in the Resource Graph and on the cluster.
14
+
15
+
2. Providing a single Kubernetes ServiceAccount for all Workloads in the same Application Environment
16
+
17
+
This approach results in unified permissions for each Workload and less objects in the Resource Graph and on the cluster
18
+
19
+
For option 1, a Resource Graph for Workloads using those Resource Definitions will look like this:
Note that the resource `id` is used in the `k8s-service-account` Resource Definition to derive the name of the actual Kubernetes ServiceAccount. Check the code for details.
32
+
For option 2, a Resource Graph for Workloads using those Resource Definitions will look like this:
33
+
34
+
```mermaid
35
+
flowchart LR
36
+
workloadVirtual1[Workload "my-workload-1"<br/>defined via Score] -.-> workload1(id: modules.my-workload-1<br/>type: workload<br/>class: default)
0 commit comments