Skip to content

Return validation error when unsupported fields are set #3784

@sjberman

Description

@sjberman

As an NGF user,
I want clear feedback when I've specified a field that is unsupported by NGF,
So that I understand why certain features aren't working.

We used to follow a pattern during resource validation (like Gateways, Routes, etc) where we would set an error condition if a field was specified by the user that we don't support. We've fallen away from that as more fields get added.

This is a tough thing to keep up with, but we should continue to try to do this. For example, HTTPRoutes have Timeouts, Retry, and SessionPersistence fields that we don't yet support. If a user sets these, we'll silently ignore them, which is confusing for a user when they wonder why things aren't working as expected.

Something to note, we probably shouldn't reject the HTTPRoute if it has these unsupported fields specified. This would break existing users whose routes would go from being valid to invalid. To prevent this breakage, we should just set a new error condition in the status, but continue to configure the routes as-is.

Another note, it's going to be hard to keep up with this, so we need a disclaimer that we may not always be up to date.

Acceptance

  • For all fields in various resources (Gateway, HTTPRoute, GRPCRoute, etc) that NGF does not yet support, add validation and error conditions if they are specified
  • Routes should still be considered valid and configured, so we don't break existing users
  • Add a log and/or documentation to explain that we may not always be able to keep up with all experimental fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions