When a deployment definition is updated we can view its revision by invoking oc rollout history deployment <id>.
Our operator does not currently set the deployment annotation kubernetes.io/change-cause, so the history currently displays without a description:
$ oc rollout history deployment test
deployments "test"
REVISION CHANGE-CAUSE
3 <none>
4 <none>
5 <none>
One easy thing we could do is allow for a deploymentMsg to be edited in our CR, and pass that into the deployment's kubernetes.io/change-cause annotation - this will create a history of changes. One thing to keep in mind is the scenario when the CR update doesn't update the Deployment obj - we could perhaps skip the update to kubernetes.io/change-cause in that case.
When a deployment definition is updated we can view its revision by invoking
oc rollout history deployment <id>
.Our operator does not currently set the deployment annotation
kubernetes.io/change-cause
, so the history currently displays without a description:One easy thing we could do is allow for a
deploymentMsg
to be edited in our CR, and pass that into the deployment'skubernetes.io/change-cause
annotation - this will create a history of changes. One thing to keep in mind is the scenario when the CR update doesn't update the Deployment obj - we could perhaps skip the update tokubernetes.io/change-cause
in that case.