Documentation
¶
Index ¶
- func FindCondition(condType string, c []orchestrationapi.Condition) *orchestrationapi.Condition
- func FindRoleStatus(rs *orchestrationapi.RoleSet, roleName string) *orchestrationapi.RoleStatus
- func GetHPA(ctx context.Context, k8sClient client.Client, namespace, name string) *autoscalingv2.HorizontalPodAutoscaler
- func GetPodAutoscaler(ctx context.Context, k8sClient client.Client, ...) *autoscalingv1alpha1.PodAutoscaler
- func GetRoleSetPodForRole(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...) []*corev1.Pod
- func MakePodReady(pod *corev1.Pod)
- func MakePodTemplate(image string) corev1.PodTemplateSpec
- func MarkPodsReady(ctx context.Context, k8sClient client.Client, ...)
- func StartRoleSetPodReadyLoop(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...) chan struct{}
- func UpdateRolesTemplate(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...)
- func UpdateStormServiceReplicas(ctx context.Context, k8sClient client.Client, ...)
- func ValidateHPAOwnerReference(hpa *autoscalingv2.HorizontalPodAutoscaler, expectedOwnerName string, ...)
- func ValidateHPAScaleTargetRef(hpa *autoscalingv2.HorizontalPodAutoscaler, expectedKind, expectedName string)
- func ValidateHPASpec(hpa *autoscalingv2.HorizontalPodAutoscaler, ...)
- func ValidatePodAutoscalerCondition(pa *autoscalingv1alpha1.PodAutoscaler, conditionType string, ...)
- func ValidatePodAutoscalerConditionExists(pa *autoscalingv1alpha1.PodAutoscaler, conditionType string)
- func ValidatePodAutoscalerConditionNotExists(pa *autoscalingv1alpha1.PodAutoscaler, conditionType string)
- func ValidatePodAutoscalerScaling(ctx context.Context, k8sClient client.Client, ...)
- func ValidatePodAutoscalerSpec(pa *autoscalingv1alpha1.PodAutoscaler, expectedMin, expectedMax int32, ...)
- func ValidatePodSetSpec(podset *orchestrationapi.PodSet, expectedPodGroupSize int32, ...)
- func ValidatePodSetStatus(ctx context.Context, k8sClient client.Client, podset *orchestrationapi.PodSet, ...)
- func ValidateRoleImage(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...) error
- func ValidateRoleSetSpec(roleSet *orchestrationapi.RoleSet, expectedRoleCount int, ...)
- func ValidateRoleStatus(rs *orchestrationapi.RoleSet, role string, expectedReplicas int32) error
- func ValidateScalingHistory(pa *autoscalingv1alpha1.PodAutoscaler, expectedCount int, ...)
- func ValidateStormServiceConditions(ss *orchestrationapi.StormService, condition orchestrationapi.ConditionType, ...) error
- func ValidateStormServiceReplicas(ctx context.Context, k8sClient client.Client, ...)
- func ValidateStormServiceSpec(stormService *orchestrationapi.StormService, expectedReplicas int32, ...)
- func ValidateStormServiceStatus(ctx context.Context, k8sClient client.Client, ...)
- func WaitForHPACreated(ctx context.Context, k8sClient client.Client, namespace, name string) *autoscalingv2.HorizontalPodAutoscaler
- func WaitForHPADeleted(ctx context.Context, k8sClient client.Client, namespace, name string)
- func WaitForPodAutoscalerCondition(ctx context.Context, k8sClient client.Client, ...)
- func WaitForPodAutoscalerConditionWithReason(ctx context.Context, k8sClient client.Client, ...)
- func WaitForPodAutoscalerCreated(ctx context.Context, k8sClient client.Client, ...) *autoscalingv1alpha1.PodAutoscaler
- func WaitForPodAutoscalerDeleted(ctx context.Context, k8sClient client.Client, ...)
- func WaitForPodsCreated(ctx context.Context, k8sClient client.Client, ...)
- func WaitForRoleImage(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...)
- func WaitForRoleImageAndReady(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...)
- func WaitForRoleSetFinalState(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...)
- func WaitForRoleSetsCreated(ctx context.Context, k8sClient client.Client, ns, ssName string, expected int)
- func WaitForRoleUpgradeInOrder(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...)
- func WaitForRolesReady(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindCondition ¶
func FindCondition(condType string, c []orchestrationapi.Condition) *orchestrationapi.Condition
func FindRoleStatus ¶
func FindRoleStatus(rs *orchestrationapi.RoleSet, roleName string) *orchestrationapi.RoleStatus
func GetHPA ¶
func GetHPA(ctx context.Context, k8sClient client.Client, namespace, name string) *autoscalingv2.HorizontalPodAutoscaler
GetHPA fetches an HPA by namespace and name.
func GetPodAutoscaler ¶
func GetPodAutoscaler(ctx context.Context, k8sClient client.Client, pa *autoscalingv1alpha1.PodAutoscaler) *autoscalingv1alpha1.PodAutoscaler
GetPodAutoscaler fetches the latest version of a PodAutoscaler.
func GetRoleSetPodForRole ¶
func GetRoleSetPodForRole(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ns, roleName string) []*corev1.Pod
GetRoleSetPodForRole list the pod for certain role
func MakePodReady ¶
func MakePodTemplate ¶
func MakePodTemplate(image string) corev1.PodTemplateSpec
func MarkPodsReady ¶
func UpdateRolesTemplate ¶
func UpdateRolesTemplate(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, roleTemplateMap map[string]string)
UpdateRolesTemplate update the template of roles
func UpdateStormServiceReplicas ¶
func UpdateStormServiceReplicas(ctx context.Context, k8sClient client.Client, ss *orchestrationapi.StormService, replicas int)
func ValidateHPAOwnerReference ¶
func ValidateHPAOwnerReference(hpa *autoscalingv2.HorizontalPodAutoscaler, expectedOwnerName string, expectedOwnerKind string)
ValidateHPAOwnerReference validates the HPA's OwnerReference.
func ValidateHPAScaleTargetRef ¶
func ValidateHPAScaleTargetRef(hpa *autoscalingv2.HorizontalPodAutoscaler, expectedKind, expectedName string)
ValidateHPAScaleTargetRef validates the HPA's scale target reference.
func ValidateHPASpec ¶
func ValidateHPASpec(hpa *autoscalingv2.HorizontalPodAutoscaler, expectedMinReplicas, expectedMaxReplicas int32)
ValidateHPASpec validates the HPA spec fields.
func ValidatePodAutoscalerCondition ¶
func ValidatePodAutoscalerCondition(pa *autoscalingv1alpha1.PodAutoscaler, conditionType string, expectedStatus metav1.ConditionStatus, expectedReason string)
ValidatePodAutoscalerCondition validates a specific condition in a PodAutoscaler.
func ValidatePodAutoscalerConditionExists ¶
func ValidatePodAutoscalerConditionExists(pa *autoscalingv1alpha1.PodAutoscaler, conditionType string)
ValidatePodAutoscalerConditionExists validates that a condition exists.
func ValidatePodAutoscalerConditionNotExists ¶
func ValidatePodAutoscalerConditionNotExists(pa *autoscalingv1alpha1.PodAutoscaler, conditionType string)
ValidatePodAutoscalerConditionNotExists validates that a condition does not exist.
func ValidatePodAutoscalerScaling ¶
func ValidatePodAutoscalerScaling(ctx context.Context, k8sClient client.Client, pa *autoscalingv1alpha1.PodAutoscaler, expectedDesired, expectedActual int32)
ValidatePodAutoscalerScaling validates the scaling status (desiredScale and actualScale).
func ValidatePodAutoscalerSpec ¶
func ValidatePodAutoscalerSpec(pa *autoscalingv1alpha1.PodAutoscaler, expectedMin, expectedMax int32, expectedStrategy autoscalingv1alpha1.ScalingStrategyType)
ValidatePodAutoscalerSpec validates the spec fields of a PodAutoscaler.
func ValidatePodSetSpec ¶
func ValidatePodSetSpec(podset *orchestrationapi.PodSet, expectedPodGroupSize int32, expectedStateful bool)
func ValidatePodSetStatus ¶
func ValidatePodSetStatus(ctx context.Context, k8sClient client.Client, podset *orchestrationapi.PodSet, expectedPhase orchestrationapi.PodSetPhase, expectedTotal, expectedReady int32)
func ValidateRoleImage ¶
func ValidateRoleImage(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ns, role, expectedImage string) error
ValidateRoleImage Verify all pods of a certain role have the new images
func ValidateRoleSetSpec ¶
func ValidateRoleSetSpec(roleSet *orchestrationapi.RoleSet, expectedRoleCount int, updateStrategyType orchestrationapi.RoleSetUpdateStrategyType)
ValidateRoleSetSpec verify the roleSet spec
func ValidateRoleStatus ¶
func ValidateRoleStatus(rs *orchestrationapi.RoleSet, role string, expectedReplicas int32) error
ValidateRoleStatus verify RoleStatus of a role
func ValidateScalingHistory ¶
func ValidateScalingHistory(pa *autoscalingv1alpha1.PodAutoscaler, expectedCount int, checkLatest func(autoscalingv1alpha1.ScalingDecision))
ValidateScalingHistory validates the scalingHistory in status.
func ValidateStormServiceConditions ¶
func ValidateStormServiceConditions(ss *orchestrationapi.StormService, condition orchestrationapi.ConditionType, readyStatus corev1.ConditionStatus) error
func ValidateStormServiceReplicas ¶
func ValidateStormServiceReplicas( ctx context.Context, k8sClient client.Client, stormService *orchestrationapi.StormService, expectedReplicas int32, )
func ValidateStormServiceSpec ¶
func ValidateStormServiceSpec(stormService *orchestrationapi.StormService, expectedReplicas int32, updateStrategyType orchestrationapi.StormServiceUpdateStrategyType)
func ValidateStormServiceStatus ¶
func ValidateStormServiceStatus(ctx context.Context, k8sClient client.Client, stormService *orchestrationapi.StormService, expectedReplicas, expectedReady, expectedNotReady, expectedCurrent, expectedUpdated, expectedUpdatedReady int32, checkRevisions bool)
func WaitForHPACreated ¶
func WaitForHPACreated(ctx context.Context, k8sClient client.Client, namespace, name string) *autoscalingv2.HorizontalPodAutoscaler
WaitForHPACreated waits for an HPA to be created and returns it.
func WaitForHPADeleted ¶
WaitForHPADeleted waits for an HPA to be deleted.
func WaitForPodAutoscalerCondition ¶
func WaitForPodAutoscalerCondition(ctx context.Context, k8sClient client.Client, pa *autoscalingv1alpha1.PodAutoscaler, conditionType string, expectedStatus metav1.ConditionStatus)
WaitForPodAutoscalerCondition waits for a specific condition to reach expected status.
func WaitForPodAutoscalerConditionWithReason ¶
func WaitForPodAutoscalerConditionWithReason(ctx context.Context, k8sClient client.Client, pa *autoscalingv1alpha1.PodAutoscaler, conditionType string, expectedStatus metav1.ConditionStatus, expectedReason string)
WaitForPodAutoscalerConditionWithReason waits for a condition with specific reason.
func WaitForPodAutoscalerCreated ¶
func WaitForPodAutoscalerCreated(ctx context.Context, k8sClient client.Client, pa *autoscalingv1alpha1.PodAutoscaler) *autoscalingv1alpha1.PodAutoscaler
WaitForPodAutoscalerCreated waits for PodAutoscaler to be created and returns the latest version.
func WaitForPodAutoscalerDeleted ¶
func WaitForPodAutoscalerDeleted(ctx context.Context, k8sClient client.Client, pa *autoscalingv1alpha1.PodAutoscaler)
WaitForPodAutoscalerDeleted waits for PodAutoscaler to be deleted.
func WaitForPodsCreated ¶
func WaitForRoleImage ¶
func WaitForRoleImage(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ns, role, expectedImage string, description ...interface{})
WaitForRoleImage verify role have expected image and make the pod ready
func WaitForRoleImageAndReady ¶
func WaitForRoleImageAndReady(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ns, role, expectedImage string, description ...interface{})
WaitForRoleImageAndReady verify role have expected image and make the pod ready
func WaitForRoleSetFinalState ¶
func WaitForRoleSetFinalState(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ns string, roleImageMap map[string]string)
WaitForRoleSetFinalState verify roleSet final state
func WaitForRoleSetsCreated ¶
func WaitForRoleUpgradeInOrder ¶
func WaitForRoleUpgradeInOrder(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, ns, firstRole, firstImage, secondRole, secondImage string)
WaitForRoleUpgradeInOrder verify the role upgrade order
func WaitForRolesReady ¶
func WaitForRolesReady(ctx context.Context, k8sClient client.Client, rs *orchestrationapi.RoleSet, roleList []string)
WaitForRolesReady verify role in the role list is ready
Types ¶
This section is empty.