Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func GetWorkloadSpreadSubsetCondition(status *appsv1alpha1.WorkloadSpreadSubsetStatus, ...) *appsv1alpha1.WorkloadSpreadSubsetCondition
- func NewWorkloadSpreadSubsetCondition(condType appsv1alpha1.WorkloadSpreadSubsetConditionType, ...) *appsv1alpha1.WorkloadSpreadSubsetCondition
- func PodUnscheduledTimeout(ws *appsv1alpha1.WorkloadSpread, pod *corev1.Pod) bool
- type EventAction
- type ReconcileWorkloadSpread
Constants ¶
View Source
const ( // CreatPodTimeout sets maximum time from the moment a pod is added to CreatePods in WorkloadSpread.Status by webhook // to the time when the pod is expected to be seen by controller. If the pod has not been found by controller // during that time it is assumed, which means it won't be created at all and corresponding record in map can be // removed from WorkloadSpread.Status. It is assumed that pod/ws apiserver to controller latency is relatively small (like 1-2sec) // so the below value should be more enough. CreatPodTimeout = 30 * time.Second // DeletePodTimeout is similar to the CreatePodTimeout and it's the time duration for deleting Pod. DeletePodTimeout = 15 * time.Second // FakeSubsetName is a fake subset name for such pods that do not match any subsets FakeSubsetName = "kruise.io/workloadspread-fake-subset-name" // IgnorePatchExistingPodsAnnotation ignore ws.Spec.Subsets[x].Patch for existing pods IgnorePatchExistingPodsAnnotation = "workloadspread.kruise.io/ignore-patch-existing-pods-metadata" )
View Source
const (
// RevisionAnnotation is the revision annotation of a deployment's replica sets which records its rollout sequence
RevisionAnnotation = "deployment.kubernetes.io/revision"
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new WorkloadSpread Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func GetWorkloadSpreadSubsetCondition ¶
func GetWorkloadSpreadSubsetCondition(status *appsv1alpha1.WorkloadSpreadSubsetStatus, condType appsv1alpha1.WorkloadSpreadSubsetConditionType) *appsv1alpha1.WorkloadSpreadSubsetCondition
GetWorkloadSpreadSubsetCondition returns the condition with the provided type.
func NewWorkloadSpreadSubsetCondition ¶
func NewWorkloadSpreadSubsetCondition(condType appsv1alpha1.WorkloadSpreadSubsetConditionType, status corev1.ConditionStatus, reason, message string) *appsv1alpha1.WorkloadSpreadSubsetCondition
NewWorkloadSpreadSubsetCondition creates a new WorkloadSpreadSubset condition.
func PodUnscheduledTimeout ¶
func PodUnscheduledTimeout(ws *appsv1alpha1.WorkloadSpread, pod *corev1.Pod) bool
PodUnscheduledTimeout return true when Pod was scheduled failed and timeout.
Types ¶
type EventAction ¶
type EventAction string
const ( CreateEventAction EventAction = "Create" UpdateEventAction EventAction = "Update" DeleteEventAction EventAction = "Delete" DeploymentRevisionAnnotation = "deployment.kubernetes.io/revision" )
type ReconcileWorkloadSpread ¶
ReconcileWorkloadSpread reconciles a WorkloadSpread object
func (*ReconcileWorkloadSpread) UpdateWorkloadSpreadStatus ¶
func (r *ReconcileWorkloadSpread) UpdateWorkloadSpreadStatus(ws *appsv1alpha1.WorkloadSpread, status *appsv1alpha1.WorkloadSpreadStatus) error
Click to show internal directories.
Click to hide internal directories.