Skip to content

Commit

Permalink
Update version flag and README
Browse files Browse the repository at this point in the history
  • Loading branch information
rothgar committed Nov 29, 2022
1 parent 51b7263 commit b29d62d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ help: ## Show this help.
dds: kubectl-dds ## Build kubectl-dds binary

kubectl-dds: clean
go build -o kubectl-dds main.go
goreleaser build --single-target --snapshot --rm-dist

eks-cluster: ## Create an eks cluster
eksctl create cluster --auto-kubeconfig -f tests/eksctl.yaml
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,22 @@ kube-system pod pod-docker-volume mounted
```

You can run `dds` against a single manifest file or folder of manifest files (recursive).
The repo includes a test/manifests directory.
The repo includes a tests/manifests directory.

```
kubectl dds --filename test
kubectl dds --filename tests
```
example output
```
FILE LINE STATUS
test/manifests/docker-volume.cronjob.yaml 22 mounted
test/manifests/docker-volume.daemonset.yaml 24 mounted
test/manifests/docker-volume.deploy.test1.yaml 32 mounted
test/manifests/docker-volume.deploy.yaml 25 mounted
test/manifests/docker-volume.job.yaml 17 mounted
test/manifests/docker-volume.pod.kube-system.yaml 14 mounted
test/manifests/docker-volume.statefulset.yaml 26 mounted
tests/manifests/docker-volume.cronjob.yaml 22 mounted
tests/manifests/docker-volume.daemonset.yaml 24 mounted
tests/manifests/docker-volume.deploy.test1.yaml 32 mounted
tests/manifests/docker-volume.deploy.yaml 25 mounted
tests/manifests/docker-volume.job.yaml 17 mounted
tests/manifests/docker-volume.pod.kube-system.yaml 14 mounted
tests/manifests/docker-volume.replicaset.yaml 25 mounted
tests/manifests/docker-volume.statefulset.yaml 26 mounted
```

Use the `--verbose` with a log level (1-10) to get more output
Expand Down Expand Up @@ -114,7 +115,7 @@ If the docker.sock volume is found in any files the cli exit code with be 1.

## Build

To build the binary you can use `make dds` or `go build -o kubectl-dds main.go`
To build the binary you can use `go build -o kubectl-dds main.go` or `make dds` to use [goreleaser](https://goreleaser.com/).

Install the `kubectl-dds` binary somewhere in your path to use it with `kubectl` or use it by itself without kubectl.
The same kubectl authentication works with or without `kubectl` (e.g. $HOME/.kube/config or KUBECONFIG).
Expand Down
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"
)

var (
version = "development"
)

func main() {

klog.InitFlags(nil)
Expand All @@ -41,8 +45,6 @@ func main() {

pflag.Parse()

var version = "development"

flag.Set("v", strconv.Itoa(*verbose))
if *help {
pflag.PrintDefaults()
Expand Down

0 comments on commit b29d62d

Please sign in to comment.