istio: Index | Files

package taint

import ""


Package Files

taint.go taint_test_helper.go taintcontroller.go


const (
    TaintName = "NodeReadiness"

func GetNodeLatestReadiness Uses

func GetNodeLatestReadiness(node v1.Node) bool

node readiness validation by checking the last heartbeat status

type ConfigSettings Uses

type ConfigSettings struct {
    Name          string `yaml:"name"`
    Namespace     string `yaml:"namespace"`
    LabelSelector string `yaml:"selector"`

func (ConfigSettings) String Uses

func (config ConfigSettings) String() string

type Controller Uses

type Controller struct {
    // contains filtered or unexported fields

func NewTaintSetterController Uses

func NewTaintSetterController(ts *Setter) (*Controller, error)

func (Controller) CheckNodeReadiness Uses

func (tc Controller) CheckNodeReadiness(node v1.Node) bool

func (Controller) ListAllNode Uses

func (tc Controller) ListAllNode() []*v1.Node

func (Controller) ProcessNode Uses

func (tc Controller) ProcessNode(node *v1.Node) error

if node is ready, check all of its critical labels and if all of them are ready , remove readiness taint else taint it

func (Controller) RegisterTaints Uses

func (tc Controller) RegisterTaints()

func (*Controller) Run Uses

func (tc *Controller) Run(stopCh <-chan struct{})

controller will run all of the critical pod controllers and node controllers, process node and pod in every second

type Options Uses

type Options struct {
    ConfigmapName      string
    ConfigmapNamespace string

type Setter Uses

type Setter struct {
    Client client.Interface
    // contains filtered or unexported fields

func NewTaintSetter Uses

func NewTaintSetter(clientset client.Interface, options *Options) (ts *Setter, err error)

func (*Setter) AddReadinessTaint Uses

func (ts *Setter) AddReadinessTaint(node *v1.Node) error

taint node with specific taint name with effect of no schedule do nothing if it already have the readiness taint

func (*Setter) Configs Uses

func (ts *Setter) Configs() []ConfigSettings

func (*Setter) HasReadinessTaint Uses

func (ts *Setter) HasReadinessTaint(node *v1.Node) bool

check whether current node have readiness

func (*Setter) LoadConfig Uses

func (ts *Setter) LoadConfig(config v1.ConfigMap)

load corresponding configmap's critical labels and their namespace

func (*Setter) RemoveReadinessTaint Uses

func (ts *Setter) RemoveReadinessTaint(node *v1.Node) error

assumption: order of taint is not important

Package taint imports 17 packages (graph). Updated 2021-01-09. Refresh now. Tools for package owners.