What is the difference between rollout and deploy?
'oc rollout latest dc/myapp' seems to do exactly the same as 'oc deploy myapp --latest'
rollout has history, pause and resume subcommands that deploy doesn't seem to have. But is there any reason to have 'deploy' command if it only provides a subset of 'rollout' functionality?
Hey, @Sergey,
If you run the two commands with a higher log level (something like --loglevel=6 or so) you will be able to see they actually use different API endpoints.
Initially, oc deploy was the only endpoint available, but the backend for it has some bugs in the way it handles triggers.
Instead of fixing the handler and potentially breaking existing integrations that OpenShift users may have made and now rely upon, a new endpoint was created (oc rollout) that fixes this bug, and a deprecation notice was added to the old one.
With time, the rollout endpoint got some new features added to it, but of course, the deploy endpoint never went through such changes as it only exists for backwards compatibility any more.
In short, this is a very nice example of proper API management.
Cheers,
Grega
Hey, @Sergey,
If you run the two commands with a higher log level (something like --loglevel=6 or so) you will be able to see they actually use different API endpoints.
Initially, oc deploy was the only endpoint available, but the backend for it has some bugs in the way it handles triggers.
Instead of fixing the handler and potentially breaking existing integrations that OpenShift users may have made and now rely upon, a new endpoint was created (oc rollout) that fixes this bug, and a deprecation notice was added to the old one.
With time, the rollout endpoint got some new features added to it, but of course, the deploy endpoint never went through such changes as it only exists for backwards compatibility any more.
In short, this is a very nice example of proper API management.
Cheers,
Grega
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.