namespaces

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package namespaces provides implementation of Namespace resources for Kubernetes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespaces

type Namespaces struct {
	// contains filtered or unexported fields
}

Namespaces provides API for manipulating Namespace resources within a Kubernetes cluster

func New

func New(ctx context.Context, client kubernetes.Interface, metaOptions metav1.ListOptions) *Namespaces

New creates a new instance backed by the provided client

func (*Namespaces) Apply

func (obj *Namespaces) Apply(yaml string) (k8sTypes.Namespace, error)

Apply creates the Kubernetes resource given the supplied YAML configuration

func (*Namespaces) Create

func (obj *Namespaces) Create(
	namespace k8sTypes.Namespace,
	opts metav1.CreateOptions,
) (k8sTypes.Namespace, error)

Create creates the Kubernetes resource given the supplied object

func (*Namespaces) Delete

func (obj *Namespaces) Delete(name string, opts metav1.DeleteOptions) error

Delete removes the named Namespace from the cluster

func (*Namespaces) Get

func (obj *Namespaces) Get(name string, opts metav1.GetOptions) (k8sTypes.Namespace, error)

Get returns the named Namespaces instance within the cluster if available

func (*Namespaces) Kill

func (obj *Namespaces) Kill(name string, opts metav1.DeleteOptions) error

Kill removes the named Namespace from the cluster Deprecated: Use Delete instead.

func (*Namespaces) List

func (obj *Namespaces) List() ([]k8sTypes.Namespace, error)

List returns a collection of Namespaces available within the cluster

Jump to

Keyboard shortcuts

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