Skip to content

--exit-with-error flag does not work #9

@konoui

Description

@konoui

Thank you for the great tool!
I found that the --exit-with-error flag does not work under some conditions.

Case1

flaky results occur when mounted and not-mounted resources of the same workload exist.

$ kubectl delete -f test/manifests
$ kubectl apply -f test/manifests/docker-volume.deploy.yaml
$ kubectl apply -f test/manifests/no-volume.deploy.yaml

$ kubectl dds --exit-with-error -n default
NAMESPACE       TYPE            NAME                    STATUS
default         deployment      deploy-docker-volume    mounted

$ echo $?
0

$ kubectl dds --exit-with-error
(snip)

$ echo $?
1

$ kubectl dds --exit-with-error
(snip)

$ echo $?
1

$ kubectl dds --exit-with-error
(snip)

$ echo $?
0

Case2

DDS exit with 0 when found only daemoset of docker volume.

$ kubectl delete -f test/manifests
$ kubectl dds --exit-with-error -n kube-system
NAMESPACE       TYPE            NAME            STATUS
kube-system     daemonset       aws-node        mounted

$ echo $?
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions