Unable to execute drift because prerequisites failing
herrbpl opened this issue · 3 comments
herrbpl commented
When trying to run drift
helm --debug -l debug drift run -n test-bo02-ca-02 test-bo02 --from-release -l debug
, I get
{"level":"info","msg":"exec: \"go\": executable file not found in $PATH","time":"2024-03-08T08:31:40Z"}
{"level":"info","msg":"helm-drift requires 'kubectl' to identify drifts","time":"2024-03-08T08:31:40Z"}
2024/03/08 08:31:40 cmd.go:22: validation failed, please install prerequisites to identify drifts
Error: plugin "drift" exited with error
helm.go:84: [debug] plugin "drift" exited with error
I have kubectl in path
kubectl version
Client Version: v1.28.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.5-eks-5e0fdde
helm drift version
drift version: {"version":"0.0.8","revision":"407b5c7627dc9403ee4d4f09f16863cdbb5aec06","environment":"production","build-date":"2023-10-29T16:50:21Z","go-version":"go1.21.1","platform":"linux/amd64"}
Documentation does mention about kubectl being needed but nothing more specific.
Not sure if this is bug or documentation issue
herrbpl commented
Perhaps instead of checking for existance of 'go', validation should check for kubectl?
https://github.com/nikhilsbhat/helm-drift/blob/main/pkg/validation.go#L11
nikhilsbhat commented
@herrbpl, As you pointed out, it is a bug where it checks for the presence of golang
rather than kubectl
during validations. I will work on this issue.
nikhilsbhat commented