Skip to content

Commit 3e212d2

Browse files
committed
[RFC-0010] Link workload identity docs to complete guide
Signed-off-by: Matheus Pimenta <[email protected]>
1 parent 6275ee0 commit 3e212d2

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

docs/spec/v1beta2/imagerepositories.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,22 @@ reference.
168168

169169
### ServiceAccount name
170170

171-
`.spec.serviceAccountName` is an optional field to specify a name reference to a
172-
ServiceAccount in the same namespace as the ImageRepository, with an image pull
173-
secret attached to it. For detailed instructions about attaching an image pull
174-
secret to a ServiceAccount, see [Add image pull secret to service account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-image-pull-secret-to-service-account).
171+
`.spec.serviceAccountName` is an optional field to specify a Service Account
172+
in the same namespace as ImageRepository with purpose depending on the value of
173+
the `.spec.provider` field:
174+
175+
- When `.spec.provider` is set to `generic`, the controller will fetch the image
176+
pull secrets attached to the Service Account and use them for authentication.
177+
- When `.spec.provider` is set to `aws`, `azure`, or `gcp`, the Service Account
178+
will be used for Workload Identity authentication. In this case, the controller
179+
feature gate `ObjectLevelWorkloadIdentity` must be enabled, otherwise the
180+
controller will error out.
181+
182+
**Note:** that for a publicly accessible image repository, you don't need to
183+
provide a `secretRef` nor `serviceAccountName`.
184+
185+
For a complete guide on how to set up authentication for cloud providers,
186+
see the integration [docs](/flux/integrations/).
175187

176188
### Certificate secret reference
177189

@@ -368,8 +380,8 @@ container registry.
368380

369381
### Provider
370382

371-
`.spec.provider` is an optional field that allows specifying an OIDC provider
372-
used for authentication purposes.
383+
`.spec.provider` is an optional field that allows specifying an OIDC provider used for
384+
authentication purposes.
373385

374386
Supported options are:
375387

@@ -378,10 +390,13 @@ Supported options are:
378390
- `azure`
379391
- `gcp`
380392

381-
The `generic` provider can be used for public repositories or when static
382-
credentials are used for authentication, either with `.spec.secretRef` or
383-
`.spec.serviceAccount`. If `.spec.provider` is not specified, it defaults to
384-
`generic`.
393+
The `generic` provider can be used for public repositories or when
394+
static credentials are used for authentication, either with
395+
`spec.secretRef` or `spec.serviceAccountName`.
396+
If you do not specify `.spec.provider`, it defaults to `generic`.
397+
398+
For a complete guide on how to set up authentication for cloud providers,
399+
see the integration [docs](/flux/integrations/).
385400

386401
#### AWS
387402

0 commit comments

Comments
 (0)