api

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package api implements helper functions for manipulating resources in a Kubernetes cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubernetes

type Kubernetes interface {
	resources.UnstructuredOperations
	// Helpers returns helpers for the given namespace. If none is specified, "default" is used
	Helpers(namespace string) helpers.Helpers
}

Kubernetes defines an interface that extends kubernetes interface[k8s.io/client-go/kubernetes.Interface] adding generic functions that operate on any kind of object

func NewFromConfig

func NewFromConfig(c KubernetesConfig) (Kubernetes, error)

NewFromConfig returns a Kubernetes instance

type KubernetesConfig

type KubernetesConfig struct {
	// Context for executing kubernetes operations
	Context context.Context
	// kubernetes rest config
	Config *rest.Config
	// Clientset provides access to various API-specific clients
	Clientset k8s.Interface
	// Client is a pre-configured dynamic client. If provided, the rest config is not used
	Client dynamic.Interface
	// Mapper is a pre-configured RESTMapper. If provided, the rest config is not used
	Mapper meta.RESTMapper
}

KubernetesConfig defines the configuration for creating a Kubernetes instance

Jump to

Keyboard shortcuts

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