System info:
Describe the bug
kube-linter crashes with a Go stack overflow on Windows when linting a repository that contains Kustomize manifests.
This reproduces with v0.8.3. v0.7.6 does not crash. Native Kustomize rendering was added in v0.8.0 via #1045.
To Reproduce
Steps to reproduce the behavior:
- Run kube-linter on Windows against a repository containing Kustomize manifests.
- Example command:
kube-linter lint . --config .kube-linter.yaml
- With
v0.8.3, the command crashes with stack overflow.
Sample YAML input
The crash was reproduced on a repository containing Kustomize manifests. The failure happens before normal lint results are returned.
Expected behavior
kube-linter should not crash. It should either report normal lint findings or complete with no lint errors.
Screenshots
N/A
Additional context
The stack trace repeatedly shows recursion in kyaml's in-memory filesystem:
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow
sigs.k8s.io/kustomize/kyaml/filesys.(*fsNode).addDir
sigs.k8s.io/kustomize/kyaml@v0.20.1/filesys/fsnode.go:169
github.com/lburgazzoli/k8s-manifests-lib/pkg/renderer/kustomize/unionfs.(*Builder).Build
github.com/lburgazzoli/k8s-manifests-lib/pkg/renderer/kustomize.(*Engine).prepareFilesystem
golang.stackrox.io/kube-linter/pkg/lintcontext.(*lintContextImpl).loadObjectsFromKustomize
Full stack trace:
kube-linter-v0.8.3-windows-stack-overflow.log
The stack trace points to github.com/lburgazzoli/k8s-manifests-lib while kube-linter is rendering Kustomize manifests.
System info:
Describe the bug
kube-lintercrashes with a Go stack overflow on Windows when linting a repository that contains Kustomize manifests.This reproduces with
v0.8.3.v0.7.6does not crash. Native Kustomize rendering was added inv0.8.0via #1045.To Reproduce
Steps to reproduce the behavior:
v0.8.3, the command crashes with stack overflow.Sample YAML input
The crash was reproduced on a repository containing Kustomize manifests. The failure happens before normal lint results are returned.
Expected behavior
kube-lintershould not crash. It should either report normal lint findings or complete with no lint errors.Screenshots
N/A
Additional context
The stack trace repeatedly shows recursion in kyaml's in-memory filesystem:
Full stack trace:
kube-linter-v0.8.3-windows-stack-overflow.log
The stack trace points to
github.com/lburgazzoli/k8s-manifests-libwhile kube-linter is rendering Kustomize manifests.