namespaces

package
v0.0.0-...-cce75fc 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: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteAllOptions

type DeleteAllOptions struct {
	// LabelSelector selector for resources to be deleted
	LabelSelector string
	// IncludeVolumes flag to indicate if volumes have to be deleted or not
	IncludeVolumes bool
}

DeleteAllOptions options for delete all operation

type Namespaces

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

Namespaces struct to interact with namespaces in k8s

func NewNamespace

func NewNamespace(dynClient dynamic.Interface, discClient discovery.DiscoveryInterface, restConfig *rest.Config, k8s kubernetes.Interface) *Namespaces

NewNamespace allows to create a new Namespace object

func (*Namespaces) DestroySFSVolumes

func (n *Namespaces) DestroySFSVolumes(ctx context.Context, ns string, opts DeleteAllOptions) error

DestroySFSVolumes This function deletes volumes for any statefulset that matches with opts.LabelSelector but it doesn't have any dev.okteto.com/deployed-by label. This is to avoid to left PVCs behind when everything deployed with okteto deploy command is deleted

func (*Namespaces) DestroyWithLabel

func (n *Namespaces) DestroyWithLabel(ctx context.Context, ns string, opts DeleteAllOptions) error

DestroyWithLabel deletes all resources within a namespace

type Options

type Options struct {
	List        metav1.ListOptions
	Namespace   string
	Parallelism int64
}

type Traveler

type Traveler interface {
	See(obj runtime.Object) error
}

type TravelerFunc

type TravelerFunc func(obj runtime.Object) error

func (TravelerFunc) See

func (t TravelerFunc) See(obj runtime.Object) error

type Trip

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

Jump to

Keyboard shortcuts

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