guard usage of timestamp transformer under fieldManager non nil
not strictly necessary for correctness, but it is not needed unless SSA is enabled
This commit is contained in:
		@@ -659,8 +659,13 @@ func (p *patcher) patchResource(ctx context.Context, scope *RequestScope) (runti
 | 
				
			|||||||
		return obj, nil
 | 
							return obj, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						transformers := []rest.TransformFunc{p.applyPatch, p.applyAdmission, dedupOwnerReferencesTransformer}
 | 
				
			||||||
 | 
						if scope.FieldManager != nil {
 | 
				
			||||||
 | 
							transformers = append(transformers, fieldmanager.IgnoreManagedFieldsTimestampsTransformer)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wasCreated := false
 | 
						wasCreated := false
 | 
				
			||||||
	p.updatedObjectInfo = rest.DefaultUpdatedObjectInfo(nil, p.applyPatch, p.applyAdmission, dedupOwnerReferencesTransformer, fieldmanager.IgnoreManagedFieldsTimestampsTransformer)
 | 
						p.updatedObjectInfo = rest.DefaultUpdatedObjectInfo(nil, transformers...)
 | 
				
			||||||
	requestFunc := func() (runtime.Object, error) {
 | 
						requestFunc := func() (runtime.Object, error) {
 | 
				
			||||||
		// Pass in UpdateOptions to override UpdateStrategy.AllowUpdateOnCreate
 | 
							// Pass in UpdateOptions to override UpdateStrategy.AllowUpdateOnCreate
 | 
				
			||||||
		options := patchToUpdateOptions(p.options)
 | 
							options := patchToUpdateOptions(p.options)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user