numaproj / numaplane

Control Plane for Numaproj
Apache License 2.0
4 stars 3 forks source link

Spec hash annotation #52

Closed afugazzotto closed 1 week ago

afugazzotto commented 2 weeks ago

Fixes #4

Modifications

Created the function makeChildResourceFromRolloutAndUpdateSpecHash to make a new kubernetes.GenericObject based on the given rolloutObj. The function returns the child resource object ready to be created and an operation to be performed with the returned object. The operations are defined by the RolloutChildOperation constants and are: create the child resource, update the child resource, and do nothing. The returned operation will be used after this function is called to perform create/update operations or to skip create/update.

Verification

Used existing unit tests to make sure PipelineRollout did not change expected behavior. Added unit tests to verify new functions correctness.

NOTE

Additional changes to improve reusability of the functions should be made. However, we should make those changes in a different PR to have smaller incremental changes.