Documentation
¶
Index ¶
- Constants
- func BuildEnvironmentName(clusterName string, namespace string) string
- type ClusterBean
- type ClusterDescriptionBean
- type ClusterDescriptionService
- type ClusterDescriptionServiceImpl
- type ClusterRbacService
- type ClusterRbacServiceImpl
- type ClusterService
- type ClusterServiceImpl
- func (impl *ClusterServiceImpl) CheckIfConfigIsValid(cluster *ClusterBean) error
- func (impl *ClusterServiceImpl) ConnectClustersInBatch(clusters []*ClusterBean, clusterExistInDb bool)
- func (impl *ClusterServiceImpl) ConvertClusterBeanObjectToCluster(bean *ClusterBean) *v1alpha1.Cluster
- func (impl *ClusterServiceImpl) ConvertClusterBeanToCluster(clusterBean *ClusterBean, userId int32) *repository.Cluster
- func (impl *ClusterServiceImpl) CreateGrafanaDataSource(clusterBean *ClusterBean, env *repository.Environment) (int, error)
- func (impl *ClusterServiceImpl) Delete(bean *ClusterBean, userId int32) error
- func (impl *ClusterServiceImpl) DeleteFromDb(bean *ClusterBean, userId int32) error
- func (impl *ClusterServiceImpl) FetchRolesFromGroup(userId int32) ([]*repository3.RoleModel, error)
- func (impl *ClusterServiceImpl) FindAll() ([]*ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllActive() ([]ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllExceptVirtual() ([]*ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllForAutoComplete() ([]ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllForClusterByUserId(userId int32, isActionUserSuperAdmin bool) ([]ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllNamespacesByUserIdAndClusterId(userId int32, clusterId int, isActionUserSuperAdmin bool) ([]string, error)
- func (impl *ClusterServiceImpl) FindAllWithoutConfig() ([]*ClusterBean, error)
- func (impl *ClusterServiceImpl) FindById(id int) (*ClusterBean, error)
- func (impl *ClusterServiceImpl) FindByIdWithoutConfig(id int) (*ClusterBean, error)
- func (impl *ClusterServiceImpl) FindByIds(ids []int) ([]ClusterBean, error)
- func (impl *ClusterServiceImpl) FindOne(clusterName string) (*ClusterBean, error)
- func (impl *ClusterServiceImpl) FindOneActive(clusterName string) (*ClusterBean, error)
- func (impl *ClusterServiceImpl) GetAllClusterNamespaces() map[string][]string
- func (impl *ClusterServiceImpl) GetAndUpdateConnectionStatusForOneCluster(k8sClientSet *kubernetes.Clientset, clusterId int, respMap *sync.Map)
- func (impl *ClusterServiceImpl) GetClusterConfigByClusterId(clusterId int) (*k8s.ClusterConfig, error)
- func (impl *ClusterServiceImpl) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap *sync.Map, clusterExistInDb bool)
- func (impl *ClusterServiceImpl) IsClusterReachable(clusterId int) (bool, error)
- func (impl *ClusterServiceImpl) Save(parent context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
- func (impl *ClusterServiceImpl) SyncNsInformer(bean *ClusterBean)
- func (impl *ClusterServiceImpl) Update(ctx context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
- func (impl *ClusterServiceImpl) UpdateClusterDescription(bean *ClusterBean, userId int32) error
- func (impl *ClusterServiceImpl) ValidateKubeconfig(kubeConfig string) (map[string]*ValidateClusterBean, error)
- type ClusterServiceImplExtended
- func (impl *ClusterServiceImplExtended) CreateGrafanaDataSource(clusterBean *ClusterBean, env *repository.Environment) (int, error)
- func (impl ClusterServiceImplExtended) DeleteFromDb(bean *ClusterBean, userId int32) error
- func (impl *ClusterServiceImplExtended) FindAll() ([]*ClusterBean, error)
- func (impl *ClusterServiceImplExtended) FindAllExceptVirtual() ([]*ClusterBean, error)
- func (impl *ClusterServiceImplExtended) FindAllWithoutConfig() ([]*ClusterBean, error)
- func (impl *ClusterServiceImplExtended) GetClusterFullModeDTO(beans []*ClusterBean) ([]*ClusterBean, error)
- func (impl *ClusterServiceImplExtended) Save(ctx context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
- func (impl *ClusterServiceImplExtended) Update(ctx context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
- type DefaultClusterComponent
- type EnvironmentService
- type EnvironmentServiceImpl
- func (impl EnvironmentServiceImpl) Create(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) Delete(deleteReq *bean2.EnvironmentBean, userId int32) error
- func (impl EnvironmentServiceImpl) FindById(id int) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*repository.Environment, error)
- func (impl EnvironmentServiceImpl) FindClusterByEnvId(id int) (*ClusterBean, error)
- func (impl EnvironmentServiceImpl) FindOne(environment string) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindOneByNamespaceAndClusterId(namespaces string, clusterId int) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAll() ([]bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAllActive() ([]bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAllActiveEnvironmentCount() (int, error)
- func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown(token string, isActionUserSuperAdmin bool, ...) ([]*bean2.ClusterEnvDto, error)
- func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*bean2.ClusterEnvDto, error)
- func (impl EnvironmentServiceImpl) GetDetailsById(envId int) (*repository.Environment, error)
- func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete() ([]bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetExtendedEnvBeanById(id int) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap *sync.Map, clusterExistInDb bool)
- func (impl EnvironmentServiceImpl) IsReceivedDeploymentTypeValid(deploymentConfig map[string]bool) (bool, []string)
- func (impl EnvironmentServiceImpl) Update(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
- type EphemeralContainerAdvancedData
- type EphemeralContainerBasicData
- type EphemeralContainerRequest
- type EphemeralContainerService
- type EphemeralContainerServiceImpl
- type Kubeconfig
- type PrometheusAuth
- type UserClusterBeanMapping
- type UserInfo
- type ValidateClusterBean
Constants ¶
View Source
const ( DEFAULT_CLUSTER = "default_cluster" DEFAULT_NAMESPACE = "default" CLUSTER_MODIFY_EVENT_SECRET_TYPE = "cluster.request/modify" CLUSTER_ACTION_ADD = "add" CLUSTER_ACTION_UPDATE = "update" SECRET_NAME = "cluster-event" SECRET_FIELD_CLUSTER_ID = "cluster_id" SECRET_FIELD_UPDATED_ON = "updated_on" SECRET_FIELD_ACTION = "action" TokenFilePath = "/var/run/secrets/kubernetes.io/serviceaccount/token" )
Variables ¶
This section is empty.
Functions ¶
func BuildEnvironmentName ¶ added in v0.6.24
Types ¶
type ClusterBean ¶
type ClusterBean struct {
Id int `json:"id" validate:"number"`
ClusterName string `json:"cluster_name,omitempty" validate:"required"`
Description string `json:"description"`
ServerUrl string `json:"server_url,omitempty" validate:"url,required"`
PrometheusUrl string `json:"prometheus_url,omitempty" validate:"validate-non-empty-url"`
Active bool `json:"active"`
Config map[string]string `json:"config,omitempty"`
PrometheusAuth *PrometheusAuth `json:"prometheusAuth,omitempty"`
DefaultClusterComponent []*DefaultClusterComponent `json:"defaultClusterComponent"`
AgentInstallationStage int `json:"agentInstallationStage,notnull"` // -1=external, 0=not triggered, 1=progressing, 2=success, 3=fails
K8sVersion string `json:"k8sVersion"`
HasConfigOrUrlChanged bool `json:"-"`
UserName string `json:"userName,omitempty"`
InsecureSkipTLSVerify bool `json:"insecureSkipTlsVerify"`
ErrorInConnecting string `json:"errorInConnecting"`
IsCdArgoSetup bool `json:"isCdArgoSetup"`
IsVirtualCluster bool `json:"isVirtualCluster"`
ClusterUpdated bool `json:"clusterUpdated"`
}
func GetClusterBean ¶ added in v0.6.18
func GetClusterBean(model repository.Cluster) ClusterBean
func (ClusterBean) GetClusterConfig ¶ added in v0.6.18
func (bean ClusterBean) GetClusterConfig() *k8s.ClusterConfig
type ClusterDescriptionBean ¶ added in v0.6.17
type ClusterDescriptionBean struct {
ClusterId int `json:"clusterId" validate:"number"`
ClusterName string `json:"clusterName" validate:"required"`
Description string `json:"description"`
ServerUrl string `json:"serverUrl"`
ClusterCreatedBy string `json:"clusterCreatedBy" validate:"number"`
ClusterCreatedOn time.Time `json:"clusterCreatedOn" validate:"required"`
ClusterNote *apiBean.GenericNoteResponseBean `json:"clusterNote,omitempty"`
}
type ClusterDescriptionService ¶ added in v0.6.17
type ClusterDescriptionService interface {
FindByClusterIdWithClusterDetails(id int) (*ClusterDescriptionBean, error)
}
type ClusterDescriptionServiceImpl ¶ added in v0.6.17
type ClusterDescriptionServiceImpl struct {
// contains filtered or unexported fields
}
func NewClusterDescriptionServiceImpl ¶ added in v0.6.17
func NewClusterDescriptionServiceImpl(repository repository.ClusterDescriptionRepository, userRepository repository2.UserRepository, logger *zap.SugaredLogger) *ClusterDescriptionServiceImpl
func (*ClusterDescriptionServiceImpl) FindByClusterIdWithClusterDetails ¶ added in v0.6.17
func (impl *ClusterDescriptionServiceImpl) FindByClusterIdWithClusterDetails(clusterId int) (*ClusterDescriptionBean, error)
type ClusterRbacService ¶ added in v0.6.23
type ClusterRbacServiceImpl ¶ added in v0.6.23
type ClusterRbacServiceImpl struct {
// contains filtered or unexported fields
}
func NewClusterRbacServiceImpl ¶ added in v0.6.23
func NewClusterRbacServiceImpl(environmentService EnvironmentService, enforcer casbin.Enforcer, clusterService ClusterService, logger *zap.SugaredLogger, userService user.UserService) *ClusterRbacServiceImpl
func (*ClusterRbacServiceImpl) CheckAuthorization ¶ added in v0.6.23
func (*ClusterRbacServiceImpl) FetchAllowedClusterMap ¶ added in v0.6.23
func (impl *ClusterRbacServiceImpl) FetchAllowedClusterMap(userId int32) (map[string]bool, error)
type ClusterService ¶
type ClusterService interface {
Save(parent context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
UpdateClusterDescription(bean *ClusterBean, userId int32) error
ValidateKubeconfig(kubeConfig string) (map[string]*ValidateClusterBean, error)
FindOne(clusterName string) (*ClusterBean, error)
FindOneActive(clusterName string) (*ClusterBean, error)
FindAll() ([]*ClusterBean, error)
FindAllExceptVirtual() ([]*ClusterBean, error)
FindAllWithoutConfig() ([]*ClusterBean, error)
FindAllActive() ([]ClusterBean, error)
DeleteFromDb(bean *ClusterBean, userId int32) error
FindById(id int) (*ClusterBean, error)
FindByIdWithoutConfig(id int) (*ClusterBean, error)
FindByIds(id []int) ([]ClusterBean, error)
Update(ctx context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
Delete(bean *ClusterBean, userId int32) error
FindAllForAutoComplete() ([]ClusterBean, error)
CreateGrafanaDataSource(clusterBean *ClusterBean, env *repository.Environment) (int, error)
GetAllClusterNamespaces() map[string][]string
FindAllNamespacesByUserIdAndClusterId(userId int32, clusterId int, isActionUserSuperAdmin bool) ([]string, error)
FindAllForClusterByUserId(userId int32, isActionUserSuperAdmin bool) ([]ClusterBean, error)
FetchRolesFromGroup(userId int32) ([]*repository3.RoleModel, error)
HandleErrorInClusterConnections(clusters []*ClusterBean, respMap *sync.Map, clusterExistInDb bool)
ConnectClustersInBatch(clusters []*ClusterBean, clusterExistInDb bool)
ConvertClusterBeanToCluster(clusterBean *ClusterBean, userId int32) *repository.Cluster
ConvertClusterBeanObjectToCluster(bean *ClusterBean) *v1alpha1.Cluster
GetClusterConfigByClusterId(clusterId int) (*k8s.ClusterConfig, error)
IsClusterReachable(clusterId int) (bool, error)
}
type ClusterServiceImpl ¶
type ClusterServiceImpl struct {
K8sUtil *k8s.K8sServiceImpl
K8sInformerFactory informer.K8sInformerFactory
// contains filtered or unexported fields
}
func NewClusterServiceImpl ¶
func NewClusterServiceImpl(repository repository.ClusterRepository, logger *zap.SugaredLogger, K8sUtil *k8s.K8sServiceImpl, K8sInformerFactory informer.K8sInformerFactory, userAuthRepository repository3.UserAuthRepository, userRepository repository3.UserRepository, roleGroupRepository repository3.RoleGroupRepository, envVariables *globalUtil.EnvironmentVariables, cronLogger *cronUtil.CronLoggerImpl) (*ClusterServiceImpl, error)
func (*ClusterServiceImpl) CheckIfConfigIsValid ¶ added in v0.6.2
func (impl *ClusterServiceImpl) CheckIfConfigIsValid(cluster *ClusterBean) error
func (*ClusterServiceImpl) ConnectClustersInBatch ¶ added in v0.6.18
func (impl *ClusterServiceImpl) ConnectClustersInBatch(clusters []*ClusterBean, clusterExistInDb bool)
func (*ClusterServiceImpl) ConvertClusterBeanObjectToCluster ¶ added in v0.6.18
func (impl *ClusterServiceImpl) ConvertClusterBeanObjectToCluster(bean *ClusterBean) *v1alpha1.Cluster
func (*ClusterServiceImpl) ConvertClusterBeanToCluster ¶ added in v0.6.18
func (impl *ClusterServiceImpl) ConvertClusterBeanToCluster(clusterBean *ClusterBean, userId int32) *repository.Cluster
func (*ClusterServiceImpl) CreateGrafanaDataSource ¶
func (impl *ClusterServiceImpl) CreateGrafanaDataSource(clusterBean *ClusterBean, env *repository.Environment) (int, error)
func (*ClusterServiceImpl) Delete ¶
func (impl *ClusterServiceImpl) Delete(bean *ClusterBean, userId int32) error
func (*ClusterServiceImpl) DeleteFromDb ¶ added in v0.3.15
func (impl *ClusterServiceImpl) DeleteFromDb(bean *ClusterBean, userId int32) error
func (*ClusterServiceImpl) FetchRolesFromGroup ¶ added in v0.6.11
func (impl *ClusterServiceImpl) FetchRolesFromGroup(userId int32) ([]*repository3.RoleModel, error)
func (*ClusterServiceImpl) FindAll ¶
func (impl *ClusterServiceImpl) FindAll() ([]*ClusterBean, error)
func (*ClusterServiceImpl) FindAllActive ¶
func (impl *ClusterServiceImpl) FindAllActive() ([]ClusterBean, error)
func (*ClusterServiceImpl) FindAllExceptVirtual ¶ added in v0.6.24
func (impl *ClusterServiceImpl) FindAllExceptVirtual() ([]*ClusterBean, error)
func (*ClusterServiceImpl) FindAllForAutoComplete ¶
func (impl *ClusterServiceImpl) FindAllForAutoComplete() ([]ClusterBean, error)
func (*ClusterServiceImpl) FindAllForClusterByUserId ¶ added in v0.6.11
func (impl *ClusterServiceImpl) FindAllForClusterByUserId(userId int32, isActionUserSuperAdmin bool) ([]ClusterBean, error)
func (*ClusterServiceImpl) FindAllNamespacesByUserIdAndClusterId ¶ added in v0.6.11
func (*ClusterServiceImpl) FindAllWithoutConfig ¶ added in v0.6.13
func (impl *ClusterServiceImpl) FindAllWithoutConfig() ([]*ClusterBean, error)
func (*ClusterServiceImpl) FindById ¶
func (impl *ClusterServiceImpl) FindById(id int) (*ClusterBean, error)
func (*ClusterServiceImpl) FindByIdWithoutConfig ¶ added in v0.6.13
func (impl *ClusterServiceImpl) FindByIdWithoutConfig(id int) (*ClusterBean, error)
func (*ClusterServiceImpl) FindByIds ¶
func (impl *ClusterServiceImpl) FindByIds(ids []int) ([]ClusterBean, error)
func (*ClusterServiceImpl) FindOne ¶
func (impl *ClusterServiceImpl) FindOne(clusterName string) (*ClusterBean, error)
func (*ClusterServiceImpl) FindOneActive ¶
func (impl *ClusterServiceImpl) FindOneActive(clusterName string) (*ClusterBean, error)
func (*ClusterServiceImpl) GetAllClusterNamespaces ¶ added in v0.6.10
func (impl *ClusterServiceImpl) GetAllClusterNamespaces() map[string][]string
func (*ClusterServiceImpl) GetAndUpdateConnectionStatusForOneCluster ¶ added in v0.6.21
func (impl *ClusterServiceImpl) GetAndUpdateConnectionStatusForOneCluster(k8sClientSet *kubernetes.Clientset, clusterId int, respMap *sync.Map)
func (*ClusterServiceImpl) GetClusterConfigByClusterId ¶ added in v0.6.25
func (impl *ClusterServiceImpl) GetClusterConfigByClusterId(clusterId int) (*k8s.ClusterConfig, error)
func (*ClusterServiceImpl) HandleErrorInClusterConnections ¶ added in v0.6.18
func (impl *ClusterServiceImpl) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap *sync.Map, clusterExistInDb bool)
func (*ClusterServiceImpl) IsClusterReachable ¶ added in v0.6.29
func (impl *ClusterServiceImpl) IsClusterReachable(clusterId int) (bool, error)
func (*ClusterServiceImpl) Save ¶
func (impl *ClusterServiceImpl) Save(parent context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
func (*ClusterServiceImpl) SyncNsInformer ¶ added in v0.3.14
func (impl *ClusterServiceImpl) SyncNsInformer(bean *ClusterBean)
func (*ClusterServiceImpl) Update ¶
func (impl *ClusterServiceImpl) Update(ctx context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
func (*ClusterServiceImpl) UpdateClusterDescription ¶ added in v0.6.26
func (impl *ClusterServiceImpl) UpdateClusterDescription(bean *ClusterBean, userId int32) error
UpdateClusterDescription is new api service logic to only update description, this should be done in cluster update operation only but not supported currently as per product
func (*ClusterServiceImpl) ValidateKubeconfig ¶ added in v0.6.18
func (impl *ClusterServiceImpl) ValidateKubeconfig(kubeConfig string) (map[string]*ValidateClusterBean, error)
type ClusterServiceImplExtended ¶ added in v0.3.9
type ClusterServiceImplExtended struct {
*ClusterServiceImpl
// contains filtered or unexported fields
}
extends ClusterServiceImpl and enhances method of ClusterService with full mode specific errors
func NewClusterServiceImplExtended ¶ added in v0.3.9
func NewClusterServiceImplExtended(environmentRepository repository.EnvironmentRepository, grafanaClient grafana.GrafanaClient, installedAppRepository repository2.InstalledAppRepository, clusterServiceCD cluster2.ServiceClient, gitOpsConfigReadService config.GitOpsConfigReadService, clusterServiceImpl *ClusterServiceImpl) *ClusterServiceImplExtended
func (*ClusterServiceImplExtended) CreateGrafanaDataSource ¶ added in v0.3.9
func (impl *ClusterServiceImplExtended) CreateGrafanaDataSource(clusterBean *ClusterBean, env *repository.Environment) (int, error)
func (ClusterServiceImplExtended) DeleteFromDb ¶ added in v0.3.15
func (impl ClusterServiceImplExtended) DeleteFromDb(bean *ClusterBean, userId int32) error
func (*ClusterServiceImplExtended) FindAll ¶ added in v0.3.9
func (impl *ClusterServiceImplExtended) FindAll() ([]*ClusterBean, error)
func (*ClusterServiceImplExtended) FindAllExceptVirtual ¶ added in v0.6.24
func (impl *ClusterServiceImplExtended) FindAllExceptVirtual() ([]*ClusterBean, error)
func (*ClusterServiceImplExtended) FindAllWithoutConfig ¶ added in v0.6.13
func (impl *ClusterServiceImplExtended) FindAllWithoutConfig() ([]*ClusterBean, error)
func (*ClusterServiceImplExtended) GetClusterFullModeDTO ¶ added in v0.6.24
func (impl *ClusterServiceImplExtended) GetClusterFullModeDTO(beans []*ClusterBean) ([]*ClusterBean, error)
func (*ClusterServiceImplExtended) Save ¶ added in v0.3.9
func (impl *ClusterServiceImplExtended) Save(ctx context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
func (*ClusterServiceImplExtended) Update ¶ added in v0.3.9
func (impl *ClusterServiceImplExtended) Update(ctx context.Context, bean *ClusterBean, userId int32) (*ClusterBean, error)
type DefaultClusterComponent ¶
type EnvironmentService ¶
type EnvironmentService interface {
FindOne(environment string) (*bean2.EnvironmentBean, error)
Create(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
Update(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
GetAll() ([]bean2.EnvironmentBean, error)
GetAllActive() ([]bean2.EnvironmentBean, error)
GetAllActiveEnvironmentCount() (int, error)
Delete(deleteReq *bean2.EnvironmentBean, userId int32) error
FindClusterByEnvId(id int) (*ClusterBean, error)
// FindById provides an exposed struct of bean.EnvironmentBean;
// Usage - can be used for API responses;
FindById(id int) (*bean2.EnvironmentBean, error)
// GetExtendedEnvBeanById is used internally to get combined env and cluster data in bean.EnvironmentBean;
// Usage - used for intra-service communications only;
// For exposed view use FindById instead
GetExtendedEnvBeanById(id int) (*bean2.EnvironmentBean, error)
GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]bean2.EnvironmentBean, error)
GetEnvironmentOnlyListForAutocomplete() ([]bean2.EnvironmentBean, error)
FindByIds(ids []*int) ([]*bean2.EnvironmentBean, error)
FindByNamespaceAndClusterName(namespaces string, clusterName string) (*repository.Environment, error)
FindOneByNamespaceAndClusterId(namespaces string, clusterId int) (*bean2.EnvironmentBean, error)
GetByClusterId(id int) ([]*bean2.EnvironmentBean, error)
GetCombinedEnvironmentListForDropDown(token string, isActionUserSuperAdmin bool, auth func(email string, object []string) map[string]bool) ([]*bean2.ClusterEnvDto, error)
GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*bean2.ClusterEnvDto, error)
HandleErrorInClusterConnections(clusters []*ClusterBean, respMap *sync.Map, clusterExistInDb bool)
GetDetailsById(envId int) (*repository.Environment, error)
}
type EnvironmentServiceImpl ¶
type EnvironmentServiceImpl struct {
K8sUtil *util2.K8sServiceImpl
// contains filtered or unexported fields
}
func NewEnvironmentServiceImpl ¶
func NewEnvironmentServiceImpl(environmentRepository repository.EnvironmentRepository, clusterService ClusterService, logger *zap.SugaredLogger, K8sUtil *util2.K8sServiceImpl, k8sInformerFactory informer.K8sInformerFactory, userAuthService user.UserAuthService, attributesRepository repository2.AttributesRepository) *EnvironmentServiceImpl
func (EnvironmentServiceImpl) Create ¶
func (impl EnvironmentServiceImpl) Create(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) Delete ¶ added in v0.3.15
func (impl EnvironmentServiceImpl) Delete(deleteReq *bean2.EnvironmentBean, userId int32) error
func (EnvironmentServiceImpl) FindById ¶
func (impl EnvironmentServiceImpl) FindById(id int) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) FindByIds ¶
func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) FindByNamespaceAndClusterName ¶
func (impl EnvironmentServiceImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*repository.Environment, error)
func (EnvironmentServiceImpl) FindClusterByEnvId ¶
func (impl EnvironmentServiceImpl) FindClusterByEnvId(id int) (*ClusterBean, error)
func (EnvironmentServiceImpl) FindOne ¶
func (impl EnvironmentServiceImpl) FindOne(environment string) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) FindOneByNamespaceAndClusterId ¶ added in v0.7.0
func (impl EnvironmentServiceImpl) FindOneByNamespaceAndClusterId(namespaces string, clusterId int) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAll ¶
func (impl EnvironmentServiceImpl) GetAll() ([]bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAllActive ¶
func (impl EnvironmentServiceImpl) GetAllActive() ([]bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAllActiveEnvironmentCount ¶ added in v0.7.0
func (impl EnvironmentServiceImpl) GetAllActiveEnvironmentCount() (int, error)
func (EnvironmentServiceImpl) GetByClusterId ¶
func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown ¶ added in v0.3.14
func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown(token string, isActionUserSuperAdmin bool, auth func(email string, object []string) map[string]bool) ([]*bean2.ClusterEnvDto, error)
func (EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDownByClusterIds ¶ added in v0.3.14
func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*bean2.ClusterEnvDto, error)
func (EnvironmentServiceImpl) GetDetailsById ¶ added in v0.7.0
func (impl EnvironmentServiceImpl) GetDetailsById(envId int) (*repository.Environment, error)
func (EnvironmentServiceImpl) GetEnvironmentListForAutocomplete ¶
func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete ¶ added in v0.6.17
func (impl EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete() ([]bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetExtendedEnvBeanById ¶ added in v0.7.0
func (impl EnvironmentServiceImpl) GetExtendedEnvBeanById(id int) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) HandleErrorInClusterConnections ¶ added in v0.6.18
func (impl EnvironmentServiceImpl) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap *sync.Map, clusterExistInDb bool)
func (EnvironmentServiceImpl) IsReceivedDeploymentTypeValid ¶ added in v0.6.18
func (impl EnvironmentServiceImpl) IsReceivedDeploymentTypeValid(deploymentConfig map[string]bool) (bool, []string)
func (EnvironmentServiceImpl) Update ¶
func (impl EnvironmentServiceImpl) Update(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
type EphemeralContainerAdvancedData ¶ added in v0.6.21
type EphemeralContainerAdvancedData struct {
Manifest string `json:"manifest"`
}
type EphemeralContainerBasicData ¶ added in v0.6.21
type EphemeralContainerRequest ¶ added in v0.6.21
type EphemeralContainerRequest struct {
BasicData *EphemeralContainerBasicData `json:"basicData"`
AdvancedData *EphemeralContainerAdvancedData `json:"advancedData"`
Namespace string `json:"namespace" validate:"required"`
ClusterId int `json:"clusterId" validate:"gt=0"`
PodName string `json:"podName" validate:"required"`
ExternalArgoApplicationName string `json:"externalArgoApplicationName,omitempty"`
UserId int32 `json:"-"`
}
type EphemeralContainerService ¶ added in v0.6.21
type EphemeralContainerService interface {
AuditEphemeralContainerAction(model EphemeralContainerRequest, actionType repository.ContainerAction) error
}
type EphemeralContainerServiceImpl ¶ added in v0.6.21
type EphemeralContainerServiceImpl struct {
// contains filtered or unexported fields
}
func NewEphemeralContainerServiceImpl ¶ added in v0.6.21
func NewEphemeralContainerServiceImpl(repository repository.EphemeralContainersRepository, logger *zap.SugaredLogger) *EphemeralContainerServiceImpl
func (*EphemeralContainerServiceImpl) AuditEphemeralContainerAction ¶ added in v0.6.21
func (impl *EphemeralContainerServiceImpl) AuditEphemeralContainerAction(model EphemeralContainerRequest, actionType repository.ContainerAction) error
type Kubeconfig ¶ added in v0.6.18
type Kubeconfig struct {
Config string `json:"config"`
}
type PrometheusAuth ¶
type UserClusterBeanMapping ¶ added in v0.6.18
type UserClusterBeanMapping struct {
Mapping map[string]*ClusterBean `json:"mapping"`
}
type ValidateClusterBean ¶ added in v0.6.18
type ValidateClusterBean struct {
UserInfos map[string]*UserInfo `json:"userInfos,omitempty""`
*ClusterBean
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.