Tags: leokhoa/kubedog
Tags
# Cli '--output-prefix' option; improve multitracker output * Do not print excess newlines when resources are ready immediately. * Fix multitracker does not show StatefulSet's and DaemonSet's Pods logs. * Show logs of all Pods till pod reaches ready state (not configurable for now). ![Demo](https://raw.githubusercontent.com/flant/werf-demos/master/kubedog/kubedog-multitrack-with-output-prefix.gif)
# Introducing Multitracker! Multitracker aimed to track multiple resources at the same time. Resources configured using `MultitrackSpecs` structure: ``` type MultitrackSpecs struct { Deployments []MultitrackSpec StatefulSets []MultitrackSpec DaemonSets []MultitrackSpec Jobs []MultitrackSpec } ``` Each resource is specified using `MultitrackSpec` structure: ``` type MultitrackSpec struct { ResourceName string Namespace string FailMode FailMode AllowFailuresCount *int FailureThresholdSeconds *int LogRegex *regexp.Regexp LogRegexByContainerName map[string]*regexp.Regexp SkipLogs bool SkipLogsForContainers []string ShowLogsOnlyForContainers []string ShowLogsUntil DeployCondition SkipEvents bool } ``` Multitracker introduces fail-modes: IgnoreAndContinueDeployProcess, FailWholeDeployProcessImmediately and HopeUntilEndOfDeployProcess. Fail mode can be configured per-resource to completely ignore resource errors or ignore errors till all of the tracked resources become ready. Only `ResourceName` and `Namespace` are required fields of MultitrackSpec. # Multitrack cli There is minimal viable support of multitracker in kubedog cli. To use multitracker user must pass to kubedog stdin json structure which resembles golang structure `MultitrackSpecs`, for example: ``` cat << EOF | kubedog multitrack { "StatefulSets": [ { "ResourceName": "mysts1", "Namespace": "myns" } ], "Deployments": [ { "ResourceName": "mydeploy22", "Namespace": "myns" } ] } EOF ``` ![Kubedog multitrack cli demo](https://raw.githubusercontent.com/flant/werf-demos/master/kubedog/kubedog-multitrack-cmd.gif) # Deprecation of rollout and follow trackers BRIEF: users of rollout tracker should migrate to multitracker, users of follow tracker can continue using follow tracker. Old trackers will remain in the source code and cli. But these trackers will not receive future support. The reason is: multitracker solves main kubedog in the more common way. NOTE: Multitracker for now does not have follow-mode, it only works in rollout-mode (e.g. tracks resources until resources are ready). If you need follow mode, you can use old follow tracker for now. In the future multitracker will be configurable to run in either rollout or follow mode (in the follow mode multitracker should print info forever). # Installation [Linux amd64](https://dl.bintray.com/flant/kubedog/v0.3.0/kubedog-linux-amd64-v0.3.0) [Darwin amd64](https://dl.bintray.com/flant/kubedog/v0.3.0/kubedog-darwin-amd64-v0.3.0) [Windows amd64](https://dl.bintray.com/flant/kubedog/v0.3.0/kubedog-windows-amd64-v0.3.0.exe) [SHA256SUMS](https://dl.bintray.com/flant/kubedog/v0.3.0/SHA256SUMS)
# Fixes * rollout track for sts hangs in particular situations - support for partition: 0, no hang in this situation - support for automatic actions in case of OnDelete, no error - debug messages for sts are more clearer - final status works in debug mode * sts additional complete condition: updateReplicas==currentReplicas * set default timeout to 0 for rollout track * allow using arbitrary kube-config when running in-cluster-mode (e.g. from inside Pod) # Features * --kube-context and --kube-config flags * Configurable display out and err streams # Installation [Linux amd64](https://dl.bintray.com/flant/kubedog/v0.1.0/kubedog-linux-amd64-v0.1.0) [Darwin amd64](https://dl.bintray.com/flant/kubedog/v0.1.0/kubedog-darwin-amd64-v0.1.0) [Windows amd64](https://dl.bintray.com/flant/kubedog/v0.1.0/kubedog-windows-amd64-v0.1.0.exe) [SHA256SUMS](https://dl.bintray.com/flant/kubedog/v0.1.0/SHA256SUMS)
# Fix warning `ERROR: logging before flag.Parse` Kubedog should initialize `flag` package. # Added `kubedog verion command`