labelPolicy

package
v0.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllTrue

type AllTrue struct{}

func (*AllTrue) Process

func (at *AllTrue) Process(physicalNodes *corev1.NodeList, key string) (value string, insertLabel bool)

type AllTrueNoLabelIfFalse

type AllTrueNoLabelIfFalse struct{}

func (*AllTrueNoLabelIfFalse) Process

func (at *AllTrueNoLabelIfFalse) Process(physicalNodes *corev1.NodeList, key string) (value string, insertLabel bool)

type AnyTrue

type AnyTrue struct{}

func (*AnyTrue) Process

func (at *AnyTrue) Process(physicalNodes *corev1.NodeList, key string) (value string, insertLabel bool)

type AnyTrueNoLabelIfFalse

type AnyTrueNoLabelIfFalse struct{}

func (*AnyTrueNoLabelIfFalse) Process

func (at *AnyTrueNoLabelIfFalse) Process(physicalNodes *corev1.NodeList, key string) (value string, insertLabel bool)

type LabelPolicy

type LabelPolicy interface {
	Process(physicalNodes *corev1.NodeList, key string) (value string, insertLabel bool)
}

func GetInstance

func GetInstance(policyType LabelPolicyType) LabelPolicy

type LabelPolicyType

type LabelPolicyType string
const (
	// add val=true label if at least one node has a val=true or val="" label.
	LabelPolicyAnyTrue LabelPolicyType = "LabelPolicyAnuTrue"
	// add val=true label if each node has a val=true or val="" label.
	LabelPolicyAllTrue LabelPolicyType = "LabelPolicyAllTrue"
	// add val="" label if at least one node has a val=true or val="" label.
	LabelPolicyAnyTrueNoLabelIfFalse LabelPolicyType = "LabelPolicyAnyTrueNoLabelIfFalse"
	// add val="" label if each node has a val=true or val="" label.
	LabelPolicyAllTrueNoLabelIfFalse LabelPolicyType = "LabelPolicyAllTrueNoLabelIfFalse"
)

NOTE: add these values to the accepted values in apis/config/v1alpha1/clusterconfig_types.go > LabelPolicy > Policy.

Jump to

Keyboard shortcuts

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