k8sclient

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package k8sclient provides the Kubernetes client for the controllers package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// typed Kubernetes client
	*kubernetes.Clientset
	// dynamic Kubernetes client
	*dynamic.DynamicClient
}

Client provides typed and dynamic Kubernetes clients

func New

func New(settings *cli.EnvSettings) (*Client, error)

New creates a new kubernetes client

func (*Client) Patch

func (cl *Client) Patch(gvr schema.GroupVersionResource, objNamespace string, objName string, jsonBytes []byte) (*unstructured.Unstructured, error)

Patch performs a server-side apply of GVR

type Interface

type Interface interface {
	kubernetes.Interface
	dynamic.Interface
	Patch(gvr schema.GroupVersionResource, objNamespace string, objName string, by []byte) (*unstructured.Unstructured, error)
}

Interface enables interaction with a Kubernetes cluster Can be mocked in unit tests with fake implementation

Directories

Path Synopsis
Package fake provides fake Kuberntes clients for testing
Package fake provides fake Kuberntes clients for testing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL