From 4ff6355914e37c5418cdddd9caddb5f44e529504 Mon Sep 17 00:00:00 2001 From: Jeremie Lagarde Date: Mon, 16 Sep 2019 23:28:38 -0400 Subject: [PATCH 1/2] fix no starttime case --- pkg/cmd/get.go | 2 +- pkg/tracejob/job.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/get.go b/pkg/cmd/get.go index 6db6218e..9a325715 100644 --- a/pkg/cmd/get.go +++ b/pkg/cmd/get.go @@ -200,7 +200,7 @@ func jobsTablePrint(o io.Writer, jobs []tracejob.TraceJob) { // translateTimestampSince returns the elapsed time since timestamp in // human-readable approximation. -func translateTimestampSince(timestamp metav1.Time) string { +func translateTimestampSince(timestamp *metav1.Time) string { if timestamp.IsZero() { return "" } diff --git a/pkg/tracejob/job.go b/pkg/tracejob/job.go index 31ed24aa..dd68fc3c 100644 --- a/pkg/tracejob/job.go +++ b/pkg/tracejob/job.go @@ -35,7 +35,7 @@ type TraceJob struct { ImageNameTag string InitImageNameTag string FetchHeaders bool - StartTime metav1.Time + StartTime *metav1.Time Status TraceJobStatus } @@ -131,7 +131,7 @@ func (t *TraceJobClient) GetJob(nf TraceJobFilter) ([]TraceJob, error) { ID: types.UID(id), Namespace: j.Namespace, Hostname: hostname, - StartTime: *j.Status.StartTime, + StartTime: j.Status.StartTime, Status: jobStatus(j), } tjobs = append(tjobs, tj) From 2f514657b020409abc953792373d55daabc76bdf Mon Sep 17 00:00:00 2001 From: Hao Li Date: Tue, 17 Sep 2019 12:08:45 +0800 Subject: [PATCH 2/2] fix download links for OSX in Readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0f7c5f3..929dabf5 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ mv kubectl-trace /usr/local/bin/kubectl-trace **OSX** ```bash -curl -Lo https://github.com/iovisor/kubectl-trace/releases/download/v0.1.0-rc.0/kubectl-trace_0.1.0-rc.0_linux_amd64.tar.gz +curl -L -o kubectl-trace.tar.gz https://github.com/iovisor/kubectl-trace/releases/download/v0.1.0-rc.0/kubectl-trace_0.1.0-rc.0_darwin_amd64.tar.gz tar -xvf kubectl-trace.tar.gz mv kubectl-trace /usr/local/bin/kubectl-trace ```