Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoScheduleOnMaster ¶
func NoScheduleOnMaster() corev1.Toleration
NoScheduleOnMaster returns a kubernetes toleration that disables scheduling of Pods on master kubernetes nodes
Types ¶
type OptionFunc ¶
type OptionFunc func(*toleration)
OptionFunc is a typed function that abstracts anykind of operation against the provided toleration instance
This is the basic building block to create functional operations against the toleration instance
func WithEffect ¶
func WithEffect(e corev1.TaintEffect) OptionFunc
WithEffect sets the effect of the toleration
func WithOperator ¶
func WithOperator(o corev1.TolerationOperator) OptionFunc
WithOperator sets the operator of the toleration
func WithTolerationSeconds ¶
func WithTolerationSeconds(sec *int64) OptionFunc
WithTolerationSeconds sets the toleration seconds of the toleration
type Predicate ¶
Predicate abstracts conditional logic w.r.t toleration instance
NOTE: Predicate is a functional approach versus traditional approach to mix conditions such as *if-else* within blocks of business logic
NOTE: Predicate approach enables clear separation of conditionals from imperatives i.e. actions that form the business logic
type TolerationKey ¶
type TolerationKey string
TolerationKey identifies keys associated with toleration; where a key can be present in labels or in annotations
const ( // MasterNodeTolerationKey determines the master node via this toleration key MasterNodeTolerationKey TolerationKey = "node-role.kubernetes.io/master" )