Documentation ¶
Index ¶
- Constants
- func ParseSecretNameForKubelinkInformer(clusterId int) string
- type ClusterDescriptionBean
- type ClusterDescriptionService
- type ClusterDescriptionServiceImpl
- type ClusterService
- type ClusterServiceImpl
- func (impl *ClusterServiceImpl) CheckIfConfigIsValid(cluster *bean.ClusterBean) error
- func (impl *ClusterServiceImpl) ConnectClustersInBatch(clusters []*bean.ClusterBean, clusterExistInDb bool)
- func (impl *ClusterServiceImpl) ConvertClusterBeanObjectToCluster(bean *bean.ClusterBean) *v1alpha1.Cluster
- func (impl *ClusterServiceImpl) ConvertClusterBeanToCluster(clusterBean *bean.ClusterBean, userId int32) *repository.Cluster
- func (impl *ClusterServiceImpl) CreateGrafanaDataSource(clusterBean *bean.ClusterBean, env *repository2.Environment) (int, error)
- func (impl *ClusterServiceImpl) Delete(bean *bean.ClusterBean, userId int32) error
- func (impl *ClusterServiceImpl) DeleteFromDb(bean *bean.ClusterBean, userId int32) (string, error)
- func (impl *ClusterServiceImpl) FetchRolesFromGroup(userId int32) ([]*repository3.RoleModel, error)
- func (impl *ClusterServiceImpl) FindAll() ([]*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllActive() ([]bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllExceptVirtual() ([]*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllForAutoComplete() ([]bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllForClusterByUserId(userId int32, isActionUserSuperAdmin bool) ([]bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindAllNamespacesByUserIdAndClusterId(userId int32, clusterId int, isActionUserSuperAdmin bool) ([]string, error)
- func (impl *ClusterServiceImpl) FindAllWithoutConfig() ([]*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindById(id int) (*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindByIdWithoutConfig(id int) (*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindByIds(ids []int) ([]bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindOne(clusterName string) (*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) FindOneActive(clusterName string) (*bean.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 []*bean.ClusterBean, respMap *sync.Map, clusterExistInDb bool)
- func (impl *ClusterServiceImpl) Save(parent context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) SyncNsInformer(bean *bean.ClusterBean)
- func (impl *ClusterServiceImpl) Update(ctx context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error)
- func (impl *ClusterServiceImpl) UpdateClusterDescription(bean *bean.ClusterBean, userId int32) error
- func (impl *ClusterServiceImpl) ValidateKubeconfig(kubeConfig string) (map[string]*bean.ValidateClusterBean, error)
- type ClusterServiceImplExtended
- func (impl *ClusterServiceImplExtended) CreateGrafanaDataSource(clusterBean *bean.ClusterBean, env *repository.Environment) (int, error)
- func (impl ClusterServiceImplExtended) DeleteFromDb(bean *bean.ClusterBean, userId int32) (string, error)
- func (impl *ClusterServiceImplExtended) FindAll() ([]*bean.ClusterBean, error)
- func (impl *ClusterServiceImplExtended) FindAllExceptVirtual() ([]*bean.ClusterBean, error)
- func (impl *ClusterServiceImplExtended) FindAllWithoutConfig() ([]*bean.ClusterBean, error)
- func (impl *ClusterServiceImplExtended) GetClusterFullModeDTO(beans []*bean.ClusterBean) ([]*bean.ClusterBean, error)
- func (impl *ClusterServiceImplExtended) Save(ctx context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error)
- func (impl *ClusterServiceImplExtended) Update(ctx context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error)
- type EphemeralContainerAdvancedData
- type EphemeralContainerBasicData
- type EphemeralContainerRequest
- type EphemeralContainerService
- type EphemeralContainerServiceImpl
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_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 (
SECRET_NAME = "cluster-event"
)
Variables ¶
This section is empty.
Functions ¶
func ParseSecretNameForKubelinkInformer ¶ added in v1.0.0
Types ¶
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 ClusterService ¶
type ClusterService interface { Save(parent context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error) UpdateClusterDescription(bean *bean.ClusterBean, userId int32) error ValidateKubeconfig(kubeConfig string) (map[string]*bean.ValidateClusterBean, error) FindOne(clusterName string) (*bean.ClusterBean, error) FindOneActive(clusterName string) (*bean.ClusterBean, error) FindAll() ([]*bean.ClusterBean, error) FindAllExceptVirtual() ([]*bean.ClusterBean, error) FindAllWithoutConfig() ([]*bean.ClusterBean, error) FindAllActive() ([]bean.ClusterBean, error) DeleteFromDb(bean *bean.ClusterBean, userId int32) (string, error) FindById(id int) (*bean.ClusterBean, error) FindByIdWithoutConfig(id int) (*bean.ClusterBean, error) FindByIds(id []int) ([]bean.ClusterBean, error) Update(ctx context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error) Delete(bean *bean.ClusterBean, userId int32) error FindAllForAutoComplete() ([]bean.ClusterBean, error) CreateGrafanaDataSource(clusterBean *bean.ClusterBean, env *repository2.Environment) (int, error) GetAllClusterNamespaces() map[string][]string FindAllNamespacesByUserIdAndClusterId(userId int32, clusterId int, isActionUserSuperAdmin bool) ([]string, error) FindAllForClusterByUserId(userId int32, isActionUserSuperAdmin bool) ([]bean.ClusterBean, error) FetchRolesFromGroup(userId int32) ([]*repository3.RoleModel, error) HandleErrorInClusterConnections(clusters []*bean.ClusterBean, respMap *sync.Map, clusterExistInDb bool) ConnectClustersInBatch(clusters []*bean.ClusterBean, clusterExistInDb bool) ConvertClusterBeanToCluster(clusterBean *bean.ClusterBean, userId int32) *repository.Cluster ConvertClusterBeanObjectToCluster(bean *bean.ClusterBean) *v1alpha1.Cluster GetClusterConfigByClusterId(clusterId int) (*k8s.ClusterConfig, 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 *bean.ClusterBean) error
func (*ClusterServiceImpl) ConnectClustersInBatch ¶ added in v0.6.18
func (impl *ClusterServiceImpl) ConnectClustersInBatch(clusters []*bean.ClusterBean, clusterExistInDb bool)
func (*ClusterServiceImpl) ConvertClusterBeanObjectToCluster ¶ added in v0.6.18
func (impl *ClusterServiceImpl) ConvertClusterBeanObjectToCluster(bean *bean.ClusterBean) *v1alpha1.Cluster
func (*ClusterServiceImpl) ConvertClusterBeanToCluster ¶ added in v0.6.18
func (impl *ClusterServiceImpl) ConvertClusterBeanToCluster(clusterBean *bean.ClusterBean, userId int32) *repository.Cluster
func (*ClusterServiceImpl) CreateGrafanaDataSource ¶
func (impl *ClusterServiceImpl) CreateGrafanaDataSource(clusterBean *bean.ClusterBean, env *repository2.Environment) (int, error)
func (*ClusterServiceImpl) Delete ¶
func (impl *ClusterServiceImpl) Delete(bean *bean.ClusterBean, userId int32) error
func (*ClusterServiceImpl) DeleteFromDb ¶ added in v0.3.15
func (impl *ClusterServiceImpl) DeleteFromDb(bean *bean.ClusterBean, userId int32) (string, 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() ([]*bean.ClusterBean, error)
func (*ClusterServiceImpl) FindAllActive ¶
func (impl *ClusterServiceImpl) FindAllActive() ([]bean.ClusterBean, error)
func (*ClusterServiceImpl) FindAllExceptVirtual ¶ added in v0.6.24
func (impl *ClusterServiceImpl) FindAllExceptVirtual() ([]*bean.ClusterBean, error)
func (*ClusterServiceImpl) FindAllForAutoComplete ¶
func (impl *ClusterServiceImpl) FindAllForAutoComplete() ([]bean.ClusterBean, error)
func (*ClusterServiceImpl) FindAllForClusterByUserId ¶ added in v0.6.11
func (impl *ClusterServiceImpl) FindAllForClusterByUserId(userId int32, isActionUserSuperAdmin bool) ([]bean.ClusterBean, error)
func (*ClusterServiceImpl) FindAllNamespacesByUserIdAndClusterId ¶ added in v0.6.11
func (*ClusterServiceImpl) FindAllWithoutConfig ¶ added in v0.6.13
func (impl *ClusterServiceImpl) FindAllWithoutConfig() ([]*bean.ClusterBean, error)
func (*ClusterServiceImpl) FindById ¶
func (impl *ClusterServiceImpl) FindById(id int) (*bean.ClusterBean, error)
func (*ClusterServiceImpl) FindByIdWithoutConfig ¶ added in v0.6.13
func (impl *ClusterServiceImpl) FindByIdWithoutConfig(id int) (*bean.ClusterBean, error)
func (*ClusterServiceImpl) FindByIds ¶
func (impl *ClusterServiceImpl) FindByIds(ids []int) ([]bean.ClusterBean, error)
func (*ClusterServiceImpl) FindOne ¶
func (impl *ClusterServiceImpl) FindOne(clusterName string) (*bean.ClusterBean, error)
func (*ClusterServiceImpl) FindOneActive ¶
func (impl *ClusterServiceImpl) FindOneActive(clusterName string) (*bean.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 []*bean.ClusterBean, respMap *sync.Map, clusterExistInDb bool)
func (*ClusterServiceImpl) Save ¶
func (impl *ClusterServiceImpl) Save(parent context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error)
func (*ClusterServiceImpl) SyncNsInformer ¶ added in v0.3.14
func (impl *ClusterServiceImpl) SyncNsInformer(bean *bean.ClusterBean)
func (*ClusterServiceImpl) Update ¶
func (impl *ClusterServiceImpl) Update(ctx context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error)
func (*ClusterServiceImpl) UpdateClusterDescription ¶ added in v0.6.26
func (impl *ClusterServiceImpl) UpdateClusterDescription(bean *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]*bean.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 *bean.ClusterBean, env *repository.Environment) (int, error)
func (ClusterServiceImplExtended) DeleteFromDb ¶ added in v0.3.15
func (impl ClusterServiceImplExtended) DeleteFromDb(bean *bean.ClusterBean, userId int32) (string, error)
func (*ClusterServiceImplExtended) FindAll ¶ added in v0.3.9
func (impl *ClusterServiceImplExtended) FindAll() ([]*bean.ClusterBean, error)
func (*ClusterServiceImplExtended) FindAllExceptVirtual ¶ added in v0.6.24
func (impl *ClusterServiceImplExtended) FindAllExceptVirtual() ([]*bean.ClusterBean, error)
func (*ClusterServiceImplExtended) FindAllWithoutConfig ¶ added in v0.6.13
func (impl *ClusterServiceImplExtended) FindAllWithoutConfig() ([]*bean.ClusterBean, error)
func (*ClusterServiceImplExtended) GetClusterFullModeDTO ¶ added in v0.6.24
func (impl *ClusterServiceImplExtended) GetClusterFullModeDTO(beans []*bean.ClusterBean) ([]*bean.ClusterBean, error)
func (*ClusterServiceImplExtended) Save ¶ added in v0.3.9
func (impl *ClusterServiceImplExtended) Save(ctx context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, error)
func (*ClusterServiceImplExtended) Update ¶ added in v0.3.9
func (impl *ClusterServiceImplExtended) Update(ctx context.Context, bean *bean.ClusterBean, userId int32) (*bean.ClusterBean, 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.