Skip to content

Commit

Permalink
1. adapter.go: GetReplicaDetails returns pods in the subset
Browse files Browse the repository at this point in the history
2. xxx_adapter.go: return pods implementation ⬆️
3. allocator.go: about safeReplica
4. pod_condition_utils.go: extract PodUnscheduledTimeout function from workloadwpread
5. reschedule.go: PodUnscheduledTimeout function extracted
6. subset.go: add some field to Subset object to carry related information
7. subset_control.go: store subset pods to Subset object
8. uniteddeployment_controller.go
   1. add requeue feature to check failed pods
   2. subset unschedulable status management
9. uniteddeployment_types.go: API change
10. uniteddeployment_update.go: sync unschedulable to CR

Signed-off-by: AiRanthem <[email protected]>
  • Loading branch information
AiRanthem committed Sep 2, 2024
1 parent 89bffc8 commit 75b4117
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-1.18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] (PullImage|ContainerRecreateRequest|PullImages)' test/e2e
./bin/ginkgo -timeout 60m -v -p --focus='\[apps\] (PullImage|ContainerRecreateRequest|PullImages)' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-1.20-EphemeralJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] EphemeralJob' test/e2e
./bin/ginkgo -timeout 60m -v -p --focus='\[apps\] EphemeralJob' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-1.24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] StatefulSet' test/e2e
./bin/ginkgo -timeout 60m -v -p --focus='\[apps\] StatefulSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-1.26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] StatefulSet' test/e2e
./bin/ginkgo -timeout 60m -v -p --focus='\[apps\] StatefulSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-1.28.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] StatefulSet' test/e2e
./bin/ginkgo -timeout 60m -v -p --focus='\[apps\] StatefulSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/apps/uniteddeployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ var _ = SIGDescribe("uniteddeployment", func() {
}

udManager := tester.NewUnitedDeploymentManager("adaptive-ud-elastic-test")
udManager.UnitedDeployment.Spec.Template.DeploymentTemplate.Spec.Template.Spec.TerminationGracePeriodSeconds = ptr.To(int64(0))
// enable adaptive scheduling
udManager.UnitedDeployment.Spec.Topology.ScheduleStrategy = appsv1alpha1.UnitedDeploymentScheduleStrategy{
Type: appsv1alpha1.AdaptiveUnitedDeploymentScheduleStrategyType,
Expand Down Expand Up @@ -242,6 +243,7 @@ var _ = SIGDescribe("uniteddeployment", func() {
}

udManager := tester.NewUnitedDeploymentManager("adaptive-ud-specific-test")
udManager.UnitedDeployment.Spec.Template.DeploymentTemplate.Spec.Template.Spec.TerminationGracePeriodSeconds = ptr.To(int64(0))
// enable adaptive scheduling
udManager.UnitedDeployment.Spec.Topology.ScheduleStrategy = appsv1alpha1.UnitedDeploymentScheduleStrategy{
Type: appsv1alpha1.AdaptiveUnitedDeploymentScheduleStrategyType,
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/framework/uniteddeployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ func NewUnitedDeploymentTester(c clientset.Interface, kc kruiseclientset.Interfa
}
}

var zero = int64(0)

func (t *UnitedDeploymentTester) NewUnitedDeploymentManager(name string) *UnitedDeploymentManager {
return &UnitedDeploymentManager{
UnitedDeployment: &appsv1alpha1.UnitedDeployment{
Expand Down Expand Up @@ -67,7 +65,6 @@ func (t *UnitedDeploymentTester) NewUnitedDeploymentManager(name string) *United
},
},
Spec: v1.PodSpec{
TerminationGracePeriodSeconds: &zero,
Containers: []v1.Container{
{
Name: "busybox",
Expand Down

0 comments on commit 75b4117

Please sign in to comment.