Description
Bug Report
Defining a DependenResource
of type e.g. Job
is slightly problematic at a first attempt.
The reason is that the Job
.spec.template
field is immutable and any update operation slightly changing it result in an error.
Here I'm tentatively disabling all the update
methods:
https://github.com/andreaTP/bink8s/blob/0177a66e4b31225c0b5a91e5694e80a3d3127df4/src/main/java/io/bink8s/controller/workflow/ImageBuildJobDependentResource.java#L85-L97
I'm not sure what would be the best course of action here, e.g. Labels can still be updated/reconciled, but we should make sure the .spec.template
remains untouched.
The problematic bit is that .spec.template
contains elements that are filled after the object is created e.g.:
spec:
template:
metadata:
creationTimestamp: null
labels:
controller-uid: 7ec0fb0f-d0fa-4795-b051-233d8d40f19c
I'm looking for guidance on how to handle this situation properly 🙏