namespace

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package namespace manipulates the k8s api of namespace object

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

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

Namespace is the object to manipulate k8s api of namespace

func New

func New(options ...Option) *Namespace

New news a Namespace

func (*Namespace) Create

func (n *Namespace) Create(ns string, labels map[string]string) error

Create creates a k8s namespace TODO: Need to pass in the namespace structure

func (*Namespace) Delete

func (n *Namespace) Delete(ns string, force ...bool) error

Delete deletes a k8s namespace (deletes all dependents in the foreground)

func (*Namespace) Exists

func (n *Namespace) Exists(ns string) error

Exists decides whether a namespace exists

func (*Namespace) Update

func (n *Namespace) Update(ns string, labels map[string]string) error

type Option

type Option func(*Namespace)

Option configures a Namespace

func WithKubernetesClient

func WithKubernetesClient(k kubernetes.Interface) Option

WithKubernetesClient provides an Option

Jump to

Keyboard shortcuts

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