k8sbm

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DockerUser string

Functions

func NewPlatform

func NewPlatform() platform.Platform

func UpdateDockerUser

func UpdateDockerUser(ctx context.Context, client ssh.Client) error

Types

type K8sBareMetalPlatform

type K8sBareMetalPlatform struct {
	FlavorList []*edgeproto.FlavorInfo
	// contains filtered or unexported fields
}

The K8sBareMetalPlatform is a single Kubernetes cluster running on bare metal. The Controller will create a single ClusterInst that represents this entire Cloudlet. The ClusterInst may either be multi-tenant, or (TODO) it may be non-MT but dedicated to a single organization.

func (*K8sBareMetalPlatform) ActiveChanged

func (k *K8sBareMetalPlatform) ActiveChanged(ctx context.Context, platformActive bool) error

func (*K8sBareMetalPlatform) AssignFreeLbIp

func (k *K8sBareMetalPlatform) AssignFreeLbIp(ctx context.Context, name string, client ssh.Client) (string, error)

AssignFreeLbIp returns externalIp

func (*K8sBareMetalPlatform) ChangeAppInstDNS

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

func (*K8sBareMetalPlatform) ChangeCloudletDNS

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

func (*K8sBareMetalPlatform) ChangeClusterInstDNS

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

func (*K8sBareMetalPlatform) CreateAppInst

func (k *K8sBareMetalPlatform) CreateAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, appInst *edgeproto.AppInst, appInstFlavor *edgeproto.Flavor, updateSender edgeproto.AppInstInfoSender) error

func (*K8sBareMetalPlatform) CreateCloudlet

func (k *K8sBareMetalPlatform) 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 (*K8sBareMetalPlatform) CreateClusterInst

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

func (*K8sBareMetalPlatform) DeleteAppInst

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

func (*K8sBareMetalPlatform) DeleteCloudlet

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

func (*K8sBareMetalPlatform) DeleteClusterInst

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

func (*K8sBareMetalPlatform) DeleteTrustPolicyException

func (k *K8sBareMetalPlatform) DeleteTrustPolicyException(ctx context.Context, TrustPolicyExceptionKey *edgeproto.TrustPolicyExceptionKey, clusterKey *edgeproto.ClusterKey) error

func (*K8sBareMetalPlatform) GatherCloudletInfo

