-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Bug Report
Bundle validation passes when values within the CSV do not have appropriate types.
This has been encountered multiple times. We traced down the suspected offending lines to when the spec.version was a string as well as when metadata.annotations.* were not strings, for example,
metadata:
annotations:
certified: true
What did you do?
Ran opm render and opm bundle add resulting in an error message
Error: unrecognized type: string
When trying to track the source of the issue, we ran operator-sdk bundle validate, but no errors were raised.
What did you expect to see?
An error message indicating which values have the wrong type
What did you see instead? Under which circumstances?
Validation passed without errors
Environment
Operator type:
Kubernetes cluster type:
$ operator-sdk version
operator-sdk version: "v1.25.1", commit: "162690ff23f3542c0565e1420223e30dfae5dd49", kubernetes version: "1.25.0", go version: "go1.19.2", GOOS: "linux", GOARCH: "arm64"
$ go version (if language is Go)
$ kubectl version
Possible Solution
Additional context
These issues were encountered when trying to add bundles to an index image. We traced it down to improper types which bundle validation did not catch.
Related image in operator-registry: operator-framework/operator-registry#1039