Prevent newdeploy updates deployment if no resources changed (#1452)
We used to update timestamp in the deployment environment field in order to trigger a rolling update when the function referenced resources get updated. However, use timestamp means we are not able to avoid triggering a rolling update when executor tries to adopt orphaned deployment due to timestamp changed which is unwanted. In order to let executor adopt deployment without triggering a rolling update, we need an identical way to get a value that can reflect res- ources changed without affecting by time. To achieve this goal, the sum of the resource version of all referenced resources is a good fit for our scenario since the sum of the resource version is always the same as long as no resources changed.
This commit is contained in:
@@ -22,8 +22,8 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
//LastUpdateTimestamp env variable is used for updating configmaps and secrets in pods
|
||||
LastUpdateTimestamp string = "LASTUPDATE_TIMESTAMP"
|
||||
// ResourceVersionCount env variable is used for updating configmaps and secrets in pods
|
||||
ResourceVersionCount string = "RESOURCE_VERSION_COUNT"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user