What command is used to record the action for below scenario

Anushka hasini:
What command is used to record the action for below scenario.

Luca F.:
the command always is to add the “–record” or “–record=true” flag to your command. This works also if the target resource isnt in the rollout api and commands, because it just add an annotation and that is interpreted/read from the rollout api.
For example i used it when editing pv and sc, even if rollout cmd doesnt work with them.

Anushka hasini:
Flag --record has been deprecated, --record will be removed in the future. Is it okay if i get output when i pass record arguments in the command

Luca F.:
that is the only way anyway, as far as i know.
they won’t remove it, till they provide an alternative, and i think there is still no alternative…

Anushka hasini:
Ok fine …But how do we verify whether the action is recorded or not. For example, i am editing statefulset to change the value of replicaset and would like to record that action

Luca F.:
as i said, “recording” means “annotating a resource”! so, if successful recorded, you will find the “change-cause” annotation on resource metadata…
i strongly believe you can manually annotate a resource in the same way, and result will be the same (in theory rollout should still work that way, but havent tried it by myself :D)

Alistair Mackay:
For the purpose of this, you can ignore the deprecation message - it will still have recorded.
All that does is to create an annotation <http://kubernetes.io/change-cause|kubernetes.io/change-cause> on the deployment with the command line you ran.

The deprecation discussion has been ongoing for five years now! Recent comments on this issue added by myself and others from this forum…
https://github.com/kubernetes/kubernetes/issues/40422