-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Description
Righ now files are limited to 4MB
kubeconform/pkg/resource/stream.go
Line 51 in c4b044f
| const maxResourceSize = 4 * 1024 * 1024 // 4MB ought to be enough for everybody |
kubeconform/pkg/resource/files.go
Line 130 in c4b044f
| maxResourceSize := 4 * 1024 * 1024 // 4MB ought to be enough for everybody |
For example, I have a 17MB output for our Grafana deployment, mainly dozens of dashboards in ConfigMaps: 😛
Summary: 0 resource found parsing stdin - Valid: 0, Invalid: 0, Errors: 0, Skipped: 0
kubeval had the same issue and solved it with a default buffer (expend itself dynamically) and io.Copy() like in instrumenta/kubeval#220. Not sure how it affects the overall performance.
If you want to reproduce, here's a couple quick and dirty scripts to generate large files:
json.go
package main
import "fmt"
const (
N = 20000
)
func main() {
fmt.Println(
`{
"apiVersion": "v1",
"kind": "List",
"items": [`,
)
for i := 0; i < N; i++ {
fmt.Printf(
` {
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": {
"name": "yet-another-confimap-%d"
},
"data": {
"key": "value"
}
}`,
i,
)
if i == N - 1 {
fmt.Println()
} else {
fmt.Println(",")
}
}
fmt.Println(` ]
}
`)
}yaml.go
package main
import "fmt"
func main() {
fmt.Println(
`apiVersion: v1
kind: List
items:`,
)
for i := 0; i < 50000; i++ {
fmt.Printf(
`- apiVersion: v1
kind: ConfigMap
metadata:
name: yet-another-confimap-%d
data:
key: value
`,
i,
)
}
}Metadata
Metadata
Assignees
Labels
No labels