@@ -212,6 +212,91 @@ For password-protected SSH private keys, the password must be provided
212212via an additional `password` field in the secret. Flux CLI also supports
213213this via the `--password` flag.
214214
215+ # ## Provider
216+
217+ ` .spec.provider` is an optional field that allows specifying an OIDC provider
218+ used for authentication purposes.
219+
220+ Supported options are :
221+
222+ - ` generic`
223+ - ` azure`
224+
225+ When provider is not specified, it defaults to `generic` indicating that
226+ mechanisms using `spec.secretRef` are used for authentication.
227+
228+ # ### Azure
229+
230+ The `azure` provider can be used to authenticate to Azure DevOps repositories
231+ automatically using Workload Identity.
232+
233+ # #### Pre-requisites
234+
235+ - Ensure that your Azure DevOps Organization is
236+ [connected](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/connect-organization-to-azure-ad?view=azure-devops)
237+ to Microsoft Entra.
238+ - Ensure Workload Identity is properly [set up on your
239+ cluster](https://learn.microsoft.com/en-us/azure/aks/workload-identity-deploy-cluster#create-an-aks-cluster).
240+
241+ # #### Configure Flux controller
242+
243+ - Create a managed identity to access Azure DevOps. Establish a federated
244+ identity credential between the managed identity and the source-controller
245+ service account. In the default installation, the source-controller service
246+ account is located in the `flux-system` namespace with name
247+ ` source-controller` . Ensure the federated credential uses the correct
248+ namespace and name of the source-controller service account. For more details,
249+ please refer to this
250+ [guide](https://azure.github.io/azure-workload-identity/docs/quick-start.html#6-establish-federated-identity-credential-between-the-identity-and-the-service-account-issuer--subject).
251+
252+ - Add the managed identity to the Azure DevOps organization as a user. Ensure
253+ that the managed identity has the necessary permissions to access the Azure
254+ DevOps repository as described
255+ [here](https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/service-principal-managed-identity?view=azure-devops#2-add-and-manage-service-principals-in-an-azure-devops-organization).
256+
257+ - Add the following patch to your bootstrap repository in
258+ `flux-system/kustomization.yaml` file :
259+
260+
261+ ` ` ` yaml
262+ apiVersion: kustomize.config.k8s.io/v1beta1
263+ kind: Kustomization
264+ resources:
265+ - gotk-components.yaml
266+ - gotk-sync.yaml
267+ patches:
268+ - patch: |-
269+ apiVersion: v1
270+ kind: ServiceAccount
271+ metadata:
272+ name: source-controller
273+ namespace: flux-system
274+ annotations:
275+ azure.workload.identity/client-id: <AZURE_CLIENT_ID>
276+ labels:
277+ azure.workload.identity/use: "true"
278+ - patch: |-
279+ apiVersion: apps/v1
280+ kind: Deployment
281+ metadata:
282+ name: source-controller
283+ namespace: flux-system
284+ labels:
285+ azure.workload.identity/use: "true"
286+ spec:
287+ template:
288+ metadata:
289+ labels:
290+ azure.workload.identity/use: "true"
291+ ` ` `
292+
293+ **Note:** When azure `provider` is used with `GitRepository`, the `.spec.url`
294+ must follow this format :
295+
296+ ` ` `
297+ https://dev.azure.com/{your-organization}/{your-project}/_git/{your-repository}
298+ ` ` `
299+
215300# ## Interval
216301
217302` .spec.interval` is a required field that specifies the interval at which the
0 commit comments