Skip to content
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

feat: enable bootstrap with custom CA locally #1782

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

makkes
Copy link
Member

@makkes makkes commented Sep 1, 2021

When a user provided the --ca-file flag to the bootstrap command,
the given CA file wasn't taken into account for cloning the repository
locally. It was just passed along to the CR that is created so Flux
can make use of it when cloning the repository in-cluster.

However, users may not want to add a custom CA to their local host's
trust chain and may expect the --ca-file flag to be respected also
for cloning the repository locally. This is what this commit
accomplishes.

closes #1775

Signed-off-by: Max Jonas Werner mail@makk.es

When a user provided the `--ca-file` flag to the `bootstrap` command,
the given CA file wasn't taken into account for cloning the repository
locally. It was just passed along to the CR that is created so Flux
can make use of it when cloning the repository in-cluster.

However, users may not want to add a custom CA to their local host's
trust chain and may expect the `--ca-file` flag to be respected also
for cloning the repository locally. This is what this commit
accomplishes.

closes fluxcd#1775

Signed-off-by: Max Jonas Werner <mail@makk.es>
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nitpick about deprecation of io/ioutil, code logic wise everything seems to add up.

cmd/flux/bootstrap_git.go Outdated Show resolved Hide resolved
Signed-off-by: Max Jonas Werner <mail@makk.es>
@makkes makkes requested a review from hiddeco September 3, 2021 13:20
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @makkes 💯

@hiddeco hiddeco added area/bootstrap Bootstrap related issues and pull requests enhancement New feature or request labels Sep 3, 2021
@hiddeco hiddeco merged commit b427356 into fluxcd:main Sep 3, 2021
@makkes makkes deleted the bootstrap-with-custom-ca branch September 3, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bootstrap Bootstrap related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flux bootstrap git cannot clone repo with custom CA certificate
2 participants