Documentation ¶
Overview ¶
Package controller is used to provide the core functionalities of machine-controller-manager
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Handle request for worker group enable GPU Package controller is used to provide the core functionalities of machine-controller-manager
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager ¶
Package controller is used to provide the core functionalities of machine-controller-manager
Index ¶
- Constants
- func CreateSetting(namespace string, kubeconfig string) *cli.EnvSettings
- func GetClientForController(credential map[string]string) (*govcd.VCDClient, error)
- func GetVdcByName(client *govcd.VCDClient, Org string, VDC string) (*govcd.Vdc, error)
- func Login(User string, Password string, Org string, HREF string) (*govcd.VCDClient, error)
- func SyncMachineAnnotations(machine *v1alpha1.Machine, node *v1.Node, ...) bool
- func SyncMachineLabels(machine *v1alpha1.Machine, node *v1.Node, lastAppliedLabels map[string]string) bool
- func SyncMachineTaints(machine *v1alpha1.Machine, node *v1.Node, lastAppliedTaints []v1.Taint) bool
- func TryLock(lockC chan<- struct{}, duration time.Duration) bool
- func UnInstallChart(name string, settings *cli.EnvSettings) error
- type Controller
- type ProviderSpec
Constants ¶
const ( // ClassAnnotation is the annotation used to identify a machine class ClassAnnotation = "machine.sapcloud.io/class" // MachineIDAnnotation is the annotation used to identify a machine ID MachineIDAnnotation = "machine.sapcloud.io/id" // MCMFinalizerName is the finalizer used to tag dependecies before deletion // of the object. This finalizer is carried over from the MCM MCMFinalizerName = "machine.sapcloud.io/machine-controller-manager" // MCFinalizerName is the finalizer created for the external // machine controller to differentiate it from the MCMFinalizerName // This finalizer is added only on secret-objects to avoid race between in-tree and out-of-tree controllers. // This is a stopgap solution to resolve: https://github.com/xuanson2406/machine-controller-manager/issues/486. MCFinalizerName = "machine.sapcloud.io/machine-controller" )
const ( GPUChartAlreadyInstalled = 0 GPUChartNotInstalled = 1 InstallPrometheusStack = 2 InstallPrometheusAdapter = 3 )
const ( // OverShootingReplicaCount freeze reason when replica count overshoots OverShootingReplicaCount = "OverShootingReplicaCount" // MachineDeploymentStateSync freeze reason when machineDeployment was found with inconsistent state MachineDeploymentStateSync = "MachineDeploymentStateSync" // TimeoutOccurred freeze reason when machineSet timeout occurs TimeoutOccurred = "MachineSetTimeoutOccurred" // UnfreezeAnnotation indicates the controllers to unfreeze this object UnfreezeAnnotation = "safety.machine.sapcloud.io/unfreeze" )
const ( // AlicloudMachineClassKind is used to identify the machineClassKind as Alicloud AlicloudMachineClassKind = "AlicloudMachineClass" // AWSMachineClassKind is used to identify the machineClassKind as AWS AWSMachineClassKind = "AWSMachineClass" // AzureMachineClassKind is used to identify the machineClassKind as Azure AzureMachineClassKind = "AzureMachineClass" // GCPMachineClassKind is used to identify the machineClassKind as GCP GCPMachineClassKind = "GCPMachineClass" // OpenStackMachineClassKind is used to identify the machineClassKind as OpenStack OpenStackMachineClassKind = "OpenStackMachineClass" // PacketMachineClassKind is used to identify the machineClassKind as Packet PacketMachineClassKind = "PacketMachineClass" // MachineController is the string constant to identify the controller responsible for the migration MachineController = "machine-controller" )
Variables ¶
This section is empty.
Functions ¶
func CreateSetting ¶
func CreateSetting(namespace string, kubeconfig string) *cli.EnvSettings
func GetClientForController ¶
func GetVdcByName ¶
func SyncMachineAnnotations ¶
func SyncMachineAnnotations( machine *v1alpha1.Machine, node *v1.Node, lastAppliedAnnotations map[string]string, ) bool
SyncMachineAnnotations syncs the annotations of the machine with node-objects. It returns true if update is needed else false.
func SyncMachineLabels ¶
func SyncMachineLabels( machine *v1alpha1.Machine, node *v1.Node, lastAppliedLabels map[string]string, ) bool
SyncMachineLabels syncs the labels of the machine with node-objects. It returns true if update is needed else false.
func SyncMachineTaints ¶
func SyncMachineTaints( machine *v1alpha1.Machine, node *v1.Node, lastAppliedTaints []v1.Taint, ) bool
SyncMachineTaints syncs the taints of the machine with node-objects. It returns true if update is needed else false.
func TryLock ¶ added in v1.0.5
TryLock tries to write to channel. It times out after specified duration
func UnInstallChart ¶
func UnInstallChart(name string, settings *cli.EnvSettings) error
Types ¶
type Controller ¶
type Controller interface { // Run runs the controller until the given stop channel can be read from. // workers specifies the number of goroutines, per resource, processing work // from the resource workqueues Run(workers int, stopCh <-chan struct{}) }
Controller describes a controller for
func NewController ¶
func NewController( namespace string, controlMachineClient machineapi.MachineV1alpha1Interface, controlCoreClient kubernetes.Interface, targetCoreClient kubernetes.Interface, driver driver.Driver, pvcInformer coreinformers.PersistentVolumeClaimInformer, pvInformer coreinformers.PersistentVolumeInformer, secretInformer coreinformers.SecretInformer, nodeInformer coreinformers.NodeInformer, pdbV1beta1Informer policyv1beta1informers.PodDisruptionBudgetInformer, pdbV1Informer policyv1informers.PodDisruptionBudgetInformer, volumeAttachmentInformer storageinformers.VolumeAttachmentInformer, machineClassInformer machineinformers.MachineClassInformer, machineInformer machineinformers.MachineInformer, recorder record.EventRecorder, safetyOptions options.SafetyOptions, nodeConditions string, bootstrapTokenAuthExtraGroups string, targetKubernetesVersion *semver.Version, ) (Controller, error)
NewController returns a new Node controller.
type ProviderSpec ¶
type ProviderSpec struct { ClusterName string `json:"cluster,omitempty"` WorkerPoolName string `json:"workerPoolName,omitempty"` NetworkName string `json:"networkName,omitempty"` IPMode string `json:"ipMode,omitempty"` NetworkAdapterType string `json:"networkAdapterType,omitempty"` IsPrimary bool `json:"isPrimary,omitempty"` VappTemplate string `json:"vAppTemplateName,omitempty"` Catalog string `json:"catalogName,omitempty"` VCPU int `json:"vCPU,omitempty"` VGPU string `json:"vGPU,omitempty"` VGpuId string `json:"vGpuId,omitempty"` RAM int `json:"ram,omitempty"` Disk int `json:"disk,omitempty"` PublicKey string `json:"publicKey,omitempty"` Storagepolicy string `json:"storagePolicy,omitempty"` ApiUrl string `json:"apiUrl,omitempty"` VpcID string `json:"vpcID,omitempty"` BackendPortalToken string `json:"backendPortalToken,omitempty"` VpcToken string `json:"vpcToken,omitempty"` Zone string `json:"zone,omitempty"` // this field will use in future version }
ProviderSpec is the spec to be used while parsing the calls.
func DecodeProviderSpecFromMachineClass ¶
func DecodeProviderSpecFromMachineClass(machineClass *v1alpha1.MachineClass) (*ProviderSpec, error)