Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ require (
github.com/fluxcd/pkg/apis/event v0.25.0
github.com/fluxcd/pkg/apis/meta v1.26.0
github.com/fluxcd/pkg/artifact v0.13.0
github.com/fluxcd/pkg/auth v0.41.0
github.com/fluxcd/pkg/auth v0.42.0
github.com/fluxcd/pkg/cache v0.13.0
github.com/fluxcd/pkg/git v0.47.0
github.com/fluxcd/pkg/gittestserver v0.27.0
github.com/fluxcd/pkg/helmtestserver v0.38.0
github.com/fluxcd/pkg/http/transport v0.7.0
github.com/fluxcd/pkg/masktoken v0.8.0
github.com/fluxcd/pkg/oci v0.65.0
github.com/fluxcd/pkg/runtime v0.103.0
github.com/fluxcd/pkg/runtime v0.105.0
github.com/fluxcd/pkg/sourceignore v0.17.0
github.com/fluxcd/pkg/ssh v0.24.0
github.com/fluxcd/pkg/tar v1.1.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ github.com/fluxcd/pkg/apis/meta v1.26.0 h1:dxP1FfBpTCYso6odzRcltVnnRuBb2VyhhgV0V
github.com/fluxcd/pkg/apis/meta v1.26.0/go.mod h1:c7o6mJGLCMvNrfdinGZehkrdZuFT9vZdZNrn66DtVD0=
github.com/fluxcd/pkg/artifact v0.13.0 h1:CkEZo9NmfLGd68SdS/eUpP4Sz1uwEERKQpg17gO5Rrc=
github.com/fluxcd/pkg/artifact v0.13.0/go.mod h1:Fl+JCAMAvQePU2UG+aGIDM4XtFSV/l1B313TLSxoG5U=
github.com/fluxcd/pkg/auth v0.41.0 h1:7NaaPN03ginRUUA928n7hiRJoBoMrF/Prl0AtDlLXBQ=
github.com/fluxcd/pkg/auth v0.41.0/go.mod h1:U9xNHUyxOdPhxRnSW7dwloEF9EMeITxt84g8CD8YB3Q=
github.com/fluxcd/pkg/auth v0.42.0 h1:RniHLAvp/Ykrxxu9Y9acMSmOR/7HvncJrXfihql7OIU=
github.com/fluxcd/pkg/auth v0.42.0/go.mod h1:U9xNHUyxOdPhxRnSW7dwloEF9EMeITxt84g8CD8YB3Q=
github.com/fluxcd/pkg/cache v0.13.0 h1:MqtlgOwIVcGKKgV422e39O+KFSVMWuExKeRaMDBjJlk=
github.com/fluxcd/pkg/cache v0.13.0/go.mod h1:0xRZ1hitrIFQ6pl68ke2wZLbIqA2VLzY78HpDo9DVxs=
github.com/fluxcd/pkg/git v0.47.0 h1:zL4g/6p3RKqyev7rd1J7TgYU7lMai4YgxMHfDesQHsc=
Expand All @@ -390,8 +390,8 @@ github.com/fluxcd/pkg/masktoken v0.8.0 h1:Dm5xIVNbg0s6zNttjDvimaG38bKsXwxBVo5b+D
github.com/fluxcd/pkg/masktoken v0.8.0/go.mod h1:Gc73ALOqIe+5Gj2V3JggMNiYcBiZ9bNNDYBE9R5XTTg=
github.com/fluxcd/pkg/oci v0.65.0 h1:exBmAs7O1Jo32CAQSntHKqFokUc1W5mzRkxq+lxOKug=
github.com/fluxcd/pkg/oci v0.65.0/go.mod h1:zZGRE+h9pmL3TH0u2w2/a+EuG9YyU5xqIAC0/H9niz0=
github.com/fluxcd/pkg/runtime v0.103.0 h1:J5y5GPhWdkyqIUBlaI1FP2N02TtZmsjbWhhZubuTSFk=
github.com/fluxcd/pkg/runtime v0.103.0/go.mod h1:mbo2f3azo3yVQgm7XZGxQB6/2zvzQ5Wgtd8TjRRwwAw=
github.com/fluxcd/pkg/runtime v0.105.0 h1:XdcPHhcwWzgqKxN2QtCPeoRaHk+aL2tCt+cjZdYrJGI=
github.com/fluxcd/pkg/runtime v0.105.0/go.mod h1:I7KymH0BM5YUSd68ohjm/RTLXGkw59IXFuu8ISLbLvs=
github.com/fluxcd/pkg/sourceignore v0.17.0 h1:Z72nruRMhC15zIEpWoDrAcJcJ1El6QDnP/aRDfE4WOA=
github.com/fluxcd/pkg/sourceignore v0.17.0/go.mod h1:3e/VmYLId0pI/H5sK7W9Ibif+j0Ahns9RxNjDMtTTfY=
github.com/fluxcd/pkg/ssh v0.24.0 h1:hrPlxs0hhXf32DRqs68VbsXs0XfQMphyRVIk0rYYJa4=
Expand Down
8 changes: 4 additions & 4 deletions internal/controller/gitrepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,11 @@ func (r *GitRepositoryReconciler) getAuthOpts(ctx context.Context, obj *sourcev1
}

// Configure provider authentication if specified.
var getCreds func() (*authutils.GitCredentials, error)
var getCreds func() (*auth.GitCredentials, error)
switch provider := obj.GetProvider(); provider {
// If other providers (GCP, etc.) are added in the future they can be added here separated by a comma.
case sourcev1.GitProviderAzure, sourcev1.GitProviderAWS:
getCreds = func() (*authutils.GitCredentials, error) {
getCreds = func() (*auth.GitCredentials, error) {
opts := []auth.Option{
auth.WithClient(r.Client),
auth.WithServiceAccountNamespace(obj.GetNamespace()),
Expand Down Expand Up @@ -730,7 +730,7 @@ func (r *GitRepositoryReconciler) getAuthOpts(ctx context.Context, obj *sourcev1
conditions.MarkTrue(obj, sourcev1.FetchFailedCondition, e.Reason, "%s", e)
return nil, e
}
getCreds = func() (*authutils.GitCredentials, error) {
getCreds = func() (*auth.GitCredentials, error) {
var appOpts []githubapp.OptFunc

appOpts = append(appOpts, githubapp.WithAppData(authMethods.GitHubAppData))
Expand All @@ -752,7 +752,7 @@ func (r *GitRepositoryReconciler) getAuthOpts(ctx context.Context, obj *sourcev1
if err != nil {
return nil, err
}
return &authutils.GitCredentials{
return &auth.GitCredentials{
Username: username,
Password: password,
}, nil
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/gitrepository_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ func TestGitRepositoryReconciler_getAuthOpts_provider(t *testing.T) {
beforeFunc: func(obj *sourcev1.GitRepository) {
obj.Spec.Provider = sourcev1.GitProviderAWS
},
wantErr: "failed to create provider access token for the controller",
wantErr: "invalid AWS CodeCommit Git URL: github.com",
},
{
name: "aws provider with service account and feature gate for object-level identity disabled",
Expand Down
Loading