ccrm

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const RedisKeepAliveInterval = 3 * time.Second
View Source
const RouteNode = "confignode"

Variables

View Source
var (
	// TODO: This needs to be configurable
	DefaultPlatformFlavor = edgeproto.Flavor{
		Key:   cloudcommon.DefaultPlatformFlavorKey,
		Vcpus: 2,
		Ram:   4096,
		Disk:  20,
	}
)
View Source
var ErrIgnoreForCrmOnEdge = errors.New("ignoring request because crmOnEdge is set")
View Source
var ErrPlatformNotFound = errors.New("platform not found")

Functions

This section is empty.

Types

type CCRM

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

CCRM handles platform-specific code. It primarily converts notify-based events into platform API calls. CCRM should run alongside the Controller.

func NewCCRM

func NewCCRM(nodeType string, platformBuilders map[string]platform.PlatformBuilder) *CCRM

NewCCRM creates a new CCRM. The nodeType identifies the service if there are other 3rd party CCRMs present, allowing requests for certain platforms to be directed to the correct CCRM type. New implementations must use their own unique node type. PlatformBuilders provide the platforms supported by the CCRM.

func (*CCRM) InitFlags

func (s *CCRM) InitFlags()

func (*CCRM) Run

func (s *CCRM) Run()

func (*CCRM) Start

func (s *CCRM) Start() error

Start requires that flag.Parse() was called.

func (*CCRM) Stop

func (s *CCRM) Stop()

type CCRMCaches

type CCRMCaches struct {
	PlatformFeaturesCache edgeproto.PlatformFeaturesCache
	CloudletNodeCache     edgeproto.CloudletNodeCache
	AppInstInfoCache      edgeproto.AppInstInfoCache
	CloudletInfoCache     edgeproto.CloudletInfoCache
	ClusterInstInfoCache  edgeproto.ClusterInstInfoCache
}

func (*CCRMCaches) Init

func (s *CCRMCaches) Init(ctx context.Context)

type CCRMHandler

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

func (*CCRMHandler) ApplyAppInst

ApplyAppInst implements a GRPC AppInstPlatform server method

func (*CCRMHandler) ApplyCloudlet

ApplyCloudlet implements a GRPC CloudletPlatform server method

func (*CCRMHandler) ApplyClusterInst

ApplyClusterInst implements a GRPC ClusterInstPlatform server method

func (*CCRMHandler) ApplyTrustPolicyException

func (s *CCRMHandler) ApplyTrustPolicyException(ctx context.Context, in *edgeproto.TPEInstanceState) (*edgeproto.Result, error)

func (*CCRMHandler) CreateCloudletNodeReq

func (s *CCRMHandler) CreateCloudletNodeReq(ctx context.Context, node *edgeproto.CloudletNode) (string, error)

func (*CCRMHandler) DeleteCloudletNodeReq

func (s *CCRMHandler) DeleteCloudletNodeReq(ctx context.Context, nodeKey *edgeproto.CloudletNodeKey) error

func (*CCRMHandler) GetCloudletManifest

func (s *CCRMHandler) GetCloudletManifest(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.CloudletManifest, error)

func (*CCRMHandler) GetCloudletResources

func (s *CCRMHandler) GetCloudletResources(ctx context.Context, in *edgeproto.Cloudlet) (*edgeproto.InfraResourceMap, error)

func (*CCRMHandler) GetClusterAdditionalResourceMetric

func (s *CCRMHandler) GetClusterAdditionalResourceMetric(ctx context.Context, in *edgeproto.ClusterResourceMetricReq) (*edgeproto.Metric, error)

func (*CCRMHandler) GetClusterAdditionalResources

func (s *CCRMHandler) GetClusterAdditionalResources(ctx context.Context, in *edgeproto.ClusterResourcesReq) (*edgeproto.InfraResourceMap, error)

func (*CCRMHandler) GetPlatformCache

func (s *CCRMHandler) GetPlatformCache() *CRMPlatformCache

func (*CCRMHandler) GetRootLbFlavor

func (s *CCRMHandler) GetRootLbFlavor(ctx context.Context, in *edgeproto.CloudletKey) (*edgeproto.Flavor, error)

func (*CCRMHandler) Init

func (s *CCRMHandler) Init(ctx context.Context, nodeMgr *node.NodeMgr, caches *CCRMCaches, platformBuilders map[string]platform.PlatformBuilder, flags *Flags, registryAuthAPI cloudcommon.RegistryAuthApi)

func (*CCRMHandler) InitConnectivity

func (s *CCRMHandler) InitConnectivity(client *notify.Client, kvstore objstore.KVStore, nodeMgr *node.NodeMgr, grpcServer *grpc.Server, sync edgeproto.DataSync)

func (*CCRMHandler) NameSanitize

func (s *CCRMHandler) NameSanitize(ctx context.Context, in *edgeproto.NameSanitizeReq) (*edgeproto.Result, error)

func (*CCRMHandler) ProcessExecRequest

func (s *CCRMHandler) ProcessExecRequest(ctx context.Context, in *edgeproto.CloudletExecReq) (*edgeproto.ExecRequest, error)

func (*CCRMHandler) RecvFedAppInstEvent

func (s *CCRMHandler) RecvFedAppInstEvent(ctx context.Context, msg *edgeproto.FedAppInstEvent)

func (*CCRMHandler) RefreshCerts

func (s *CCRMHandler) RefreshCerts(ctx context.Context, in *edgeproto.Cloudlet) (*edgeproto.Result, error)

func (*CCRMHandler) Start

func (s *CCRMHandler) Start(ctx context.Context, ctrlConn *grpc.ClientConn)

func (*CCRMHandler) Stop

func (s *CCRMHandler) Stop()

type CRMPlatformCache

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

func (*CRMPlatformCache) Delete

func (s *CRMPlatformCache) Delete(key *edgeproto.CloudletKey)

func (*CRMPlatformCache) Get

func (*CRMPlatformCache) GetAll

func (s *CRMPlatformCache) GetAll() []platform.Platform

func (*CRMPlatformCache) Init

func (s *CRMPlatformCache) Init()

func (*CRMPlatformCache) Set

type Flags

type Flags struct {
	Region                        string
	AppDNSRoot                    string
	DnsZone                       string
	CloudletRegistryPath          string
	CloudletVMImagePath           string
	APIAddr                       string
	EtcdURLs                      string
	EnvoyWithCurlImage            string
	NginxWithCurlImage            string
	VersionTag                    string
	CommercialCerts               bool
	ControllerAPIAddr             string
	ControllerNotifyAddr          string
	ControllerPublicNotifyAddr    string
	ControllerPublicAccessApiAddr string
	AnsibleListenAddr             string
	AnsiblePublicAddr             string
	ThanosRecvAddr                string
	FederationExternalAddr        string
	DebugLevels                   string
	TestMode                      bool
}

func (*Flags) GetPlatformRegistryPath

func (s *Flags) GetPlatformRegistryPath() string

func (*Flags) Init

func (s *Flags) Init()

type MessageHandler

type MessageHandler func(ctx context.Context, redisMsg *redis.Message) error

type NodeAttributesCache

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

func (*NodeAttributesCache) Get

func (*NodeAttributesCache) Init

func (s *NodeAttributesCache) Init()

func (*NodeAttributesCache) Update

func (s *NodeAttributesCache) Update(key edgeproto.CloudletNodeKey, yamlData []byte, checksum string)

type NodeAttributesData

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

Jump to

Keyboard shortcuts

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