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 corev1.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 Option
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 ¶
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
Click to show internal directories.
Click to hide internal directories.