deployment

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 14 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 added in v1.3.0

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

Patch patchs 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 DeploymentSpec added in v1.3.0

type DeploymentSpec struct {
	Template PodTemplateSpec `json:"template"`
}

type Option

type Option func(*Deployment)

Option configures a Deployment

func WithCompleteParams

func WithCompleteParams(addr string, client *httpclient.HTTPClient) Option

WithCompleteParams provides an Option

type PatchStruct added in v1.3.0

type PatchStruct struct {
	Spec DeploymentSpec `json:"spec"`
}

type PodSpec added in v1.3.0

type PodSpec struct {
	Containers []v1.Container `json:"containers"`
}

type PodTemplateSpec added in v1.3.0

type PodTemplateSpec struct {
	Spec PodSpec `json:"spec"`
}

Jump to

Keyboard shortcuts

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