Skip to content

Find one scalable pattern to wrap clients, and deprecate others #2888

Open
@dlipovetsky

Description

@dlipovetsky

As @sbueringer observed in #2860 (comment),
we have, as of now, at least four different ways to wrap the client:

  • intercept.NewClient
  • NewDryRunClient
  • WithFieldOwner
  • WithStrictFieldValidation

... I think we should find a more scalable pattern to wrap clients.
If we continue to introduce a new wrapper for every single option we will end up with a lot of wrappers.

If we continue to introduce a new wrapper for every single option we will end up with a lot of wrappers.

I guess the same way we could either:

  • only have one wrapper taking various options and acting accordingly
    • This also makes the options more discoverable for users
    • Pretty sure we end up with more consistency then (see the list of wrappers below)
  • add options to the main client (that's probalby not good because then they cannot be used with the fake client)

/kind feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions