Skip to content

Commit b29d62d

Browse files
committed
Update version flag and README
1 parent 51b7263 commit b29d62d

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ help: ## Show this help.
77
dds: kubectl-dds ## Build kubectl-dds binary
88

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

1212
eks-cluster: ## Create an eks cluster
1313
eksctl create cluster --auto-kubeconfig -f tests/eksctl.yaml

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,22 @@ kube-system pod pod-docker-volume mounted
7070
```
7171

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

7575
```
76-
kubectl dds --filename test
76+
kubectl dds --filename tests
7777
```
7878
example output
7979
```
8080
FILE LINE STATUS
81-
test/manifests/docker-volume.cronjob.yaml 22 mounted
82-
test/manifests/docker-volume.daemonset.yaml 24 mounted
83-
test/manifests/docker-volume.deploy.test1.yaml 32 mounted
84-
test/manifests/docker-volume.deploy.yaml 25 mounted
85-
test/manifests/docker-volume.job.yaml 17 mounted
86-
test/manifests/docker-volume.pod.kube-system.yaml 14 mounted
87-
test/manifests/docker-volume.statefulset.yaml 26 mounted
81+
tests/manifests/docker-volume.cronjob.yaml 22 mounted
82+
tests/manifests/docker-volume.daemonset.yaml 24 mounted
83+
tests/manifests/docker-volume.deploy.test1.yaml 32 mounted
84+
tests/manifests/docker-volume.deploy.yaml 25 mounted
85+
tests/manifests/docker-volume.job.yaml 17 mounted
86+
tests/manifests/docker-volume.pod.kube-system.yaml 14 mounted
87+
tests/manifests/docker-volume.replicaset.yaml 25 mounted
88+
tests/manifests/docker-volume.statefulset.yaml 26 mounted
8889
```
8990

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

115116
## Build
116117

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

119120
Install the `kubectl-dds` binary somewhere in your path to use it with `kubectl` or use it by itself without kubectl.
120121
The same kubectl authentication works with or without `kubectl` (e.g. $HOME/.kube/config or KUBECONFIG).

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import (
2525
_ "k8s.io/client-go/plugin/pkg/client/auth"
2626
)
2727

28+
var (
29+
version = "development"
30+
)
31+
2832
func main() {
2933

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

4246
pflag.Parse()
4347

44-
var version = "development"
45-
4648
flag.Set("v", strconv.Itoa(*verbose))
4749
if *help {
4850
pflag.PrintDefaults()

0 commit comments

Comments
 (0)