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: 0 additions & 4 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ packages:
interfaces:
Client:
github.com/epam/edp-codebase-operator/v2/pkg/git:
interfaces:
Git:
Command:
github.com/epam/edp-codebase-operator/v2/pkg/git/v2:
interfaces:
Git:
github.com/epam/edp-codebase-operator/v2/pkg/gitprovider:
Expand Down
10 changes: 10 additions & 0 deletions api/v1/git_server_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ type GitServerSpec struct {

SshPort int32 `json:"sshPort"`

// NameSshKeySecret is the name of the Kubernetes secret containing Git repository credentials.
// Required keys:
// - token: Git provider access token (required)
// Optional keys:
// - id_rsa: SSH private key for Git operations over SSH
// - secretString: Webhook secret for validating webhook requests
// - username: Git username to override the default GitUser
// For Gerrit provider, only id_rsa key is required and used.
// +kubebuilder:example:=my-git-credentials
// +required
NameSshKeySecret string `json:"nameSshKeySecret"`

// GitProvider is a git provider type. It can be gerrit, github or gitlab. Default value is gerrit.
Expand Down
10 changes: 10 additions & 0 deletions config/crd/bases/v2.edp.epam.com_gitservers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ spec:
format: int32
type: integer
nameSshKeySecret:
description: |-
NameSshKeySecret is the name of the Kubernetes secret containing Git repository credentials.
Required keys:
- token: Git provider access token (required)
Optional keys:
- id_rsa: SSH private key for Git operations over SSH
- secretString: Webhook secret for validating webhook requests
- username: Git username to override the default GitUser
For Gerrit provider, only id_rsa key is required and used.
example: my-git-credentials
type: string
skipWebhookSSLVerification:
description: SkipWebhookSSLVerification is a flag to skip webhook
Expand Down
2 changes: 1 addition & 1 deletion controllers/codebase/service/chain/checkout_branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
codebaseutil "github.com/epam/edp-codebase-operator/v2/pkg/codebase"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
)

func CheckoutBranch(
Expand Down
4 changes: 2 additions & 2 deletions controllers/codebase/service/chain/checkout_branch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitServerMocks "github.com/epam/edp-codebase-operator/v2/pkg/git/v2/mocks"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
gitServerMocks "github.com/epam/edp-codebase-operator/v2/pkg/git/mocks"
"github.com/epam/edp-codebase-operator/v2/pkg/util"
)

Expand Down
2 changes: 1 addition & 1 deletion controllers/codebase/service/chain/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
"github.com/epam/edp-codebase-operator/v2/pkg/util"
)

Expand Down
4 changes: 2 additions & 2 deletions controllers/codebase/service/chain/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitMocks "github.com/epam/edp-codebase-operator/v2/pkg/git/v2/mocks"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
gitMocks "github.com/epam/edp-codebase-operator/v2/pkg/git/mocks"
"github.com/epam/edp-codebase-operator/v2/pkg/util"
)

Expand Down
2 changes: 1 addition & 1 deletion controllers/codebase/service/chain/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/epam/edp-codebase-operator/v2/controllers/codebase/service/chain/handler"
"github.com/epam/edp-codebase-operator/v2/pkg/gerrit"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
gitlabci "github.com/epam/edp-codebase-operator/v2/pkg/gitlab"
"github.com/epam/edp-codebase-operator/v2/pkg/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/codebase/service/chain/put_deploy_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
"github.com/epam/edp-codebase-operator/v2/controllers/codebase/service/template"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
"github.com/epam/edp-codebase-operator/v2/pkg/util"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitServerMocks "github.com/epam/edp-codebase-operator/v2/pkg/git/v2/mocks"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
gitServerMocks "github.com/epam/edp-codebase-operator/v2/pkg/git/mocks"
"github.com/epam/edp-codebase-operator/v2/pkg/platform"
"github.com/epam/edp-codebase-operator/v2/pkg/util"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
gitlabci "github.com/epam/edp-codebase-operator/v2/pkg/gitlab"
"github.com/epam/edp-codebase-operator/v2/pkg/util"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"

codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git/v2"
gitmocks "github.com/epam/edp-codebase-operator/v2/pkg/git/v2/mocks"
gitproviderv2 "github.com/epam/edp-codebase-operator/v2/pkg/git"
gitmocks "github.com/epam/edp-codebase-operator/v2/pkg/git/mocks"
gitlabci "github.com/epam/edp-codebase-operator/v2/pkg/gitlab"
"github.com/epam/edp-codebase-operator/v2/pkg/util"
)
Expand Down
Loading