Update gitrepo-add.md
Added in an example yaml config when using a private git repo. This would eliminate confusion as in https://github.com/rancher/fleet/issues/2495
This commit is contained in:
parent
835e961612
commit
c248df4f33
|
|
@ -40,6 +40,25 @@ Put your private key into secret, use the namespace the GitRepo is in:
|
|||
kubectl create secret generic ssh-key -n fleet-default --from-file=ssh-privatekey=/file/to/private/key --type=kubernetes.io/ssh-auth
|
||||
```
|
||||
|
||||
Now the `clientSecretName` must be specified in the repo definition:
|
||||
|
||||
```text
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
kind: GitRepo
|
||||
metadata:
|
||||
name: sample-ssh
|
||||
# This namespace is special and auto-wired to deploy to the local cluster
|
||||
namespace: fleet-local
|
||||
spec:
|
||||
# Everything from this repo will be run in this cluster. You trust me right?
|
||||
repo: "git@github.com:rancher/fleet-examples"
|
||||
# or
|
||||
# repo: "ssh://git@github.com/rancher/fleet-examples"
|
||||
clientSecretName: ssh-key
|
||||
paths:
|
||||
- simple
|
||||
```
|
||||
|
||||
:::caution
|
||||
|
||||
Private key with passphrase is not supported.
|
||||
|
|
|
|||
Loading…
Reference in New Issue