Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kubectl-trace): package migration #23

Merged
merged 1 commit into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile.bpftrace
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ FROM golang:1.11.4-alpine3.8 as gobuilder
RUN apk update
RUN apk add make bash

ADD . /go/src/github.com/fntlnz/kubectl-trace
WORKDIR /go/src/github.com/fntlnz/kubectl-trace
ADD . /go/src/github.com/iovisor/kubectl-trace
WORKDIR /go/src/github.com/iovisor/kubectl-trace

RUN make _output/bin/trace-runner

FROM alpine:3.8

RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
COPY --from=builder /bpftrace/build-release/src/bpftrace /bin/bpftrace
COPY --from=gobuilder /go/src/github.com/fntlnz/kubectl-trace/_output/bin/trace-runner /bin/trace-runner
COPY --from=gobuilder /go/src/github.com/iovisor/kubectl-trace/_output/bin/trace-runner /bin/trace-runner

ENTRYPOINT ["/bin/trace-runner"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ IMAGE_BPFTRACE_LATEST := quay.io/fntlnz/kubectl-trace-bpftrace:latest

IMAGE_BUILD_FLAGS ?= "--no-cache"

LDFLAGS := -ldflags '-X github.com/fntlnz/kubectl-trace/pkg/version.buildTime=$(shell date +%s) -X github.com/fntlnz/kubectl-trace/pkg/version.gitCommit=${GIT_COMMIT}'
LDFLAGS := -ldflags '-X github.com/iovisor/kubectl-trace/pkg/version.buildTime=$(shell date +%s) -X github.com/iovisor/kubectl-trace/pkg/version.gitCommit=${GIT_COMMIT}'

kubectl_trace ?= _output/bin/kubectl-trace
trace_runner ?= _output/bin/trace-runner
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ of [bpftrace](https://github.com/iovisor/bpftrace) programs in your Kubernetes c
## Installation

```
go get -u github.com/fntlnz/kubectl-trace/cmd/kubectl-trace
go get -u github.com/iovisor/kubectl-trace/cmd/kubectl-trace
```

This will download and compile `kubectl-trace` so that you can use it as a kubectl plugin with `kubectl trace`
Expand Down
2 changes: 1 addition & 1 deletion cmd/kubectl-trace/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/fntlnz/kubectl-trace/pkg/cmd"
"github.com/iovisor/kubectl-trace/pkg/cmd"
"github.com/spf13/pflag"
"k8s.io/cli-runtime/pkg/genericclioptions"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
Expand Down
2 changes: 1 addition & 1 deletion cmd/trace-runner/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/fntlnz/kubectl-trace/pkg/cmd"
"github.com/iovisor/kubectl-trace/pkg/cmd"
"github.com/spf13/pflag"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/fntlnz/kubectl-trace
module github.com/iovisor/kubectl-trace

require (
cloud.google.com/go v0.34.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ k8s.io/klog v0.1.0 h1:I5HMfc/DtuVaGR1KPwUrTc476K8NCqNBldC7H4dYEzk=
k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be h1:aWEq4nbj7HRJ0mtKYjNSk/7X28Tl6TI6FeG8gKF+r7Q=
k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kubernetes v1.12.3 h1:1FH8TXY6pIuOHoNlsq9bB6rmCP0vfvQZH5YN7OXCHXU=
k8s.io/kubernetes v1.12.3 h1:5GPfYyyBylqcZUqL+ApYpYTm2IYjH56JUewYC0GbetU=
k8s.io/kubernetes v1.12.3/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/utils v0.0.0-20181115163542-0d26856f57b3 h1:S3/Kq185JnolOEemhmDXXd23l2t4bX5hPQPQPADlF1E=
k8s.io/utils v0.0.0-20181115163542-0d26856f57b3/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
Expand Down
2 changes: 1 addition & 1 deletion pkg/attacher/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/url"
"time"

"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/meta"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes/scheme"
Expand Down
10 changes: 5 additions & 5 deletions pkg/cmd/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"fmt"

"github.com/fntlnz/kubectl-trace/pkg/attacher"
"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/fntlnz/kubectl-trace/pkg/signals"
"github.com/fntlnz/kubectl-trace/pkg/tracejob"
"github.com/iovisor/kubectl-trace/pkg/attacher"
"github.com/iovisor/kubectl-trace/pkg/factory"
"github.com/iovisor/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/signals"
"github.com/iovisor/kubectl-trace/pkg/tracejob"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/types"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package cmd
import (
"fmt"

"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/fntlnz/kubectl-trace/pkg/tracejob"
"github.com/iovisor/kubectl-trace/pkg/factory"
"github.com/iovisor/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/tracejob"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/types"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"io"
"text/tabwriter"

"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/fntlnz/kubectl-trace/pkg/tracejob"
"github.com/iovisor/kubectl-trace/pkg/factory"
"github.com/iovisor/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/tracejob"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/types"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package cmd
import (
"fmt"

"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/fntlnz/kubectl-trace/pkg/logs"
"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/fntlnz/kubectl-trace/pkg/tracejob"
"github.com/iovisor/kubectl-trace/pkg/factory"
"github.com/iovisor/kubectl-trace/pkg/logs"
"github.com/iovisor/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/tracejob"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/types"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand Down
10 changes: 5 additions & 5 deletions pkg/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"fmt"
"io/ioutil"

"github.com/fntlnz/kubectl-trace/pkg/attacher"
"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/fntlnz/kubectl-trace/pkg/signals"
"github.com/fntlnz/kubectl-trace/pkg/tracejob"
"github.com/iovisor/kubectl-trace/pkg/attacher"
"github.com/iovisor/kubectl-trace/pkg/factory"
"github.com/iovisor/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/signals"
"github.com/iovisor/kubectl-trace/pkg/tracejob"
"github.com/spf13/cobra"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/uuid"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/fntlnz/kubectl-trace/pkg/factory"
"github.com/iovisor/kubectl-trace/pkg/factory"

"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/fntlnz/kubectl-trace/pkg/version"
"github.com/iovisor/kubectl-trace/pkg/version"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/logs/logs.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package logs

import (
"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/meta"
tcorev1 "k8s.io/client-go/kubernetes/typed/core/v1"

corev1 "k8s.io/api/core/v1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/meta/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const (
// TracePrefix is the prefix to identify objects created by this tool
TracePrefix = "kubectl-trace-"
// TraceIDLabelKey is a meta to annotate objects created by this tool
TraceIDLabelKey = "fntlnz.wtf/kubectl-trace-id"
TraceIDLabelKey = "iovisor.org/kubectl-trace-id"
// TraceLabelKey is a meta to annotate objects created by this tool
TraceLabelKey = "fntlnz.wtf/kubectl-trace"
TraceLabelKey = "iovisor.org/kubectl-trace"

// ObjectNamePrefix is the prefix used for objects created by kubectl-trace
ObjectNamePrefix = "kubectl-trace-"
Expand Down
4 changes: 2 additions & 2 deletions pkg/tracejob/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package tracejob
import (
"fmt"

"github.com/fntlnz/kubectl-trace/pkg/version"
"github.com/iovisor/kubectl-trace/pkg/version"

"io"
"io/ioutil"

"github.com/fntlnz/kubectl-trace/pkg/meta"
"github.com/iovisor/kubectl-trace/pkg/meta"
batchv1 "k8s.io/api/batch/v1"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down