k8sInformer

package
v0.0.0-...-1859c74 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HELM_RELEASE_SECRET_TYPE         = "helm.sh/release.v1"
	CLUSTER_MODIFY_EVENT_SECRET_TYPE = "cluster.request/modify"
	DEFAULT_CLUSTER                  = "default_cluster"
	INFORMER_ALREADY_EXIST_MESSAGE   = "INFORMER_ALREADY_EXIST"
	ADD                              = "add"
	UPDATE                           = "update"
	DELETE                           = "delete"
)

Variables

View Source
var (
	ErrorCacheMissReleaseNotFound = errors.New("release not found in cache")
)

Functions

This section is empty.

Types

type ClusterSecretUpdateListener

type ClusterSecretUpdateListener interface {
	OnStateChange(clusterId int, action string)
}

type K8sInformer

type K8sInformer interface {
	GetAllReleaseByClusterId(clusterId int) []*client.DeployedAppDetail
	CheckReleaseExists(clusterId int32, releaseIdentifier string) bool
	GetClusterClientSet(clusterInfo bean.ClusterInfo) (*kubernetes.Clientset, error)
	RegisterListener(listener ClusterSecretUpdateListener)
	GetReleaseDetails(clusterId int32, releaseIdentifier string) (*client.DeployedAppDetail, error)
	// contains filtered or unexported methods
}

type K8sInformerImpl

type K8sInformerImpl struct {
	HelmListClusterMap map[int]map[string]*client.DeployedAppDetail
	// contains filtered or unexported fields
}

func Newk8sInformerImpl

func Newk8sInformerImpl(logger *zap.SugaredLogger, clusterRepository repository.ClusterRepository,
	helmReleaseConfig *globalConfig.HelmReleaseConfig, k8sUtil k8sUtils.K8sService,
	converter converter.ClusterBeanConverter, runnable *async.Runnable) (*K8sInformerImpl, error)

func (*K8sInformerImpl) BuildInformerForAllClusters

func (impl *K8sInformerImpl) BuildInformerForAllClusters(clusterInfos []*bean.ClusterInfo) error

func (*K8sInformerImpl) CheckReleaseExists

func (impl *K8sInformerImpl) CheckReleaseExists(clusterId int32, releaseIdentifier string) bool

func (*K8sInformerImpl) GetAllReleaseByClusterId

func (impl *K8sInformerImpl) GetAllReleaseByClusterId(clusterId int) []*client.DeployedAppDetail

func (*K8sInformerImpl) GetClusterClientSet

func (impl *K8sInformerImpl) GetClusterClientSet(clusterInfo bean.ClusterInfo) (*kubernetes.Clientset, error)

func (*K8sInformerImpl) GetReleaseDetails

func (impl *K8sInformerImpl) GetReleaseDetails(clusterId int32, releaseIdentifier string) (*client.DeployedAppDetail, error)

func (*K8sInformerImpl) OnStateChange

func (impl *K8sInformerImpl) OnStateChange(clusterId int, action string)

func (*K8sInformerImpl) RegisterListener

func (impl *K8sInformerImpl) RegisterListener(listener ClusterSecretUpdateListener)

type ReleaseDto

type ReleaseDto struct {
	*release.Release
}

Jump to

Keyboard shortcuts

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