Documentation ¶
Overview ¶
Package deployment manipulates the k8s api of deployment object
Index ¶
- type Deployment
- func (d *Deployment) Create(deploy *appsv1.Deployment) error
- func (d *Deployment) Delete(namespace, name string) error
- func (d *Deployment) Get(namespace, name string) (*appsv1.Deployment, error)
- func (d *Deployment) LimitedListAllNamespace(limit int, cont *string) (*appsv1.DeploymentList, *string, error)
- func (d *Deployment) List(namespace string, labelSelector map[string]string) (appsv1.DeploymentList, error)
- func (d *Deployment) Patch(namespace, deploymentName, containerName string, snippet v1.Container) error
- func (d *Deployment) Put(deployment *appsv1.Deployment) error
- func (d *Deployment) WatchAllNamespace(ctx context.Context, addfunc, updatefunc, deletefunc func(*appsv1.Deployment)) error
- type DeploymentSpec
- type Option
- type PatchStruct
- type PodSpec
- type PodTemplateSpec
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 (*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 PodTemplateSpec ¶ added in v1.3.0
type PodTemplateSpec struct {
Spec PodSpec `json:"spec"`
}
Click to show internal directories.
Click to hide internal directories.