Skip to content

Commit

Permalink
fixed canary traffic not right
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce-Huang <[email protected]>
  • Loading branch information
Bryce-huang committed Oct 20, 2023
1 parent 66ed784 commit c01dd1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/core/function_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (r *FunctionReconciler) updateCanaryRelease(fn *openfunction.Function) (*ti
fn.Status.RolloutStatus.Canary.CanaryStepStatus.CurrentStepState = openfunction.CanaryStepStatePaused
fn.Status.RolloutStatus.Canary.CanaryStepStatus.LastUpdateTime = &metav1.Time{Time: time.Now()}
fn.Status.RolloutStatus.Canary.CanaryStepStatus.Message = "Canary release steps to " +
strconv.Itoa(int(fn.Status.RolloutStatus.Canary.CanaryStepStatus.CurrentStepIndex))
strconv.Itoa(int(fn.Status.RolloutStatus.Canary.CanaryStepStatus.CurrentStepIndex)+1)
}
if err := r.updateStatus(fn); err != nil {
log.Error(err, "Failed to update function canary status")
Expand Down Expand Up @@ -978,7 +978,7 @@ func (r *FunctionReconciler) createOrUpdateHTTPRoute(fn *openfunction.Function)
ObjectMeta: metav1.ObjectMeta{Namespace: fn.Namespace, Name: fn.Name},
}
op, err := controllerutil.CreateOrUpdate(r.ctx, r.Client, httpRoute, r.mutateHTTPRoute(fn, stableHost, host,
serviceName, stableServiceName, ns, weight, port, gateway, httpRoute))
stableServiceName, serviceName, ns, weight, port, gateway, httpRoute))
if err != nil {
log.Error(err, "Failed to CreateOrUpdate HTTPRoute")
return err
Expand Down

0 comments on commit c01dd1f

Please sign in to comment.