Skip to content

Commit 3bd92ae

Browse files
committed
Add --ssh-hostkey-algos patch to Azure DevOps docs
Signed-off-by: Stefan Prodan <[email protected]>
1 parent bdac760 commit 3bd92ae

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

content/en/flux/installation/bootstrap/azure-devops.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,49 @@ delete the `flux-system` secret from the cluster and create a new one with the n
5757
flux create secret git flux-system \
5858
--url=https://dev.azure.com/<org>/<project>/_git/<repository> \
5959
--username=git \
60-
--password=$AZURE_DEVOPS_PAT
60+
--password=<az-token>
6161
```
6262
{{% /alert %}}
6363

6464
## Bootstrap using SSH keys
6565

66-
Azure DevOps SSH works only with RSA SHA-2 keys. To generate an SSH key pair compatible with
66+
Azure DevOps SSH works only with RSA SHA-2 keys.
67+
68+
To configure Flux with RSA SHA-2 keys, you need to clone the DevOps locally, then
69+
create the file structure required by bootstrap with:
70+
71+
```sh
72+
mkdir -p clusters/my-cluster/flux-system
73+
touch clusters/my-cluster/flux-system/gotk-components.yaml \
74+
clusters/my-cluster/flux-system/gotk-sync.yaml \
75+
clusters/my-cluster/flux-system/kustomization.yaml
76+
```
77+
78+
Edit the `kustomization.yaml` file to include the following patches:
79+
80+
```yaml
81+
apiVersion: kustomize.config.k8s.io/v1beta1
82+
kind: Kustomization
83+
resources:
84+
- gotk-components.yaml
85+
- gotk-sync.yaml
86+
patches:
87+
- patch: |
88+
- op: add
89+
path: /spec/template/spec/containers/0/args/-
90+
value: --ssh-hostkey-algos=rsa-sha2-512,rsa-sha2-256
91+
target:
92+
kind: Deployment
93+
name: (source-controller|image-automation-controller)
94+
```
95+
96+
Commit and push the changes to upstream with:
97+
98+
```sh
99+
git add -A && git commit -m "init flux" && git push
100+
```
101+
102+
To generate an SSH key pair compatible with
67103
Azure DevOps, you'll need to use `ssh-keygen` with the `rsa-sha2-512` algorithm:
68104

69105
```sh

0 commit comments

Comments
 (0)