Skip to content

Introducing Multitracker!

Compare
Choose a tag to compare
@distorhead distorhead released this 02 Jul 12:54
5724f1b

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

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

Darwin amd64

Windows amd64

SHA256SUMS