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

Implement --deploy-token-auth in GitLab bootstrapping #3654

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

timofurrer
Copy link
Contributor

This change set implements support for the --deploy-token-auth option in the flux bootstrap gitlab command.

That option will reconcile a GitLab Project Deploy Token to use for the authentication of the GitLab git repository.
A GitLab Project Deploy Token can be used the same way as a Personal Access Token which is already supported via --token-auth. The difference with the GitLab Project Deploy Token is that the token is managed (created, updated, deleted) by Flux and not provided by the user.

This change is transparent to the source-controller.

A prerequisite for this change is the
fluxcd/go-git-providers change here:

See related discussion here: #3595
GitLab Issue here: https://gitlab.com/gitlab-org/gitlab/-/issues/392605

@timofurrer timofurrer force-pushed the gitlab-deploy-token-auth branch 3 times, most recently from 6367bf7 to fc38fb8 Compare March 6, 2023 16:33
@timofurrer timofurrer force-pushed the gitlab-deploy-token-auth branch 2 times, most recently from a3d1173 to a955409 Compare March 14, 2023 16:26
@timofurrer timofurrer marked this pull request as ready for review March 14, 2023 16:26
@timofurrer
Copy link
Contributor Author

timofurrer commented Mar 14, 2023

@makkes I think that we can proceed here as well now that fluxcd/go-git-providers#191 has been merged and released. WDYT?

Copy link
Member

@makkes makkes left a comment

Choose a reason for hiding this comment

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

Looks good to me; ran it locally and works fine. Just 2 minor comments.

pkg/bootstrap/bootstrap_provider.go Outdated Show resolved Hide resolved
pkg/bootstrap/bootstrap_provider.go Outdated Show resolved Hide resolved
@timofurrer timofurrer force-pushed the gitlab-deploy-token-auth branch 4 times, most recently from cf1d768 to 3628c11 Compare March 20, 2023 13:07
@hiddeco hiddeco added the hold Issues and pull requests put on hold label Mar 20, 2023
@hiddeco
Copy link
Member

hiddeco commented Mar 20, 2023

This is on hold until we are done with the last cycle of bug fixes to the v0.41.x range, as it introduces new functionalities which would require a minor bump.

@makkes makkes added enhancement New feature or request area/bootstrap Bootstrap related issues and pull requests labels Mar 20, 2023
@timofurrer
Copy link
Contributor Author

@hiddeco where can I learn more about the timeline of this release, if there is any? When could I expect to have it in ?

@hiddeco
Copy link
Member

hiddeco commented Mar 20, 2023

@timofurrer I expected this to be sometime next week. We need to wrap up some other bigger changes like promoting the GitRepository API to v1, which will be part of this release as well.

@timofurrer
Copy link
Contributor Author

@hiddeco sounds great! Thanks for the info.

@hiddeco hiddeco removed the hold Issues and pull requests put on hold label Mar 21, 2023
This change set implements support for the `--deploy-token-auth` option
in the `flux bootstrap gitlab` command.

That option will reconcile a GitLab Project Deploy Token to use for the
authentication of the GitLab git repository.
A GitLab Project Deploy Token can be used the same way as a Personal
Access Token which is already supported via `--token-auth`.
The difference with the GitLab Project Deploy Token is that the token is
managed (created, updated, deleted) by Flux and not provided by the
user.

This change is transparent to the source-controller.

A prerequisite for this change is the
`fluxcd/go-git-providers` change here:

* fluxcd/go-git-providers#191

See related discussion here: fluxcd#3595
GitLab Issue here: https://gitlab.com/gitlab-org/gitlab/-/issues/392605

Signed-off-by: Timo Furrer <[email protected]>
@makkes makkes merged commit 2ac2a75 into fluxcd:main Mar 23, 2023
@stefanprodan stefanprodan mentioned this pull request Apr 3, 2023
15 tasks
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
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants