kubernetes

package
v0.0.0-...-dee1a13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamespaceBlacklistFieldSelector

func NamespaceBlacklistFieldSelector(blacklistedNamespaces []string) string

NamespaceBlacklistFieldSelector builds a Field Selector string to filter the response to not include namespaces that belong to the blacklisted namespaces

func Prefix

func Prefix(l []string, p string) []string

Prefix returns a new list where all items are prefixed with the string given as prefix

Types

type API

type API struct {
	Client kubernetes.Interface
}

API is an optionated facade for the Kubernetes api

func NewAPI

func NewAPI(config *rest.Config) (*API, error)

NewAPI creates a new Kubernetes api client

func (*API) CronJobs

func (k *API) CronJobs(namespace string) (*v1.CronJobList, error)

Cronjobs gets the list of cronjobs in a namespace

func (*API) DaemonSets

func (k *API) DaemonSets(namespace string) (*v1.DaemonSetList, error)

DaemonSets gets the list of daemonSets in a namespace

func (*API) Deployments

func (k *API) Deployments(namespace string) (*v1.DeploymentList, error)

Deployments gets the list of deployments in a namespace

func (*API) Namespaces

func (k *API) Namespaces(blacklistedNamespaces []string) (*v1.NamespaceList, error)

Namespaces gets the list of blacklisted namespaces

func (*API) Nodes

func (k *API) Nodes() (*corev1.NodeList, error)

Nodes gets the list of worker nodes (kubelets)

func (*API) NodesByName

func (k *API) NodesByName(nodeNames *set.String) (*[]corev1.Node, error)

NodesByName returns a list of nodes for the given node names

func (*API) Services

func (k *API) Services(namespace string) (*corev1.ServiceList, error)

Services gets the list of services in a namespace

func (*API) StatefulSets

func (k *API) StatefulSets(namespace string) (*v1.StatefulSetList, error)

Cronjobs gets the list of cronjobs in a namespace

type GetKubernetesAPI

type GetKubernetesAPI func(config *rest.Config) (*API, error)

Jump to

Keyboard shortcuts

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