Skip to content

Commit a3ecf2a

Browse files
authored
Merge pull request #187620 from csand-msft/master
Add more information on authentication with local secret
2 parents beb5f39 + b8bd387 commit a3ecf2a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

articles/azure-arc/kubernetes/tutorial-use-gitops-flux2.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -807,20 +807,20 @@ If you use a `bucket` source instead of a `git` source, here are the bucket-spec
807807
| `--bucket-insecure` | Boolean | Communicate with a `bucket` without TLS. If not provided, assumed false; if provided, assumed true. |
808808

809809
### Local secret for authentication with source
810-
You can use a local Kubernetes secret for authentication with the `git` or `bucket` source.
810+
You can use a local Kubernetes secret for authentication with a `git` or `bucket` source. The local secret must contain all of the authentication parameters needed for the source and must be created in the same namespace as the Flux configuration.
811811

812812
| Parameter | Format | Notes |
813813
| ------------- | ------------- | ------------- |
814814
| `--local-auth-ref` `--local-ref` | String | Local reference to a Kubernetes secret in the Flux configuration namespace to use for authentication with the source. |
815815

816-
For HTTPS authentication, you create a secret (in the same namespace where the Flux configuration will be) with the username and password/key:
816+
For HTTPS authentication, you create a secret with the `username` and `password`:
817817

818818
```console
819819
kubectl create ns flux-config
820820
kubectl create secret generic -n flux-config my-custom-secret --from-literal=username=<my-username> --from-literal=password=<my-password-or-key>
821821
```
822822

823-
For SSH authentication, you create a secret (in the same namespace where the Flux configuration will be) with both the `identity` and `known_hosts` fields:
823+
For SSH authentication, you create a secret with the `identity` and `known_hosts` fields:
824824

825825
```console
826826
kubectl create ns flux-config
@@ -832,6 +832,11 @@ For both cases, when you create the Flux configuration, use `--local-auth-ref my
832832
```console
833833
az k8s-configuration flux create -g <cluster_resource_group> -c <cluster_name> -n <config_name> -t connectedClusters --scope cluster --namespace flux-config -u <git-repo-url> --kustomization name=kustomization1 --local-auth-ref my-custom-secret
834834
```
835+
Learn more about using a local Kubernetes secret with these authentication methods:
836+
* [Git repository HTTPS authentication](https://fluxcd.io/docs/components/source/gitrepositories/#https-authentication)
837+
* [Git repository HTTPS self-signed certificates](https://fluxcd.io/docs/components/source/gitrepositories/#https-self-signed-certificates)
838+
* [Git repository SSH authentication](https://fluxcd.io/docs/components/source/gitrepositories/#ssh-authentication)
839+
* [Bucket static authentication](https://fluxcd.io/docs/components/source/buckets/#static-authentication)
835840

836841
>[!NOTE]
837842
>If you need Flux to access the source through your proxy, you'll need to update the Azure Arc agents with the proxy settings. For more information, see [Connect using an outbound proxy server](./quickstart-connect-cluster.md?tabs=azure-cli#4a-connect-using-an-outbound-proxy-server).

0 commit comments

Comments
 (0)