Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Commit

Permalink
Moves debug deployment into separate directory including own readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-fritz committed Mar 13, 2019
1 parent a1320ad commit 78a2816
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ ADD . /go/src/github.com/chr-fritz/csi-sshfs

RUN go mod download
RUN export BUILD_TIME=`date -R` && \
export VERSION=`cat /go/src/github.com/chr-fritz/csi-sshfs/version.txt 2&> /dev/null` && \
go build -o /csi-sshfs -ldflags "-X 'github.com/chr-fritz/csi-sshfs/pkg/sshfs.BuildTime=${BUILD_TIME}' -X 'github.com/chr-fritz/csi-sshfs/pkg/sshfs.Version=${VERSION}'" -gcflags "all=-N -l" github.com/chr-fritz/csi-sshfs/cmd/csi-sshfs
export VERSION=`cat /go/src/github.com/chr-fritz/csi-sshfs/version.txt 2&> /dev/null`
RUN go build -o /csi-sshfs -ldflags "-X 'github.com/chr-fritz/csi-sshfs/pkg/sshfs.BuildTime=${BUILD_TIME}' -X 'github.com/chr-fritz/csi-sshfs/pkg/sshfs.Version=${VERSION}'" -gcflags "all=-N -l" github.com/chr-fritz/csi-sshfs/cmd/csi-sshfs

FROM alpine:3.9
EXPOSE 40000
Expand Down
17 changes: 17 additions & 0 deletions deploy/kubernetes-debug/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Debugging deployments

The deployments in this directory are intended to be used for debugging.

## Usage

Deploy the node plugin:
```bash
kubectl apply -f csi-nodeplugin-sshfs-debug.yaml
```

When the pod is started it waits until a debugger connects to it before it will do anything.
It will wait for debugging connections on NodePort `31040` and the CSI Socket interface on NodePort `31010`.

Please refer your IDE's documentation for information about connecting.

- IntelliJ & Goland: https://blog.jetbrains.com/go/2018/04/30/debugging-containerized-go-applications/

0 comments on commit 78a2816

Please sign in to comment.