Skip to content

operator-sdk bundle validate doesn't check type correctness of all values #6168

@arewm

Description

@arewm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions