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" K8sMasterNodeLabelKey = "node-role.kubernetes.io/master" )
TODO import from csi-baremetal - https://github.com/dell/csi-baremetal/issues/475
const ( // OpenshiftSecondarySchedulerLabelValue - Openshift Secondary Scheduler Pod Label Value OpenshiftSecondarySchedulerLabelValue = "secondary-scheduler" // OpenshiftSecondarySchedulerNamespace - Namespace for Openshift Secondary Scheduler Resources OpenshiftSecondarySchedulerNamespace = "openshift-secondary-scheduler-operator" )
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 enable flag and platform field Returns true if patcher enabled and platform is allowed, false otherwise
Types ¶
type ExtenderReadinessOptions ¶
type ExtenderReadinessOptions struct {
// contains filtered or unexported fields
}
ExtenderReadinessOptions contains options to deploy ExtenderConfigMap
func NewExtenderReadinessOptions ¶
func NewExtenderReadinessOptions(csi *csibaremetalv1.Deployment, useOpenshiftSecondaryScheduler bool) (*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 ¶
type SchedulerPatcher struct { Clientset kubernetes.Interface Log *logrus.Entry Client client.Client PodSecurityPolicyVerifier securityverifier.SecurityVerifier // will only set on Openshift KubernetesVersion string // whether use secondary scheduler on Openshift UseOpenshiftSecondaryScheduler bool // SelectedSchedulerExtenderIP used for openshift secondary scheduler extender config if applicable SelectedSchedulerExtenderIP string // The suffix pattern used to check whether the scheduler extender workable on Openshift with 2nd scheduler ExtenderPatternChecked string // HTTPClient used for openshift secondary scheduler extender config if applicable HTTPClient *http.Client }
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, useOpenshiftSecondaryScheduler bool) error
UpdateReadinessConfigMap collects info about ExtenderReadiness statuses and updates configmap