Permalink
Browse files

Bumping kubernetes client-go version.

Falling back --since to default value of 48h if not specified.

Signed-off-by: Michal Schott <schott.michal@gmail.com>
  • Loading branch information...
michalschott committed Jul 20, 2018
1 parent 08066e4 commit 2635c80459c4217760b8787ae8adfbfd038eb331
Showing with 651 additions and 1,330 deletions.
  1. +5 −1 cmd/cli.go
  2. +646 −1,329 vendor/vendor.json
View
@@ -73,7 +73,7 @@ func Run() {
cmd.Flags().StringVarP(&opts.container, "container", "c", opts.container, "Container name when multiple containers in pod")
cmd.Flags().StringVar(&opts.containerState, "container-state", opts.containerState, "If present, tail containers with status in running, waiting or terminated. Default to running.")
cmd.Flags().BoolVarP(&opts.timestamps, "timestamps", "t", opts.timestamps, "Print timestamps")
cmd.Flags().DurationVarP(&opts.since, "since", "s", opts.since, "Return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs.")
cmd.Flags().DurationVarP(&opts.since, "since", "s", opts.since, "Return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to 48h.")
cmd.Flags().StringVar(&opts.context, "context", opts.context, "Kubernetes context to use. Default to current context configured in kubeconfig.")
cmd.Flags().StringVarP(&opts.namespace, "namespace", "n", opts.namespace, "Kubernetes namespace to use. Default to namespace configured in Kubernetes context")
cmd.Flags().StringVar(&opts.kubeConfig, "kubeconfig", opts.kubeConfig, "Path to kubeconfig file to use")
@@ -243,6 +243,10 @@ func parseConfig(args []string) (*stern.Config, error) {
return nil, errors.Wrap(err, "unable to parse template")
}
if opts.since == 0 {
opts.since = 172800000000000 // 48h
}
return &stern.Config{
KubeConfig: kubeConfig,
PodQuery: pod,
Oops, something went wrong.

0 comments on commit 2635c80

Please sign in to comment.