Documentation ¶
Overview ¶
Package deployment contains all the logic for handling Kubernetes Deployments. It implements a set of strategies (rolling, recreate) for deploying an application, the means to rollback to previous versions, proportional scaling for mitigating risk, cleanup policy, and other useful features of Deployments.
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func ScaleDownLimitForOld(oldRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet, deployment *apps.Deployment, ...) int32
- type DeploymentController
- type MutatingWebhookEventHandler
- func (m MutatingWebhookEventHandler) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (m MutatingWebhookEventHandler) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (m MutatingWebhookEventHandler) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (m MutatingWebhookEventHandler) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type ReconcileDeployment
Constants ¶
const (
DefaultRetryDuration = 2 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new StatefulSet Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func ScaleDownLimitForOld ¶
func ScaleDownLimitForOld(oldRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet, deployment *apps.Deployment, partition intstrutil.IntOrString) int32
ScaleDownLimitForOld return the limitation of old replica sets under the partition settings.
Types ¶
type DeploymentController ¶
type DeploymentController struct {
// contains filtered or unexported fields
}
DeploymentController is responsible for synchronizing Deployment objects stored in the system with actual running replica sets and pods.
type MutatingWebhookEventHandler ¶
func (MutatingWebhookEventHandler) Create ¶
func (m MutatingWebhookEventHandler) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
func (MutatingWebhookEventHandler) Delete ¶
func (m MutatingWebhookEventHandler) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
func (MutatingWebhookEventHandler) Generic ¶
func (m MutatingWebhookEventHandler) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
func (MutatingWebhookEventHandler) Update ¶
func (m MutatingWebhookEventHandler) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
type ReconcileDeployment ¶
type ReconcileDeployment struct { // client interface client.Client // contains filtered or unexported fields }
ReconcileDeployment reconciles a Deployment object
func (*ReconcileDeployment) Reconcile ¶
func (r *ReconcileDeployment) Reconcile(_ context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a Deployment object and makes changes based on the state read and what is in the Deployment.Spec and Deployment.Annotations Automatically generate RBAC rules to allow the Controller to read and write ReplicaSets