Documentation ¶
Overview ¶
Package fake provides fake Kuberntes clients for testing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *fakek8s.Clientset *fakedynamic.FakeDynamicClient }
Client provides structured and dynamic fake clients
func (*Client) Patch ¶
func (cl *Client) Patch(gvr schema.GroupVersionResource, objNamespace string, objName string, jsonBytes []byte) (*unstructured.Unstructured, error)
Patch applies a patch for a resource. Important: fake clients should not be used for server-side apply or strategic-merge patches. https://github.com/kubernetes/kubernetes/pull/78630#issuecomment-500424163
Hence, we are mocking the Patch call in this fake client so that, instead of server-side apply as in the real client, we perform of merge patch instead.
Click to show internal directories.
Click to hide internal directories.