Skip to content

mTLS support for GitRepositories #1761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
benke33 opened this issue Mar 21, 2025 · 4 comments
Open

mTLS support for GitRepositories #1761

benke33 opened this issue Mar 21, 2025 · 4 comments

Comments

@benke33
Copy link

benke33 commented Mar 21, 2025

Hi,

The problem: Our git infrastructure is located behind a cloudflare firewall that requires mTLS certificates to be allowed in.

The solution: Add support for mTLS client certificate & client-key in the GitRepository custom resources.

Question: Is there any plan to add mTLS support in the future?

@stefanprodan
Copy link
Member

Is there any plan to add mTLS support in the future?

No plans to implement mTLS anytime soon. I suggest using OCIRepository instead of Git. We do support mTLS for container registries.

On git push to the Flux Git repository, you would run flux push artifact in CI to publish the repo content to the container registry where the cluster has access.

On the cluster you would deploy Flux Operator and configure a FluxInstance that syncs the desired state from the container registry. Example here: https://fluxcd.control-plane.io/operator/flux-sync/#sync-from-a-container-registry

@benke33
Copy link
Author

benke33 commented Mar 25, 2025

thanks for the reply, unfortunately I'm looking to use GitRepository.

Found this old PR that actually does what I want: #1302

Was that PR ever considered/discussed to be added?

@stefanprodan
Copy link
Member

stefanprodan commented Apr 11, 2025

After consulting with the go-git maintainers we've devised a plan for what's required to implement mTLS for Git operations in Flux.

@stefanprodan
Copy link
Member

mTLS support is being added to go-git in go-git/go-git#1510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants