origin
origin copied to clipboard
Trigger rollouts based on diff between DC template and RC template
Today, we trigger new config-change rollouts based on a difference between latest DC and the DC encoded in latest RC annotation. This allows for user modification of RC which are managed by deployment config controller. We should not allow modifications to those RC and follow the upstream behavior where a modification to RS causes deployment controller to reconcile and revert that change, since the deployment is the source of truth for the RS.
Since this is a big change, there are couple problems:
The DC template spec has optional 'ObjecMeta' field that we copy annotations and labels into every RC created by this DC. However, we don't copy other fields (like name
or namespace
or ownerRefs
. This means creating a DC with these fields will cause endless chain of rollouts as those are not part of the latest RC and the diff between DC and latest RC results into a config change triggered rollout.
Fixing this is not trivial without risking a massive rollout for existing DC in large clusters. The "right" solution would be https://github.com/mfojtik/origin/commit/5d0e6ad3da which preserves the original template ObjectMeta and just add our labels/annotations.
I'm not sure about rollbacks and if they use the encoded DC as well.
Revealed here: https://github.com/openshift/origin/pull/14910
@smarterclayton @kargakis FYI
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
/lifecycle frozen /remove-lifecycle rotten