k8s

package
v2.3.19+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// k8s annotations for create pod
	YUNION_CNI_NETWORK_ANNOTATION = "cni.yunion.io/network"
	YUNION_CNI_IPADDR_ANNOTATION  = "cni.yunion.io/ip"
)
View Source
const (
	YUNION_CSI_STORAGECLASS = "csi-yunion"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostStatusPredicate

type HostStatusPredicate struct{}

func (*HostStatusPredicate) Clone

func (p *HostStatusPredicate) Clone() IPredicate

func (*HostStatusPredicate) Execute

func (p *HostStatusPredicate) Execute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)

func (*HostStatusPredicate) Name

func (p *HostStatusPredicate) Name() string

func (*HostStatusPredicate) PreExecute

func (p *HostStatusPredicate) PreExecute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) bool

type IPredicate

type IPredicate interface {
	Name() string
	Clone() IPredicate
	PreExecute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) bool
	Execute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)
}

type LocalVolumePredicate

type LocalVolumePredicate struct {
	// contains filtered or unexported fields
}

func (*LocalVolumePredicate) Clone

func (p *LocalVolumePredicate) Clone() IPredicate

func (*LocalVolumePredicate) Execute

func (p *LocalVolumePredicate) Execute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)

func (*LocalVolumePredicate) Name

func (p *LocalVolumePredicate) Name() string

func (*LocalVolumePredicate) PreExecute

func (p *LocalVolumePredicate) PreExecute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) bool

type NetworkPredicate

type NetworkPredicate struct {
	// contains filtered or unexported fields
}

func (*NetworkPredicate) Clone

func (p *NetworkPredicate) Clone() IPredicate

func (*NetworkPredicate) Execute

func (p *NetworkPredicate) Execute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) (bool, error)

func (*NetworkPredicate) Name

func (p *NetworkPredicate) Name() string

func (*NetworkPredicate) PreExecute

func (p *NetworkPredicate) PreExecute(cli *kubernetes.Clientset, pod *v1.Pod, node *v1.Node, host *candidate.HostDesc) bool

type SPredicatesManager

type SPredicatesManager struct {
	// contains filtered or unexported fields
}
var PredicatesManager *SPredicatesManager

func (*SPredicatesManager) DoFilter

func (man *SPredicatesManager) DoFilter(
	k8sCli *kubernetes.Clientset,
	pod *v1.Pod,
	node *v1.Node,
	host *candidate.HostDesc,
) (bool, error)

func (*SPredicatesManager) Has

func (man *SPredicatesManager) Has(newPre IPredicate) bool

func (*SPredicatesManager) Register

func (man *SPredicatesManager) Register(pres ...IPredicate) *SPredicatesManager

Jump to

Keyboard shortcuts

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