Skip to content

Commit 6a50a20

Browse files
Lorena CiutacuRoshni Sarangadharanstanhu
committed
Merge branch 'sh-document-azure-managed-identities' into 'main'
Document how to use Azure workload identities for the cache See merge request https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/5204 Merged-by: Lorena Ciutacu <[email protected]> Approved-by: Darren Eastman <[email protected]> Approved-by: Lorena Ciutacu <[email protected]> Reviewed-by: Lorena Ciutacu <[email protected]> Reviewed-by: Roshni Sarangadharan <[email protected]> Co-authored-by: Roshni Sarangadharan <[email protected]> Co-authored-by: Stan Hu <[email protected]>
2 parents 436e2ae + 364ad18 commit 6a50a20

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/configuration/advanced-configuration.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,34 @@ role assigned to it. If the instance does not have access
13631363
to perform the actions above, GitLab Runner reports an
13641364
`AuthorizationPermissionMismatch` error.
13651365

1366+
To use Azure workload identities, add the `service_account` associated
1367+
with the identity and the pod label `azure.workload.identity/use` in the
1368+
`runner.kubernetes` section. For example, if `service_account` is
1369+
`gitlab-runner`:
1370+
1371+
```toml
1372+
[runners.kubernetes]
1373+
service_account = "gitlab-runner"
1374+
[runners.kubernetes.pod_labels]
1375+
"azure.workload.identity/use" = "true"
1376+
```
1377+
1378+
To configure the runner pod specification with the GitLab Runner Helm
1379+
chart, add the same service account and pod label:
1380+
1381+
```yaml
1382+
serviceAccount:
1383+
name: "gitlab-runner"
1384+
podLabels:
1385+
azure.workload.identity/use: "true"
1386+
```
1387+
1388+
The label is needed because the credentials are retrieved from different sources.
1389+
For cache downloads, the credentials are retrieved from the runner manager.
1390+
For cache uploads, credentials are retrieved from the pod that runs the [helper image](#helper-image).
1391+
1392+
For more details, see [issue 38330](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/38330).
1393+
13661394
## The `[runners.kubernetes]` section
13671395

13681396
> - Introduced in GitLab Runner v1.6.0.

0 commit comments

Comments
 (0)