Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Flags = []cli.Flag{
&cli.BoolFlag{
Name: "verbose",
Aliases: []string{"vv"},
Usage: "Log verbose",
Required: false,
Value: false,
},
&cli.Int64Flag{
Name: "logs-tail",
Usage: "Length of logs tail when reporting of a problematic pod's logs",
Value: 250,
Required: false,
},
&cli.Int64Flag{
Name: "events-limit",
Usage: "Limits of namespace events to fetch",
Value: 150,
Required: false,
},
&cli.StringFlag{
Name: "kubeconfig",
Aliases: []string{"c"},
Usage: "path to kubeconfig file, defaults to ~/.kube/config",
Required: false,
},
&cli.StringFlag{
Name: "time-format",
Aliases: []string{"f"},
Value: time.RFC822,
Usage: "format for printing timestamps",
Required: false,
},
&cli.StringFlag{
Name: "locale",
Aliases: []string{"l"},
Value: "UTC",
Usage: "localization to use when printing timestamps",
Required: false,
},
&cli.Float64Flag{
Name: "pod-creation-grace-sec",
Value: 30,
Usage: "grace time in seconds since pod creation",
Required: false,
},
&cli.Int64Flag{
Name: "pod-termination-grace-sec",
Value: 30,
Usage: "grace time in seconds since pod termination",
Required: false,
},
&cli.IntFlag{
Name: "pod-restart-grace-count",
Value: 3,
Usage: "grace time in seconds since pod termination",
Required: false,
},
&cli.Float64Flag{
Name: "node-resource-usage-threshold",
Value: 0.85,
Usage: "node resources usage threshold",
Required: false,
},
&cli.StringFlag{
Name: "exclude-ns",
Aliases: []string{"e"},
Value: "",
Usage: "namespaces to skip",
Required: false,
},
&cli.StringFlag{
Name: "include-ns",
Aliases: []string{"i"},
Value: "",
Usage: "namespaces to include (will skip any not listed if this option is used)",
Required: false,
},
&cli.StringFlag{
Name: "name",
Aliases: []string{"n"},
Usage: "name of the scouted cluster",
Required: true,
},
&cli.IntFlag{
Name: "dedup-minutes",
Aliases: []string{"d"},
Value: 60,
Usage: "number of minutes to silence duplicated or already observed alerts or 0 if this feature should not be applied",
Required: false,
},
&cli.StringFlag{
Name: "store-filepath",
Aliases: []string{"s"},
Value: "kube-scout.store.json",
Usage: "path to store file where duplicated message information will be persisted or empty string if this feature should not be applied",
Required: false,
},
&cli.StringFlag{
Name: "output",
Aliases: []string{"o"},
Value: "pretty",
Usage: "output mode, one of pretty/json/yaml",
Required: false,
},
}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
PodLogsTail int64
EventsLimit int64
KubeconfigFilePath string
TimeFormat string
Locale *time.Location
PodCreationGracePeriodSeconds float64
PodTerminationGracePeriodSeconds int64
PodRestartGraceCount int32
NodeResourceUsageThreshold float64
ExcludeNamespaces []string
IncludeNamespaces []string
ClusterName string
MessagesDeduplicationDuration time.Duration
StoreFilePath string
OutputMode string
}
func DefaultConfig ¶
func DefaultConfig() (*Config, error)
func ParseConfig ¶
func ParseConfig(c *cli.Context) (*Config, error)
Click to show internal directories.
Click to hide internal directories.