cancel
Showing results for 
Search instead for 
Did you mean: 
Sergey
Flight Engineer Flight Engineer
Flight Engineer
  • 4,027 Views

what is a different between rollout and deploy

Jump to solution

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?

Labels (1)
1 Solution

Accepted Solutions
oldbenko
Moderator
Moderator
  • 4,011 Views

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

A black cat crossing the street signifies that the animal is going somewhere.
[don't forget to kudo a helpful post or mark it as a solution!]

View solution in original post

1 Reply
oldbenko
Moderator
Moderator
  • 4,012 Views

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

A black cat crossing the street signifies that the animal is going somewhere.
[don't forget to kudo a helpful post or mark it as a solution!]
Join the discussion
You must log in to join this conversation.