func (k *K8sBareMetalPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error

func (*K8sBareMetalPlatform) GetAppInstRuntime

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

func (*K8sBareMetalPlatform) GetCloudletInfraResources

func (k *K8sBareMetalPlatform) GetCloudletInfraResources(ctx context.Context) (*edgeproto.InfraResourcesSnapshot, error)

TODO

func (*K8sBareMetalPlatform) GetCloudletKubeConfig

func (k *K8sBareMetalPlatform) GetCloudletKubeConfig(cloudletKey *edgeproto.CloudletKey) string

GetCloudletKubeConfig returns the kconf for the default cluster

func (*K8sBareMetalPlatform) GetCloudletManifest

func (k *K8sBareMetalPlatform) 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 (*K8sBareMetalPlatform) GetClusterAdditionalResourceMetric

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

TODO

func (*K8sBareMetalPlatform) GetClusterAdditionalResources

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

TODO

func (*K8sBareMetalPlatform) GetClusterInfraResources

func (k *K8sBareMetalPlatform) GetClusterInfraResources(ctx context.Context, cluster *edgeproto.ClusterInst) (*edgeproto.InfraResources, error)

TODO

func (*K8sBareMetalPlatform) GetClusterMasterNodeIp

func (k *K8sBareMetalPlatform) GetClusterMasterNodeIp(ctx context.Context, client ssh.Client, kconfName string) (string, error)

func (*K8sBareMetalPlatform) GetClusterPlatformClient

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

func (*K8sBareMetalPlatform) GetConsoleUrl

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

func (*K8sBareMetalPlatform) GetContainerCommand

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

func (*K8sBareMetalPlatform) GetControlAccessIp

func (k *K8sBareMetalPlatform) GetControlAccessIp() string

func (*K8sBareMetalPlatform) GetDefaultCluster

func (k *K8sBareMetalPlatform) GetDefaultCluster(cloudletKey *edgeproto.CloudletKey) *edgeproto.ClusterInst

func (*K8sBareMetalPlatform) GetExternalEthernetInterface

func (k *K8sBareMetalPlatform) GetExternalEthernetInterface() string

func (*K8sBareMetalPlatform) GetExternalIpRanges

func (k *K8sBareMetalPlatform) GetExternalIpRanges() string

func (*K8sBareMetalPlatform) GetFeatures

func (*K8sBareMetalPlatform) GetInitHAConditionalCompatibilityVersion

func (k *K8sBareMetalPlatform) GetInitHAConditionalCompatibilityVersion(ctx context.Context) string

func (*K8sBareMetalPlatform) GetLbName

func (k *K8sBareMetalPlatform) GetLbName(ctx context.Context, appInst *edgeproto.AppInst) string

func (*K8sBareMetalPlatform) GetNodeInfos

func (k *K8sBareMetalPlatform) GetNodeInfos(ctx context.Context) ([]*edgeproto.NodeInfo, error)

func (*K8sBareMetalPlatform) GetNodePlatformClient

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

func (*K8sBareMetalPlatform) GetRestrictedCloudletStatus

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

func (*K8sBareMetalPlatform) GetRootLBClients

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

func (*K8sBareMetalPlatform) GetRootLBFlavor

func (k *K8sBareMetalPlatform) GetRootLBFlavor(ctx context.Context) (*edgeproto.Flavor, error)

func (*K8sBareMetalPlatform) GetUsedSecondaryIpAddresses

func (k *K8sBareMetalPlatform) GetUsedSecondaryIpAddresses(ctx context.Context, client ssh.Client, devname string) (map[string]string, error)

GetUsedSecondaryIpAddresses gets a map of address->interface name of IPs current in use on the device

func (*K8sBareMetalPlatform) GetVersionProperties

func (k *K8sBareMetalPlatform) GetVersionProperties(ctx context.Context) map[string]string

func (*K8sBareMetalPlatform) HandleFedAppInstCb

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

func (*K8sBareMetalPlatform) InitCommon

func (*K8sBareMetalPlatform) InitHAConditional

func (k *K8sBareMetalPlatform) InitHAConditional(ctx context.Context, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sBareMetalPlatform) IsCloudletServicesLocal

func (k *K8sBareMetalPlatform) IsCloudletServicesLocal() bool

func (*K8sBareMetalPlatform) ListCloudletMgmtNodes

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

func (*K8sBareMetalPlatform) NameSanitize

func (k *K8sBareMetalPlatform) NameSanitize(name string) string

func (*K8sBareMetalPlatform) PerformUpgrades

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

func (*K8sBareMetalPlatform) RemoveIp

func (k *K8sBareMetalPlatform) RemoveIp(ctx context.Context, client ssh.Client, addr, dev, name string) error

func (*K8sBareMetalPlatform) RemoveWhitelistSecurityRules

func (k *K8sBareMetalPlatform) RemoveWhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error

func (*K8sBareMetalPlatform) SetPowerState

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

func (*K8sBareMetalPlatform) SetupLb

func (k *K8sBareMetalPlatform) SetupLb(ctx context.Context, client ssh.Client, lbname string) error

func (*K8sBareMetalPlatform) UpdateAppInst

func (k *K8sBareMetalPlatform) UpdateAppInst(ctx context.Context, clusterInst *edgeproto.ClusterInst, app *edgeproto.App, appInst *edgeproto.AppInst, appInstFlavor *edgeproto.Flavor, updateCallback edgeproto.CacheUpdateCallback) error

func (*K8sBareMetalPlatform) UpdateCloudlet

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

func (*K8sBareMetalPlatform) UpdateClusterInst

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

func (*K8sBareMetalPlatform) UpdateTrustPolicy

func (k *K8sBareMetalPlatform) UpdateTrustPolicy(ctx context.Context, TrustPolicy *edgeproto.TrustPolicy) error

func (*K8sBareMetalPlatform) UpdateTrustPolicyException

func (k *K8sBareMetalPlatform) UpdateTrustPolicyException(ctx context.Context, TrustPolicyException *edgeproto.TrustPolicyException, clusterKey *edgeproto.ClusterKey) error

func (*K8sBareMetalPlatform) VerifyVMs

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

func (*K8sBareMetalPlatform) WhitelistSecurityRules

func (k *K8sBareMetalPlatform) WhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error

type LbInfo

type LbInfo struct {
	Name            string
	ExternalIpAddr  string
	LbListenDevName string
}

Jump to

Keyboard shortcuts

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