k8sop

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const NoKubeconfig = ""

k8s operator runs the crm as a pod inside the cluster it managers with rbac perms to be able to run kubectl in the pod. So no kubeconfig is needed.

View Source
const WorkingDir = "/root/config"

Working dir corresponds to the persistent volume claim in the cloudlet operator.

Variables

This section is empty.

Functions

func NewPlatform

func NewPlatform() platform.Platform

Types

type K8sOperator

type K8sOperator struct {
	Type     string
	CommonPf infracommon.CommonPlatform

	infracommon.CommonEmbedded
	// contains filtered or unexported fields
}

func (*K8sOperator) ActiveChanged

func (s *K8sOperator) ActiveChanged(ctx context.Context, platformActive bool) error

func (*K8sOperator) ChangeAppInstDNS

func (v *K8sOperator) ChangeAppInstDNS(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst, OldURI string, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) ChangeCloudletDNS

func (s *K8sOperator) ChangeCloudletDNS(ctx context.Context, cloudlet *edgeproto.Cloudlet, oldFqdn string, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) ChangeClusterInstDNS

func (s *K8sOperator) ChangeClusterInstDNS(ctx context.Context, clusterInst *edgeproto.ClusterInst, oldFqdn string, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) CreateAppInst

func (s *K8sOperator) CreateAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, appInst *edgeproto.AppInst, flavor *edgeproto.Flavor, updateSender edgeproto.AppInstInfoSender) error

func (*K8sOperator) CreateCloudlet

func (s *K8sOperator) CreateCloudlet(ctx context.Context, cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, pfInitConfig *platform.PlatformInitConfig, flavor *edgeproto.Flavor, caches *platform.Caches, updateCallback edgeproto.CacheUpdateCallback) (bool, error)

func (*K8sOperator) CreateClusterInst

func (s *K8sOperator) CreateClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, updateCallback edgeproto.CacheUpdateCallback, timeout time.Duration) error

func (*K8sOperator) DeleteAppInst

func (s *K8sOperator) DeleteAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, appInst *edgeproto.AppInst, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) DeleteCloudlet

func (s *K8sOperator) DeleteCloudlet(ctx context.Context, cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, pfInitConfig *platform.PlatformInitConfig, caches *platform.Caches, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) DeleteClusterInst

func (s *K8sOperator) DeleteClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) DeleteTrustPolicyException

func (s *K8sOperator) DeleteTrustPolicyException(ctx context.Context, TrustPolicyExceptionKey *edgeproto.TrustPolicyExceptionKey, clusterKey *edgeproto.ClusterKey) error

func (*K8sOperator) GatherCloudletInfo

func (s *K8sOperator) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error

func (*K8sOperator) GetAppInstRuntime

func (s *K8sOperator) GetAppInstRuntime(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, appInst *edgeproto.AppInst) (*edgeproto.AppInstRuntime, error)

func (*K8sOperator) GetCloudletInfraResources

func (s *K8sOperator) GetCloudletInfraResources(ctx context.Context) (*edgeproto.InfraResourcesSnapshot, error)

func (*K8sOperator) GetCloudletInfraResourcesInfo

func (k *K8sOperator) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)

TODO

func (*K8sOperator) GetCloudletManifest

func (s *K8sOperator) GetCloudletManifest(ctx context.Context, cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, pfInitConfig *platform.PlatformInitConfig, accessApi platform.AccessApi, flavor *edgeproto.Flavor, caches *platform.Caches) (*edgeproto.CloudletManifest, error)

func (*K8sOperator) GetClusterAdditionalResourceMetric

func (k *K8sOperator) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, resources []edgeproto.VMResource) error

TODO

func (*K8sOperator) GetClusterAdditionalResources

func (k *K8sOperator) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, vmResources []edgeproto.VMResource, infraResMap map[string]edgeproto.InfraResource) map[string]edgeproto.InfraResource

TODO

func (*K8sOperator) GetClusterInfraResources

