Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourcesForLoad ¶
type ResourcesForLoad struct { Pods []v1.PodApplyConfiguration `json:"pods"` Nodes []v1.NodeApplyConfiguration `json:"nodes"` Pvs []v1.PersistentVolumeApplyConfiguration `json:"pvs"` Pvcs []v1.PersistentVolumeClaimApplyConfiguration `json:"pvcs"` StorageClasses []confstoragev1.StorageClassApplyConfiguration `json:"storageClasses"` PriorityClasses []schedulingcfgv1.PriorityClassApplyConfiguration `json:"priorityClasses"` SchedulerConfig *configv1.KubeSchedulerConfiguration `json:"schedulerConfig"` Namespaces []v1.NamespaceApplyConfiguration `json:"namespaces"` }
ResourcesForLoad indicates all resources and scheduler configuration to be loaded.
func ConvertResourcesForSnapToResourcesForLoad ¶
func ConvertResourcesForSnapToResourcesForLoad(expRes *ResourcesForSnap) (*ResourcesForLoad, error)
ConvertResourcesForSnapToResourcesForLoad returns ResourcesForLoad based on ResourcesForSnap.
type ResourcesForSnap ¶
type ResourcesForSnap struct { Pods []corev1.Pod `json:"pods"` Nodes []corev1.Node `json:"nodes"` Pvs []corev1.PersistentVolume `json:"pvs"` Pvcs []corev1.PersistentVolumeClaim `json:"pvcs"` StorageClasses []storagev1.StorageClass `json:"storageClasses"` PriorityClasses []schedulingv1.PriorityClass `json:"priorityClasses"` SchedulerConfig *configv1.KubeSchedulerConfiguration `json:"schedulerConfig"` Namespaces []corev1.Namespace `json:"namespaces"` }
ResourcesForSnap indicates all resources and scheduler configuration to be snapped.
type SchedulerService ¶
type SchedulerService interface { GetSchedulerConfig() (*configv1.KubeSchedulerConfiguration, error) RestartScheduler(cfg *configv1.KubeSchedulerConfiguration) error }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(client clientset.Interface, schedulers SchedulerService) *Service
func (*Service) IgnoreErr ¶
IgnoreErr is the option to literally ignore errors. If it is enabled, the method won't return any errors, but just log errors as error logs.
func (*Service) IgnoreSchedulerConfiguration ¶
IgnoreSchedulerConfiguration is the option to ignore the scheduler configuration in the given ResourcesForLoad. Note: this option is only for Load method. If it is enabled, the scheduler will not be restarted in load method.
Directories ¶
Path | Synopsis |
---|---|
Package mock_snapshot is a generated GoMock package.
|
Package mock_snapshot is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.