deployment

package
v0.0.0-...-e7e48df Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CanaryPolicyLabel = "krane.sh/canary-policy"
	CanaryConfigLabel = "krane.sh/canary-config"
	KraneTierLabel    = "krane.sh/tier"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Deployment Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func GetCanaryConfigName

func GetCanaryConfigName(d *appsv1.Deployment) string

GetCanaryConfigName returns the canary config name if it exists

func GetCanaryPolicyName

func GetCanaryPolicyName(d *appsv1.Deployment) string

GetCanaryPolicyName returns the canary policy name if it exists

func MakeBaselineName

func MakeBaselineName(c *appsv1.Deployment) string

MakeBaselinename returns the name of the baseline object

func MakeCanaryConfigName

func MakeCanaryConfigName(p *v1.CanaryPolicy, c *appsv1.Deployment) string

MakeCanaryConfigName returns the canary config name based on the name of the canary instance and the policy

func MakeCanaryServiceName

func MakeCanaryServiceName(p *v1.CanaryPolicy, c *appsv1.Deployment) string

Types

type CanaryObjectPredicate

type CanaryObjectPredicate struct{}

CanaryObjectPredicate filters out all Deployments that are not Canaries

func (*CanaryObjectPredicate) Create

func (*CanaryObjectPredicate) Delete

func (*CanaryObjectPredicate) Generic

func (*CanaryObjectPredicate) Update

type ReconcileDeployment

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

ReconcileDeployment reconciles a Deployment object

func (*ReconcileDeployment) GetCanaryPolicy

func (r *ReconcileDeployment) GetCanaryPolicy(ctx context.Context, c *appsv1.Deployment) (*v1.CanaryPolicy, error)

func (*ReconcileDeployment) Reconcile

func (r *ReconcileDeployment) Reconcile(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 The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*ReconcileDeployment) UpdateCanaryConfigName

func (r *ReconcileDeployment) UpdateCanaryConfigName(ctx context.Context, policy *v1.CanaryPolicy, c *appsv1.Deployment) error

Jump to

Keyboard shortcuts

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