Documentation ¶
Index ¶
- func GetKubernetesClient() (kubernetes.Interface, error)
- func GetKubernetesConfig() (*rest.Config, error)
- func GetKubernetesLocalConfig() (*rest.Config, error)
- func GetNodeInstanceID(node *corev1.Node) string
- func IsNodePassesReadinessGates(node *corev1.Node, requiredReadinessGates []v1alpha1.NodeReadinessGate) bool
- func IsNodeReady(node *corev1.Node) bool
- func SelectNodeByInstanceID(instanceID string, nodes []*corev1.Node) *corev1.Node
- type EventLevel
- type EventReason
- type EventWriter
- type KubernetesClientSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubernetesClient ¶
func GetKubernetesClient() (kubernetes.Interface, error)
func GetKubernetesConfig ¶
func GetNodeInstanceID ¶
func IsNodePassesReadinessGates ¶
func IsNodePassesReadinessGates(node *corev1.Node, requiredReadinessGates []v1alpha1.NodeReadinessGate) bool
func IsNodeReady ¶
Types ¶
type EventReason ¶
type EventReason string
EventReason defines the reason of an event
const ( // EventLevelNormal is the level of a normal event EventLevelNormal = "Normal" // EventLevelWarning is the level of a warning event EventLevelWarning = "Warning" // EventReasonRUStarted Rolling Upgrade Started EventReasonRUStarted EventReason = "RollingUpgradeStarted" // EventReasonRUInstanceStarted Rolling Upgrade for Instance has started EventReasonRUInstanceStarted EventReason = "RollingUpgradeInstanceStarted" // EventReasonRUInstanceFinished Rolling Upgrade for Instance has finished EventReasonRUInstanceFinished EventReason = "RollingUpgradeInstanceFinished" // EventReasonRUFinished Rolling Upgrade Finished EventReasonRUFinished EventReason = "RollingUpgradeFinished" )
type EventWriter ¶
type EventWriter struct { *KubernetesClientSet logr.Logger }
func NewEventWriter ¶
func NewEventWriter(k *KubernetesClientSet, logger logr.Logger) *EventWriter
func (*EventWriter) CreateEvent ¶
func (w *EventWriter) CreateEvent(rollingUpgrade *v1alpha1.RollingUpgrade, reason EventReason, level string, msgFields map[string]string)
type KubernetesClientSet ¶
type KubernetesClientSet struct {
Kubernetes kubernetes.Interface
}
func (*KubernetesClientSet) DrainNode ¶
func (k *KubernetesClientSet) DrainNode(node *corev1.Node, PostDrainDelaySeconds time.Duration, DrainTimeout int, client kubernetes.Interface) error
DrainNode cordons and drains a node.
func (*KubernetesClientSet) ListClusterNodes ¶
func (k *KubernetesClientSet) ListClusterNodes() (*corev1.NodeList, error)
ListClusterNodes gets a list of all nodes in the cluster
Click to show internal directories.
Click to hide internal directories.