Documentation ¶
Index ¶
- Constants
- func ChooseKubeSchedulerLabel(csi *csibaremetalv1.Deployment) (string, string, error)
- func IsPatchingEnabled(csi *csibaremetalv1.Deployment) bool
- type ExtenderReadinessOptions
- type ReadinessStatus
- type ReadinessStatusList
- type SchedulerPatcher
- func (p *SchedulerPatcher) Uninstall(ctx context.Context, csi *csibaremetalv1.Deployment) error
- func (p *SchedulerPatcher) Update(ctx context.Context, csi *csibaremetalv1.Deployment, scheme *runtime.Scheme) error
- func (p *SchedulerPatcher) UpdateReadinessConfigMap(ctx context.Context, csi *csibaremetalv1.Deployment, scheme *runtime.Scheme) error
Constants ¶
const ( // ExtenderConfigMapName - the configmap, which contains statuses of kube-scheduler restart ExtenderConfigMapName = "extender-readiness" // ExtenderConfigMapPath - the path to ExtenderConfigMap ExtenderConfigMapPath = "/status" // ExtenderConfigMapFile - ExtenderConfigMap data key ExtenderConfigMapFile = "nodes.yaml" )
TODO import from csi-baremetal - https://github.com/dell/csi-baremetal/issues/475
const ( // PlatformVanilla - vanilla platform key PlatformVanilla = "vanilla" // PlatformRKE - RKE platform key PlatformRKE = "rke" // PlatformOpenshift - openshift platform key PlatformOpenshift = "openshift" )
Variables ¶
This section is empty.
Functions ¶
func ChooseKubeSchedulerLabel ¶
func ChooseKubeSchedulerLabel(csi *csibaremetalv1.Deployment) (string, string, error)
ChooseKubeSchedulerLabel creates a label value and key to find kube-scheduler
func IsPatchingEnabled ¶
func IsPatchingEnabled(csi *csibaremetalv1.Deployment) bool
IsPatchingEnabled checks platform filed and returns true if platform is allowed
Types ¶
type ExtenderReadinessOptions ¶
type ExtenderReadinessOptions struct {
// contains filtered or unexported fields
}
ExtenderReadinessOptions contains options to deploy ExtenderConfigMap
func NewExtenderReadinessOptions ¶
func NewExtenderReadinessOptions(csi *csibaremetalv1.Deployment) (*ExtenderReadinessOptions, error)
NewExtenderReadinessOptions creates ExtenderReadinessOptions
type ReadinessStatus ¶
type ReadinessStatus struct { NodeName string `yaml:"node_name"` KubeScheduler string `yaml:"kube_scheduler"` Restarted bool `yaml:"restarted"` }
ReadinessStatus contains restart status of one kube-scheduler
type ReadinessStatusList ¶
type ReadinessStatusList struct {
Items []ReadinessStatus `yaml:"nodes"`
}
ReadinessStatusList contains statuses of all kube-schedulers in cluster
type SchedulerPatcher ¶
SchedulerPatcher performs pacthing procedure depends on platform
func (*SchedulerPatcher) Uninstall ¶
func (p *SchedulerPatcher) Uninstall(ctx context.Context, csi *csibaremetalv1.Deployment) error
Uninstall unpatch Openshift Scheduler
func (*SchedulerPatcher) Update ¶
func (p *SchedulerPatcher) Update(ctx context.Context, csi *csibaremetalv1.Deployment, scheme *runtime.Scheme) error
Update updates or creates csi-baremetal-se-patcher on RKE and Vanilla patches Kube-Scheduler on Openshift
func (*SchedulerPatcher) UpdateReadinessConfigMap ¶
func (p *SchedulerPatcher) UpdateReadinessConfigMap(ctx context.Context, csi *csibaremetalv1.Deployment, scheme *runtime.Scheme) error
UpdateReadinessConfigMap collects info about ExtenderReadiness statuses and updates configmap