werf/kubedog

Print status updates only when a change occures

dudicoco opened this issue · 1 comments

Currently, kubedog prints updates on a fixed interval according to StatusProgressPeriod, this causes a lot of identical prints for deployments which have not progressed yet, for example:

┌ Status progress
│ DEPLOYMENT                                                                     REPLICAS       AVAILABLE       UP-TO-DATE
│ amazing-app                                                                    2/1            1               1
│ │   POD                           READY      RESTARTS       STATUS             ---
│ ├── app-67c7cc9cb8-v5zt2          0/1        0              Running            Waiting for: replicas 2->1
│ └── app-bfbc6579c-nv97v           1/1        0              Running
└ Status progress

┌ Status progress
│ DEPLOYMENT                                                                     REPLICAS       AVAILABLE       UP-TO-DATE
│ amazing-app                                                                    2/1            1               1
│ │   POD                           READY      RESTARTS       STATUS             ---
│ ├── app-67c7cc9cb8-v5zt2          1/1        0              Running            Waiting for: replicas 2->1
│ └── app-bfbc6579c-nv97v           1/1        0              Running
└ Status progress

┌ Status progress
│ DEPLOYMENT                                                                     REPLICAS       AVAILABLE       UP-TO-DATE
│ amazing-app                                                                    2/1            1               1
│ │   POD                           READY      RESTARTS       STATUS             ---
│ ├── app-67c7cc9cb8-v5zt2          1/1        0              Running            Waiting for: replicas 2->1
│ └── app-bfbc6579c-nv97v           1/1        0              Running
└ Status progress

┌ Status progress
│ DEPLOYMENT                                                                     REPLICAS       AVAILABLE       UP-TO-DATE
│ amazing-app                                                                    2/1            1               1
│ │   POD                           READY      RESTARTS       STATUS             ---
│ ├── app-67c7cc9cb8-v5zt2          1/1        0              Running            Waiting for: replicas 2->1
│ └── app-bfbc6579c-nv97v           1/1        0              Running
└ Status progress

┌ Status progress
│ DEPLOYMENT                                                                     REPLICAS       AVAILABLE       UP-TO-DATE
│ amazing-app                                                                    2/1            1               1
│ │   POD                           READY      RESTARTS       STATUS             ---
│ ├── app-67c7cc9cb8-v5zt2          1/1        0              Running            Waiting for: replicas 2->1
│ └── app-bfbc6579c-nv97v           1/1        0              Running
└ Status progress

┌ Status progress
│ DEPLOYMENT                                                                     REPLICAS       AVAILABLE       UP-TO-DATE
│ amazing-app                                                                    2/1            1               1
│ │   POD                           READY      RESTARTS       STATUS             ---
│ ├── app-67c7cc9cb8-v5zt2          1/1        0              Running            Waiting for: replicas 2->1
│ └── app-bfbc6579c-nv97v           1/1        0              Running
└ Status progress

It would be more efficient if kubedog would print updates only when a change to the deployment has occurred.

New Dynamic Tracker, which will obsolete Multitracker, implements Controller that populates Storage with resource states, events, logs. It is up to the user to get relevant info from Storage, format and print it however he needs. Reference implementation for stdout Printer, which works with this Storage, can be found at https://github.com/werf/nelm