Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeItem ¶
type NodeItem struct {
Node *corev1.Node
ExtendedDaemonsetSetting *datadoghqv1alpha1.ExtendedDaemonsetSetting
}
NodeItem used to store all informations needs to create or delete a pod
func NewNodeItem ¶
func NewNodeItem(node *corev1.Node, edsNode *datadoghqv1alpha1.ExtendedDaemonsetSetting) *NodeItem
NewNodeItem used to create new NodeItem instance
type Parameters ¶
type Parameters struct {
MinPodUpdate int32
MaxPodUpdate int32
EDSName string
Strategy *datadoghqv1alpha1.ExtendedDaemonSetSpecStrategy
Replicaset *datadoghqv1alpha1.ExtendedDaemonSetReplicaSet
ReplicaSetStatus string
NewStatus *datadoghqv1alpha1.ExtendedDaemonSetReplicaSetStatus
CanaryNodes []string
NodeByName map[string]*NodeItem
PodByNodeName map[*NodeItem]*corev1.Pod
PodToCleanUp []*corev1.Pod
UnscheduledPods []*corev1.Pod
Logger logr.Logger
}
Parameters use to store all the parameter need to a strategy
type ReplicaSetStatus ¶
type ReplicaSetStatus string
ReplicaSetStatus repesent the status of a ReplicaSet
const ( // ReplicaSetStatusActive the ReplicaSet is currently active ReplicaSetStatusActive ReplicaSetStatus = "active" // ReplicaSetStatusCanary the ReplicaSet is currently in canary mode ReplicaSetStatusCanary ReplicaSetStatus = "canary" // ReplicaSetStatusCanaryFailed the ReplicaSet is currently in canary failed mode ReplicaSetStatusCanaryFailed ReplicaSetStatus = "canary-failed" // ReplicaSetStatusUnknown the controller is not able to define the ReplicaSet status ReplicaSetStatusUnknown ReplicaSetStatus = "unknown" )
type Result ¶
type Result struct {
// PodsToCreate list of NodeItem for Pods creation
PodsToCreate []*NodeItem
// PodsToDelete list of NodeItem for Pods deletion
PodsToDelete []*NodeItem
UnscheduledNodesDueToResourcesConstraints []string
// IsPaused represents paused status of the deployment
IsPaused bool
// PausedReason provides the reason for the paused deployment
PausedReason datadoghqv1alpha1.ExtendedDaemonSetStatusReason
// IsUnpaused represents if the deployment was manually unpaused
IsUnpaused bool
// IsFailed represents failed state of the deployment
IsFailed bool
// FailedReason provides the reason for the failed deployment
FailedReason datadoghqv1alpha1.ExtendedDaemonSetStatusReason
NewStatus *datadoghqv1alpha1.ExtendedDaemonSetReplicaSetStatus
Result reconcile.Result
}
Result information returns by a strategy
func ManageCanaryDeployment ¶
func ManageCanaryDeployment(client client.Client, daemonset *v1alpha1.ExtendedDaemonSet, params *Parameters) (*Result, error)
ManageCanaryDeployment used to manage ReplicaSet in Canary state
func ManageDeployment ¶
func ManageDeployment(client runtimeclient.Client, params *Parameters) (*Result, error)
ManageDeployment used to manage ReplicaSet in rollingupdate state
func ManageUnknown ¶
func ManageUnknown(client client.Client, params *Parameters) (*Result, error)
ManageUnknown use to manage ReplicaSet with unknown status
Click to show internal directories.
Click to hide internal directories.