Documentation
¶
Index ¶
- Constants
- func BuildEnvironmentName(clusterName string, namespace string) string
- type ClusterBean
- type ClusterCronService
- type ClusterCronServiceImpl
- type ClusterDescriptionBean
- type ClusterDescriptionService
- type ClusterDescriptionServiceImpl
- type ClusterEnvDto
- 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) ([]*repository2.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 map[int]error, ...)
- func (impl ClusterServiceImpl) GetClusterConfigByClusterId(clusterId int) (*k8s.ClusterConfig, error)
- func (impl *ClusterServiceImpl) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap map[int]error, clusterExistInDb bool)
- 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 ClusterStatusConfig
- type DefaultClusterComponent
- type EnvDto
- type EnvironmentBean
- type EnvironmentService
- type EnvironmentServiceImpl
- func (impl EnvironmentServiceImpl) Create(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) Delete(deleteReq *EnvironmentBean, userId int32) error
- func (impl EnvironmentServiceImpl) FindById(id int) (*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*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) (*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAll() ([]EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAllActive() ([]EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown(emailId string, isActionUserSuperAdmin bool, ...) ([]*ClusterEnvDto, error)
- func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*ClusterEnvDto, error)
- func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete() ([]EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap map[int]error, clusterExistInDb bool)
- func (impl EnvironmentServiceImpl) IsReceivedDeploymentTypeValid(deploymentConfig map[string]bool) (bool, []string)
- func (impl EnvironmentServiceImpl) Update(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error)
- type EphemeralContainerAdvancedData
- type EphemeralContainerBasicData
- type EphemeralContainerRequest
- type EphemeralContainerService
- type EphemeralContainerServiceImpl
- type Kubeconfig
- type PrometheusAuth
- type ResourceGroupingResponse
- 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" )
View Source
const ( PIPELINE_DEPLOYMENT_TYPE_HELM = "helm" PIPELINE_DEPLOYMENT_TYPE_ACD = "argo_cd" )
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"` // contains filtered or unexported fields }
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, error)
type ClusterCronService ¶ added in v0.6.21
type ClusterCronService interface { }
type ClusterCronServiceImpl ¶ added in v0.6.21
type ClusterCronServiceImpl struct {
// contains filtered or unexported fields
}
func NewClusterCronServiceImpl ¶ added in v0.6.21
func NewClusterCronServiceImpl(logger *zap.SugaredLogger, clusterService ClusterService) (*ClusterCronServiceImpl, error)
func (*ClusterCronServiceImpl) GetAndUpdateClusterConnectionStatus ¶ added in v0.6.21
func (impl *ClusterCronServiceImpl) GetAndUpdateClusterConnectionStatus()
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 ClusterEnvDto ¶ added in v0.3.14
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) ([]*repository2.RoleModel, error) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap map[int]error, 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) }
type ClusterServiceImpl ¶
type ClusterServiceImpl struct { K8sUtil *k8s.K8sUtil K8sInformerFactory informer.K8sInformerFactory *ClusterRbacServiceImpl // contains filtered or unexported fields }
func NewClusterServiceImpl ¶
func NewClusterServiceImpl(repository repository.ClusterRepository, logger *zap.SugaredLogger, K8sUtil *k8s.K8sUtil, K8sInformerFactory informer.K8sInformerFactory, userAuthRepository repository2.UserAuthRepository, userRepository repository2.UserRepository, roleGroupRepository repository2.RoleGroupRepository) *ClusterServiceImpl
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) ([]*repository2.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 map[int]error, mutex *sync.Mutex)
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 map[int]error, clusterExistInDb bool)
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 { K8sInformerFactory informer.K8sInformerFactory *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(repository repository.ClusterRepository, environmentRepository repository.EnvironmentRepository, grafanaClient grafana.GrafanaClient, logger *zap.SugaredLogger, installedAppRepository repository2.InstalledAppRepository, K8sUtil *k8s.K8sUtil, clusterServiceCD cluster2.ServiceClient, K8sInformerFactory informer.K8sInformerFactory, gitOpsRepository repository3.GitOpsConfigRepository, userAuthRepository repository4.UserAuthRepository, userRepository repository4.UserRepository, roleGroupRepository repository4.RoleGroupRepository) *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 ClusterStatusConfig ¶ added in v0.6.21
type ClusterStatusConfig struct {
ClusterStatusCronTime int `env:"CLUSTER_STATUS_CRON_TIME" envDefault:"15"`
}
type DefaultClusterComponent ¶
type EnvDto ¶ added in v0.3.14
type EnvDto struct { EnvironmentId int `json:"environmentId" validate:"number"` EnvironmentName string `json:"environmentName,omitempty" validate:"max=50"` Namespace string `json:"namespace,omitempty" validate:"name-space-component,max=50"` EnvironmentIdentifier string `json:"environmentIdentifier,omitempty"` Description string `json:"description" validate:"max=40"` IsVirtualEnvironment bool `json:"isVirtualEnvironment"` }
type EnvironmentBean ¶
type EnvironmentBean struct { Id int `json:"id,omitempty" validate:"number"` Environment string `json:"environment_name,omitempty" validate:"required,max=50"` ClusterId int `json:"cluster_id,omitempty" validate:"number,required"` ClusterName string `json:"cluster_name,omitempty"` Active bool `json:"active"` Default bool `json:"default"` PrometheusEndpoint string `json:"prometheus_endpoint,omitempty"` Namespace string `json:"namespace,omitempty" validate:"name-space-component,max=50"` CdArgoSetup bool `json:"isClusterCdActive"` EnvironmentIdentifier string `json:"environmentIdentifier"` Description string `json:"description" validate:"max=40"` AppCount int `json:"appCount"` IsVirtualEnvironment bool `json:"isVirtualEnvironment"` AllowedDeploymentTypes []string `json:"allowedDeploymentTypes"` }
type EnvironmentService ¶
type EnvironmentService interface { FindOne(environment string) (*EnvironmentBean, error) Create(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error) GetAll() ([]EnvironmentBean, error) GetAllActive() ([]EnvironmentBean, error) Delete(deleteReq *EnvironmentBean, userId int32) error FindById(id int) (*EnvironmentBean, error) Update(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error) FindClusterByEnvId(id int) (*ClusterBean, error) GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]EnvironmentBean, error) GetEnvironmentOnlyListForAutocomplete() ([]EnvironmentBean, error) FindByIds(ids []*int) ([]*EnvironmentBean, error) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*repository.Environment, error) GetByClusterId(id int) ([]*EnvironmentBean, error) GetCombinedEnvironmentListForDropDown(emailId string, isActionUserSuperAdmin bool, auth func(email string, object []string) map[string]bool) ([]*ClusterEnvDto, error) GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*ClusterEnvDto, error) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap map[int]error, clusterExistInDb bool) }
type EnvironmentServiceImpl ¶
type EnvironmentServiceImpl struct { K8sUtil *util2.K8sUtil // contains filtered or unexported fields }
func NewEnvironmentServiceImpl ¶
func NewEnvironmentServiceImpl(environmentRepository repository.EnvironmentRepository, clusterService ClusterService, logger *zap.SugaredLogger, K8sUtil *util2.K8sUtil, k8sInformerFactory informer.K8sInformerFactory, userAuthService user.UserAuthService, attributesRepository repository2.AttributesRepository) *EnvironmentServiceImpl
func (EnvironmentServiceImpl) Create ¶
func (impl EnvironmentServiceImpl) Create(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error)
func (EnvironmentServiceImpl) Delete ¶ added in v0.3.15
func (impl EnvironmentServiceImpl) Delete(deleteReq *EnvironmentBean, userId int32) error
func (EnvironmentServiceImpl) FindById ¶
func (impl EnvironmentServiceImpl) FindById(id int) (*EnvironmentBean, error)
func (EnvironmentServiceImpl) FindByIds ¶
func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*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) (*EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAll ¶
func (impl EnvironmentServiceImpl) GetAll() ([]EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAllActive ¶
func (impl EnvironmentServiceImpl) GetAllActive() ([]EnvironmentBean, error)
func (EnvironmentServiceImpl) GetByClusterId ¶
func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*EnvironmentBean, error)
func (EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown ¶ added in v0.3.14
func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown(emailId string, isActionUserSuperAdmin bool, auth func(email string, object []string) map[string]bool) ([]*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) ([]*ClusterEnvDto, error)
func (EnvironmentServiceImpl) GetEnvironmentListForAutocomplete ¶
func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]EnvironmentBean, error)
func (EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete ¶ added in v0.6.17
func (impl EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete() ([]EnvironmentBean, error)
func (EnvironmentServiceImpl) HandleErrorInClusterConnections ¶ added in v0.6.18
func (impl EnvironmentServiceImpl) HandleErrorInClusterConnections(clusters []*ClusterBean, respMap map[int]error, 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 *EnvironmentBean, userId int32) (*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"` 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 ResourceGroupingResponse ¶ added in v0.6.24
type ResourceGroupingResponse struct { EnvList []EnvironmentBean `json:"envList"` EnvCount int `json:"envCount"` }
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.