Skip to content

feature request: fake client should try to automatically determine objects with subresources #2386

@nicks

Description

@nicks

Background

In v0.15.0, there was a breaking change to the fake client. Now, callers setting up a fake client need to manually call WithStatusSubresource for objects that have a status subresource. For more info, see:

#2259

Feature Request:

Rather than force users to manually configure the fake client, could we use reflection to check if the "Status" field exists? since it's just fake code, this seems like it would be safe?

Alternative implementations:

Alternatively, we could use the ObjectWithStatusSubResource interface from https://github.com/kubernetes-sigs/apiserver-runtime/blob/33c90185692756252ad3e36c5a940167d0de8f41/pkg/builder/resource/types.go#L81, but i'm not sure how widespread that is

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportCategorizes issue or PR as a support question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions