Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func GetCanaryConfigName(d *appsv1.Deployment) string
- func GetCanaryPolicyName(d *appsv1.Deployment) string
- func MakeBaselineName(c *appsv1.Deployment) string
- func MakeCanaryConfigName(p *v1.CanaryPolicy, c *appsv1.Deployment) string
- func MakeCanaryServiceName(p *v1.CanaryPolicy, c *appsv1.Deployment) string
- type CanaryObjectPredicate
- type ReconcileDeployment
- func (r *ReconcileDeployment) GetCanaryPolicy(ctx context.Context, c *appsv1.Deployment) (*v1.CanaryPolicy, error)
- func (r *ReconcileDeployment) Reconcile(request reconcile.Request) (reconcile.Result, error)
- func (r *ReconcileDeployment) UpdateCanaryConfigName(ctx context.Context, policy *v1.CanaryPolicy, c *appsv1.Deployment) error
Constants ¶
const ( CanaryPolicyLabel = "krane.sh/canary-policy" CanaryConfigLabel = "krane.sh/canary-config" KraneTierLabel = "krane.sh/tier" )
Variables ¶
This section is empty.
Functions ¶
func Add ¶
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 (p *CanaryObjectPredicate) Create(e event.CreateEvent) bool
func (*CanaryObjectPredicate) Delete ¶
func (p *CanaryObjectPredicate) Delete(e event.DeleteEvent) bool
func (*CanaryObjectPredicate) Generic ¶
func (p *CanaryObjectPredicate) Generic(e event.GenericEvent) bool
func (*CanaryObjectPredicate) Update ¶
func (p *CanaryObjectPredicate) Update(e event.UpdateEvent) bool
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 ¶
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