Installation page does not discuss how to set-up a private gitlab repo with SSh key
Are you referring to https://fluxcd.io/docs/installation/#gitlab-and-gitlab-enterprise?
Have you seen https://fluxcd.io/docs/cmd/flux_bootstrap_gitlab/ as well? Maybe we should link to it from that section to cover additional use-cases..?
Hello Daniel,
Yes indeed i am referring to the section at : https://fluxcd.io/docs/installation/#gitlab-and-gitlab-enterprise.
I haven't seen the CLI reference page but this one doesn't hint me in the correct direction it seems.
I very naively ran
flux bootstrap gitlab --ssh-hostname=<gitlab-hostname> --hostname=<gitlab-hostname> --token-auth --owner=<owner group> --repository=flux --branch=master --path=clusters/dev-ocp4
Which created the following yaml manifest in the target repository:
# This manifest was generated by flux. DO NOT EDIT.
---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 1m0s
ref:
branch: master
secretRef:
name: flux-system
url: https://<gitlab-hostname>/<owner-group>/flux.git
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 10m0s
path: ./clusters/dev-ocp4
prune: true
sourceRef:
kind: GitRepository
name: flux-system
I also found this page https://fluxcd.io/docs/components/source/gitrepositories/#ssh-authentication. I edited the gitrepository object on OCP side to mention a "ssh url" and created the appropriate secrets , but as i am new to flux, I am not sure that this is the correct way to go (and flux is still not reconciliated with the repo anyway )