-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add --watch
option to release command
#1525
Add --watch
option to release command
#1525
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this out and it works well! I've made some suggestions for refining it a bit.
It'd be cool if the progress table refreshed in place, but that can come after.
Had a look and it worked great, thanks @iandotmartin! I'm thinking about how to display the data. It's quite hard to parse for me now and gauge any progress:
What about having the column header say That would then look like
Edit: this could also eventually be displayed in |
* More humon-friendly replica information * Handle err returned from await * Exit early for watch to avoid nesting * Unify dot styling * Move status writing to function
* Only monitor AffectedResources * Use status rather than outdated to determine completion * Fix fallthrough behavior for `interactive` option * Swap Ready and Desired for proper replica info
@iandotmartin Please consider cherry-picking ae29a97, which I made to tweak how this works. Main thing it addresses: it needs to wait for the commit to be synced before moving on to show rollout progress, otherwise it will (usually) succeed immediately. |
Unless the newly committed change has been synced, rollout status will usually return "ready" trivially. Therefore, always wait for job completion _and_ sync (using `await`) whether `--watch` was passed or not. Secondarily, - it doesn't make sense for someone to fluxctl release --dry-run --watch so make that a usage error. - print the updated pods vs desired, which gives a slightly better indication of progress; ready pods counts those that are outdated, so tends to be almost the same as desired. It's still not perfect -- I don't think there is a perfect -- since updated is different to updated-and-ready (I think).
@rndstr Can you advise on the best format for showing ready and updated pods? |
@squaremo cherry-pick'd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iandotmartin since we replaced the Ready
with Updated
, the verbose part should also be changed, bringing it to:
<updated>/<desired> (<outdated> outdated, <ready> ready)
@rndstr yep, seems reasonable! made those updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice @iandotmartin, looks good to me.
Submitting release ...
CONTROLLER STATUS UPDATES
default:deployment/nginx success nginx: nginx:1.14 -> 1.15
Commit pushed: ac2f3e3
Commit applied: ac2f3e3
Monitoring rollout ...
CONTROLLER CONTAINER IMAGE RELEASE REPLICAS
default:deployment/nginx nginx nginx:1.15 updating 2/3 (2 outdated, 2 ready)
CONTROLLER CONTAINER IMAGE RELEASE REPLICAS
default:deployment/nginx nginx nginx:1.15 updating 2/3 (2 outdated, 2 ready)
CONTROLLER CONTAINER IMAGE RELEASE REPLICAS
default:deployment/nginx nginx nginx:1.15 updating 3/3 (0 outdated, 2 ready)
CONTROLLER CONTAINER IMAGE RELEASE REPLICAS
default:deployment/nginx nginx nginx:1.15 ready 3/3 (0 outdated, 3 ready)
All controllers ready.
I tried using this with the helm operator and it seems to not work. For example, I have a custom git helm chart called "openapi-web" that I'm deploying to my cluster via the HelmRelease CRD and the helm-operator. When I disable automation and use "fluxctl release --all --update-all-images --watch" I get: Repeated over and over again and it never completes. |
I have exactly same problem. --watch never ends when automation disabled
BTW: |
Adds a flag to
fluxctl release
to observe rollout progress during the release. Shows the numbers of pods desired, up-to-date, available, and outdated.Note: I wasn't sure if it made sense to add a case somewhere in
release_cmd_test
for this flag, since there's no change to the release spec. Happy to add one if desired!Addresses #1424