func (s *K8sOperator) GetClusterInfraResources(ctx context.Context, cluster *edgeproto.ClusterInst) (*edgeproto.InfraResources, error)

func (*K8sOperator) GetClusterPlatformClient

func (s *K8sOperator) GetClusterPlatformClient(ctx context.Context, clusterInst *edgeproto.ClusterInst, clientType string) (ssh.Client, error)

func (*K8sOperator) GetConsoleUrl

func (s *K8sOperator) GetConsoleUrl(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst) (string, error)

func (*K8sOperator) GetContainerCommand

func (s *K8sOperator) GetContainerCommand(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, appInst *edgeproto.AppInst, req *edgeproto.ExecRequest) (string, error)

func (*K8sOperator) GetFeatures

func (s *K8sOperator) GetFeatures() *edgeproto.PlatformFeatures

func (*K8sOperator) GetInitHAConditionalCompatibilityVersion

func (s *K8sOperator) GetInitHAConditionalCompatibilityVersion(ctx context.Context) string

func (*K8sOperator) GetNodePlatformClient

func (s *K8sOperator) GetNodePlatformClient(ctx context.Context, node *edgeproto.CloudletMgmtNode, ops ...pc.SSHClientOp) (ssh.Client, error)

func (*K8sOperator) GetRestrictedCloudletStatus

func (s *K8sOperator) GetRestrictedCloudletStatus(ctx context.Context, cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, accessApi platform.AccessApi, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) GetRootLBClients

func (s *K8sOperator) GetRootLBClients(ctx context.Context) (map[string]platform.RootLBClient, error)

func (*K8sOperator) GetRootLBFlavor

func (s *K8sOperator) GetRootLBFlavor(ctx context.Context) (*edgeproto.Flavor, error)

func (*K8sOperator) HandleFedAppInstCb

func (s *K8sOperator) HandleFedAppInstCb(ctx context.Context, msg *edgeproto.FedAppInstEvent)

func (*K8sOperator) InitCommon

func (s *K8sOperator) InitCommon(ctx context.Context, platformConfig *platform.PlatformConfig, caches *platform.Caches, haMgr *redundancy.HighAvailabilityManager, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) InitHAConditional

func (s *K8sOperator) InitHAConditional(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) ListCloudletMgmtNodes

func (s *K8sOperator) ListCloudletMgmtNodes(ctx context.Context, clusterInsts []edgeproto.ClusterInst, vmAppInsts []edgeproto.AppInst) ([]edgeproto.CloudletMgmtNode, error)

func (*K8sOperator) NameSanitize

func (s *K8sOperator) NameSanitize(name string) string

func (*K8sOperator) PerformUpgrades

func (s *K8sOperator) PerformUpgrades(ctx context.Context, caches *platform.Caches, cloudletState dme.CloudletState) error

func (*K8sOperator) SetPowerState

func (s *K8sOperator) SetPowerState(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) SetupKconf

func (s *K8sOperator) SetupKconf(ctx context.Context, clusterInst *edgeproto.ClusterInst) error

func (*K8sOperator) UpdateAppInst

func (s *K8sOperator) UpdateAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, appInst *edgeproto.AppInst, flavor *edgeproto.Flavor, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) UpdateCloudlet

func (s *K8sOperator) UpdateCloudlet(ctx context.Context, cloudlet *edgeproto.Cloudlet, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) UpdateClusterInst

func (s *K8sOperator) UpdateClusterInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sOperator) UpdateTrustPolicy

func (s *K8sOperator) UpdateTrustPolicy(ctx context.Context, TrustPolicy *edgeproto.TrustPolicy) error

func (*K8sOperator) UpdateTrustPolicyException

func (s *K8sOperator) UpdateTrustPolicyException(ctx context.Context, TrustPolicyException *edgeproto.TrustPolicyException, clusterKey *edgeproto.ClusterKey) error

func (*K8sOperator) VerifyVMs

func (s *K8sOperator) VerifyVMs(ctx context.Context, vms []edgeproto.VM) error

Jump to

Keyboard shortcuts

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