connection

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEVTRON_USER                     = "devtron"
	DEVTRONCD_NAMESPACE              = "devtroncd"
	ARGOCD_CM                        = "argocd-cm"
	ARGOCD_SECRET                    = "argocd-secret"
	ARGO_USER_APIKEY_CAPABILITY      = "apiKey"
	ARGO_USER_LOGIN_CAPABILITY       = "login"
	DEVTRON_ARGOCD_USERNAME_KEY      = "DEVTRON_ACD_USER_NAME"
	DEVTRON_ARGOCD_USER_PASSWORD_KEY = "DEVTRON_ACD_USER_PASSWORD"
	DEVTRON_ARGOCD_TOKEN_KEY         = "DEVTRON_ACD_TOKEN"
)
View Source
const (
	ModuleNameArgoCd      string = "argo-cd"
	ModuleStatusInstalled string = "installed"
)

Variables

This section is empty.

Functions

func EncodeX509KeyPair

func EncodeX509KeyPair(cert tls.Certificate) ([]byte, []byte)

EncodeX509KeyPair encodes a TLS Certificate into its pem encoded format for storage

func SetTokenAuth

func SetTokenAuth(token string)

func SettingsManager

func SettingsManager(cfg *bean.Config) (*settings.SettingsManager, error)

Types

type ArgoCDConnectionManager

type ArgoCDConnectionManager interface {
	GetGrpcClientConnection(grpcConfig *bean.ArgoGRPCConfig) *grpc.ClientConn
	GetOrUpdateArgoCdUserDetail(grpcConfig *bean.ArgoGRPCConfig) string
}

type ArgoCDConnectionManagerImpl

type ArgoCDConnectionManagerImpl struct {
	// contains filtered or unexported fields
}

func NewArgoCDConnectionManagerImpl

func NewArgoCDConnectionManagerImpl(Logger *zap.SugaredLogger,
	settingsManager *settings.SettingsManager,
	moduleRepository moduleRepo.ModuleRepository,
	environmentVariables *util2.EnvironmentVariables,
	k8sUtil *k8s.K8sServiceImpl,
	k8sCommonService k8s2.K8sCommonService,
	versionService version.VersionService,
	gitOpsConfigReadService config.GitOpsConfigReadService,
	runTimeConfig *k8s.RuntimeConfig,
	argoCDConfigGetter config2.ArgoCDConfigGetter) (*ArgoCDConnectionManagerImpl, error)

func (*ArgoCDConnectionManagerImpl) GetGrpcClientConnection added in v1.2.2

func (impl *ArgoCDConnectionManagerImpl) GetGrpcClientConnection(grpcConfig *bean.ArgoGRPCConfig) *grpc.ClientConn

GetConnection - this function will call only for acd connection

func (*ArgoCDConnectionManagerImpl) GetOrUpdateArgoCdUserDetail added in v1.2.1

func (impl *ArgoCDConnectionManagerImpl) GetOrUpdateArgoCdUserDetail(grpcConfig *bean.ArgoGRPCConfig) string

func (*ArgoCDConnectionManagerImpl) ValidateGitOpsAndGetOrUpdateArgoCdUserDetail added in v1.2.1

func (impl *ArgoCDConnectionManagerImpl) ValidateGitOpsAndGetOrUpdateArgoCdUserDetail(grpcConfig *bean.ArgoGRPCConfig) string

type TokenAuth

type TokenAuth struct {
	// contains filtered or unexported fields
}

func GetTokenAuth

func GetTokenAuth() *TokenAuth

func (TokenAuth) GetRequestMetadata

func (t TokenAuth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

Return value is mapped to request headers.

func (TokenAuth) RequireTransportSecurity

func (TokenAuth) RequireTransportSecurity() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL