deployment

package
v1.3.0-rc.0...-d217119 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package deployment manipulates the k8s api of deployment object

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

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

Deployment is the object to manipulate k8s api of deployment

func New

func New(options ...Option) *Deployment

New news a Deployment

func (*Deployment) Create

func (d *Deployment) Create(deploy *appsv1.Deployment) error

Create creates a k8s deployment object

func (*Deployment) Delete

func (d *Deployment) Delete(namespace, name string) error

Delete deletes a k8s deployment

func (*Deployment) Get

func (d *Deployment) Get(namespace, name string) (*appsv1.Deployment, error)

Get gets a k8s deployment object

func (*Deployment) LimitedListAllNamespace

func (d *Deployment) LimitedListAllNamespace(limit int, cont *string) (*appsv1.DeploymentList, *string, error)

func (*Deployment) List

func (d *Deployment) List(namespace string, labelSelector map[string]string) (*appsv1.DeploymentList, error)

List lists deployments under specific namespace

func (*Deployment) Patch

func (d *Deployment) Patch(namespace, deploymentName, containerName string, snippet corev1.Container) error

Patch the k8s deployment object

func (*Deployment) Put

func (d *Deployment) Put(deployment *appsv1.Deployment) error

Put updates a k8s deployment

func (*Deployment) WatchAllNamespace

func (d *Deployment) WatchAllNamespace(ctx context.Context, addFunc, updateFunc, deleteFunc func(*appsv1.Deployment)) error

type Option

type Option func(*Deployment)

Option configures a Deployment

func WithClientSet

func WithClientSet(c kubernetes.Interface) Option

WithClientSet with kubernetes clientSet

Jump to

Keyboard shortcuts

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