@@ -57,13 +57,49 @@ delete the `flux-system` secret from the cluster and create a new one with the n
57
57
flux create secret git flux-system \
58
58
--url=https://dev.azure.com/< org> /< project> /_git/< repository> \
59
59
--username=git \
60
- --password=$AZURE_DEVOPS_PAT
60
+ --password=< az-token >
61
61
```
62
62
{{% /alert %}}
63
63
64
64
## Bootstrap using SSH keys
65
65
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
67
103
Azure DevOps, you'll need to use ` ssh-keygen ` with the ` rsa-sha2-512 ` algorithm:
68
104
69
105
``` sh
0 commit comments