Skip to content

Commit

Permalink
feat: add makefile target to help users debug their projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Camila Macedo committed Aug 10, 2020
1 parent f7a3b65 commit 5b42202
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/plugin/v3/scaffolds/internal/templates/makefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ manager: generate fmt vet
run: generate fmt vet manifests
go run ./main.go
# Run with Delve for development purposes against the configured Kubernetes cluster in ~/.kube/config
# Delve is a debugger for the Go programming language. More info: https://github.com/go-delve/delve
run-delve: generate fmt vet manifests
go build -gcflags "all=-trimpath=$(shell go env GOPATH)" -o bin/manager main.go
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./bin/manager
# Install CRDs into a cluster
install: manifests kustomize
$(KUSTOMIZE) build config/crd | kubectl apply -f -
Expand Down
6 changes: 6 additions & 0 deletions testdata/project-v3-addon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ manager: generate fmt vet
run: generate fmt vet manifests
go run ./main.go

# Run with Delve for development purposes against the configured Kubernetes cluster in ~/.kube/config
# Delve is a debugger for the Go programming language. More info: https://github.com/go-delve/delve
run-delve: generate fmt vet manifests
go build -gcflags "all=-trimpath=$(shell go env GOPATH)" -o bin/manager main.go
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./bin/manager

# Install CRDs into a cluster
install: manifests kustomize
$(KUSTOMIZE) build config/crd | kubectl apply -f -
Expand Down
6 changes: 6 additions & 0 deletions testdata/project-v3-multigroup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ manager: generate fmt vet
run: generate fmt vet manifests
go run ./main.go

# Run with Delve for development purposes against the configured Kubernetes cluster in ~/.kube/config
# Delve is a debugger for the Go programming language. More info: https://github.com/go-delve/delve
run-delve: generate fmt vet manifests
go build -gcflags "all=-trimpath=$(shell go env GOPATH)" -o bin/manager main.go
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./bin/manager

# Install CRDs into a cluster
install: manifests kustomize
$(KUSTOMIZE) build config/crd | kubectl apply -f -
Expand Down
6 changes: 6 additions & 0 deletions testdata/project-v3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ manager: generate fmt vet
run: generate fmt vet manifests
go run ./main.go

# Run with Delve for development purposes against the configured Kubernetes cluster in ~/.kube/config
# Delve is a debugger for the Go programming language. More info: https://github.com/go-delve/delve
run-delve: generate fmt vet manifests
go build -gcflags "all=-trimpath=$(shell go env GOPATH)" -o bin/manager main.go
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./bin/manager

# Install CRDs into a cluster
install: manifests kustomize
$(KUSTOMIZE) build config/crd | kubectl apply -f -
Expand Down

0 comments on commit 5b42202

Please sign in to comment.