- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for newRS (0.03 sec)
-
pkg/controller/deployment/rolling.go
// Sync deployment status return dc.syncRolloutStatus(ctx, allRSs, newRS, d) } func (dc *DeploymentController) reconcileNewReplicaSet(ctx context.Context, allRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet, deployment *apps.Deployment) (bool, error) { if *(newRS.Spec.Replicas) == *(deployment.Spec.Replicas) { // Scaling not required. return false, nil } if *(newRS.Spec.Replicas) > *(deployment.Spec.Replicas) { // Scale down.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 07:09:11 UTC 2023 - 9.9K bytes - Viewed (0) -
pkg/controller/deployment/sync.go
Template: newRSTemplate, }, } allRSs := append(oldRSs, &newRS) newReplicasCount, err := deploymentutil.NewRSNewReplicas(d, allRSs, &newRS) if err != nil { return nil, err } *(newRS.Spec.Replicas) = newReplicasCount // Set new replica set's annotation deploymentutil.SetNewReplicaSetAnnotations(ctx, d, &newRS, newRevision, false, maxRevHistoryLengthInChars)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 05 23:39:52 UTC 2023 - 24.5K bytes - Viewed (0) -
pkg/controller/deployment/recreate.go
if scaledDown { // Update DeploymentStatus. return dc.syncRolloutStatus(ctx, allRSs, newRS, d) } // Do not process a deployment when it has old pods running. if oldPodsRunning(newRS, oldRSs, podMap) { return dc.syncRolloutStatus(ctx, allRSs, newRS, d) } // If we need to create a new RS, create it now. if newRS == nil { newRS, oldRSs, err = dc.getAllReplicaSetsAndSyncRevision(ctx, d, rsList, true) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 13 20:32:13 UTC 2021 - 4.2K bytes - Viewed (0) -
pkg/controller/deployment/sync_test.go
client: &fake, eventRecorder: &record.FakeRecorder{}, } if test.newRS != nil { desiredReplicas := *(test.oldDeployment.Spec.Replicas) if desired, ok := test.desiredReplicasAnnotations[test.newRS.Name]; ok { desiredReplicas = desired } deploymentutil.SetReplicasAnnotations(test.newRS, desiredReplicas, desiredReplicas+deploymentutil.MaxSurge(*test.oldDeployment)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 08 09:10:50 UTC 2023 - 21.1K bytes - Viewed (0) -
pkg/registry/apps/replicaset/strategy.go
func (rsStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newRS := obj.(*apps.ReplicaSet) oldRS := old.(*apps.ReplicaSet) // update is not allowed to set status newRS.Status = oldRS.Status pod.DropDisabledTemplateFields(&newRS.Spec.Template, &oldRS.Spec.Template) // Any changes to the spec increment the generation number, any changes to the
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 16 21:06:43 UTC 2022 - 9.3K bytes - Viewed (0) -
pkg/controller/deployment/progress.go
// to deployment conditions. func (dc *DeploymentController) getReplicaFailures(allRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet) []apps.DeploymentCondition { var conditions []apps.DeploymentCondition if newRS != nil { for _, c := range newRS.Status.Conditions { if c.Type != apps.ReplicaSetReplicaFailure { continue }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 13 11:00:44 UTC 2023 - 8.9K bytes - Viewed (0) -
pkg/registry/apps/replicaset/strategy_test.go
}, } StatusStrategy.PrepareForUpdate(ctx, newRS, oldRS) if newRS.Status.Replicas != 3 { t.Errorf("ReplicaSet status updates should allow change of replicas: %v", newRS.Status.Replicas) } if newRS.Spec.Replicas != 3 { t.Errorf("PrepareForUpdate should have preferred spec") } errs := StatusStrategy.ValidateUpdate(ctx, newRS, oldRS) if len(errs) != 0 { t.Errorf("Unexpected error %v", errs) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 09 21:04:31 UTC 2021 - 6.9K bytes - Viewed (0) -
pkg/controller/deployment/progress_test.go
fake := fake.Clientset{} dc := &DeploymentController{ client: &fake, } if test.newRS != nil { test.allRSs = append(test.allRSs, test.newRS) } _, ctx := ktesting.NewTestContext(t) err := dc.syncRolloutStatus(ctx, test.allRSs, test.newRS, test.d) if err != nil { t.Error(err) } newCond := util.GetDeploymentCondition(test.d.Status, test.conditionType)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 13.3K bytes - Viewed (0) -
pkg/controller/deployment/rolling_test.go
oldSelector := map[string]string{"foo": "old"} newRS := rs("foo-new", test.newReplicas, newSelector, noTimestamp) newRS.Status.AvailableReplicas = int32(test.readyPodsFromNewRS) oldRS := rs("foo-old", test.oldReplicas, oldSelector, noTimestamp) oldRS.Status.AvailableReplicas = int32(test.readyPodsFromOldRS) oldRSs := []*apps.ReplicaSet{oldRS} allRSs := []*apps.ReplicaSet{oldRS, newRS} maxSurge := intstr.FromInt32(0)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 08 09:10:50 UTC 2023 - 11K bytes - Viewed (0) -
pkg/controller/deployment/util/deployment_util.go
} for k, v := range deployment.Annotations { // newRS revision is updated automatically in getNewReplicaSet, and the deployment's revision number is then updated // by copying its newRS revision number. We should not copy deployment's revision to its newRS, since the update of // deployment revision number may fail (revision becomes stale) and the revision number in newRS is more reliable.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 07:09:11 UTC 2023 - 39.3K bytes - Viewed (0)