- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for EqualIgnoreHash (0.23 sec)
-
pkg/controller/deployment/rollback.go
func (dc *DeploymentController) rollbackToTemplate(ctx context.Context, d *apps.Deployment, rs *apps.ReplicaSet) (bool, error) { logger := klog.FromContext(ctx) performedRollback := false if !deploymentutil.EqualIgnoreHash(&d.Spec.Template, &rs.Spec.Template) { logger.V(4).Info("Rolling back deployment to old template spec", "deployment", klog.KObj(d), "templateSpec", rs.Spec.Template.Spec)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 05 23:39:52 UTC 2023 - 6.7K bytes - Viewed (0) -
pkg/controller/deployment/util/deployment_util.go
controllerRef := metav1.GetControllerOf(pod) if controllerRef != nil && rsMap[controllerRef.UID] { owned.Items = append(owned.Items, *pod) } } return owned, nil } // EqualIgnoreHash returns true if two given podTemplateSpec are equal, ignoring the diff in value of Labels[pod-template-hash] // We ignore pod-template-hash because: // 1. The hash result would be different upon podTemplateSpec API changes
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 07:09:11 UTC 2023 - 39.3K bytes - Viewed (0) -
pkg/controller/deployment/sync.go
// the status of the Deployment and requeue to try the creation in the next sync. controllerRef := metav1.GetControllerOf(rs) if controllerRef != nil && controllerRef.UID == d.UID && deploymentutil.EqualIgnoreHash(&d.Spec.Template, &rs.Spec.Template) { createdRS = rs err = nil break } // Matching ReplicaSet is not equal - increment the collisionCount in the DeploymentStatus
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/util/deployment_util_test.go
runTest := func(t1, t2 *v1.PodTemplateSpec, reversed bool) { reverseString := "" if reversed { reverseString = " (reverse order)" } // Run equal := EqualIgnoreHash(t1, t2) if equal != test.expected { t.Errorf("%q%s: expected %v", test.Name, reverseString, test.expected) return } if t1.Labels == nil || t2.Labels == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 08 09:10:50 UTC 2023 - 37.1K bytes - Viewed (0)