patcher

package
v0.4.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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

type SchedulerPatcher struct {
	Clientset kubernetes.Interface
	logr.Logger
	Client client.Client
}

SchedulerPatcher performs pacthing procedure depends on platform

func (*SchedulerPatcher) Uninstall

Uninstall unpatch Openshift Scheduler

func (*SchedulerPatcher) Update

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

Jump to

Keyboard shortcuts

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