Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Affinity ¶
type Affinity struct{}
Affinity does not pass if a node has at least one pod, which should be scheduled on operational nodes and other nodes are in maintenance-required, which do not have such a pod.
type AlterAnnotation ¶
AlterAnnotation is a trigger plugin, which can add, change or remove an annotation.
func (*AlterAnnotation) New ¶
func (a *AlterAnnotation) New(config *ucfg.Config) (plugin.Trigger, error)
New creates a new AlterAnnotation instance with the given config.
func (*AlterAnnotation) Trigger ¶
func (a *AlterAnnotation) Trigger(params plugin.Parameters) error
Trigger ensures the annotation with the provided key is removed if removes is set to true. Otherwise it sets the annotation with the provided key to the provided value adding the annotation if required.
type AlterLabel ¶
AlterLabel is a trigger plugin, which can add, change or remove a label.
func (*AlterLabel) New ¶
func (a *AlterLabel) New(config *ucfg.Config) (plugin.Trigger, error)
New creates a new AlterLabel instance with the given config.
func (*AlterLabel) Trigger ¶
func (a *AlterLabel) Trigger(params plugin.Parameters) error
Trigger ensures the label with the provided key is removed if removes is set to true. Otherwise it sets the label with the provided key to the provided value adding the label if required.
type ClusterSemver ¶ added in v0.17.0
Collects all values of the given Label key and passes if the current nodes value is less than the clusters max value, which indicates that an update may be needed.
func (*ClusterSemver) AfterEval ¶ added in v0.17.0
func (cs *ClusterSemver) AfterEval(chainResult bool, params plugin.Parameters) error
func (*ClusterSemver) Check ¶ added in v0.17.0
func (cs *ClusterSemver) Check(params plugin.Parameters) (bool, error)
type Condition ¶
Condition is a check plugin that checks if a node has a certain status for a defined condition.
func (*Condition) AfterEval ¶
func (c *Condition) AfterEval(chainResult bool, params plugin.Parameters) error
type HasAnnotation ¶
HasAnnotation is a check plugin that checks whether a node has an annotation or an annotation with a certain value.
func (*HasAnnotation) AfterEval ¶
func (h *HasAnnotation) AfterEval(chainResult bool, params plugin.Parameters) error
func (*HasAnnotation) Check ¶
func (h *HasAnnotation) Check(params plugin.Parameters) (bool, error)
Check checks whether a node has an annotation (if h.Value == "") or an annotation with a certain value (if h.Value != "").
type HasLabel ¶
HasLabel is a check plugin that checks whether a node has a label or a label with a certain value.
func (*HasLabel) AfterEval ¶
func (h *HasLabel) AfterEval(chainResult bool, params plugin.Parameters) error
type KubernikusCount ¶ added in v0.19.0
type KubernikusCount struct {
Cluster string
}
func (*KubernikusCount) AfterEval ¶ added in v0.19.0
func (kc *KubernikusCount) AfterEval(chainResult bool, params plugin.Parameters) error
func (*KubernikusCount) Check ¶ added in v0.19.0
func (kc *KubernikusCount) Check(params plugin.Parameters) (bool, error)
type Mail ¶
type Mail struct { Auth bool Message string Subject string Address string From string To []string Identity string User string Password string }
Mail is a notification plugins that sends an e-mail.
type MaxMaintenance ¶
type MaxMaintenance struct {
MaxNodes int
}
MaxMaintenance is a check plugin that checks whether the amount of nodes with the in-maintenance state does not exceed the specified amount.
func (*MaxMaintenance) AfterEval ¶
func (m *MaxMaintenance) AfterEval(chainResult bool, params plugin.Parameters) error
func (*MaxMaintenance) Check ¶
func (m *MaxMaintenance) Check(params plugin.Parameters) (bool, error)
Check asserts that no more then the specified amount of nodes is in the in-maintenance state.
type NodeCount ¶
type NodeCount struct {
Count int
}
func (*NodeCount) AfterEval ¶
func (n *NodeCount) AfterEval(chainResult bool, params plugin.Parameters) error
type SlackThread ¶
type SlackThread struct { Token string Channel string Title string Message string LeaseName types.NamespacedName Period time.Duration // contains filtered or unexported fields }
Slack is a notification plugin that uses a slack webhook and a channel to post a notification about the nodes state in slack while grouping messages within a certain period in a thread.
func (*SlackThread) New ¶
func (st *SlackThread) New(config *ucfg.Config) (plugin.Notifier, error)
New creates a new Slack instance with the given config.
func (*SlackThread) Notify ¶
func (st *SlackThread) Notify(params plugin.Parameters) error
func (*SlackThread) SetTestURL ¶
func (st *SlackThread) SetTestURL(url string)
type SlackWebhook ¶
SlackWebhook is a notification plugin that uses a slack webhook and a channel to post a notification about the nodes state in slack.
func (*SlackWebhook) New ¶
func (sw *SlackWebhook) New(config *ucfg.Config) (plugin.Notifier, error)
New creates a new Slack instance with the given config.
func (*SlackWebhook) Notify ¶
func (sw *SlackWebhook) Notify(params plugin.Parameters) error
Notify performs a POST-Request to the slack API to create a message within slack.
type Stagger ¶
type Stagger struct { Duration time.Duration LeaseName string LeaseNamespace string Parallel int // contains filtered or unexported fields }
Stagger is a check plugin that checks that only one node can pass every configurable period.
func (*Stagger) AfterEval ¶
func (s *Stagger) AfterEval(chainResult bool, params plugin.Parameters) error
If the whole check chain passed, the lease needs to be grabed, so other nodes are blocked from progressing.
type TimeWindow ¶
type TimeWindow struct { Start time.Time End time.Time Weekdays []time.Weekday Exclude []time.Time }
TimeWindow is a check plugin that checks whether it is invoked on a certain weekday with a specified timewindow.
func (*TimeWindow) AfterEval ¶
func (tw *TimeWindow) AfterEval(chainResult bool, params plugin.Parameters) error
func (*TimeWindow) Check ¶
func (tw *TimeWindow) Check(params plugin.Parameters) (bool, error)
Check checks whether the current time is within specified time window on allowed weekdays.
type WaitExclude ¶
func (*WaitExclude) AfterEval ¶
func (we *WaitExclude) AfterEval(chainResult bool, params plugin.Parameters) error
func (*WaitExclude) Check ¶
func (we *WaitExclude) Check(params plugin.Parameters) (bool, error)