Skip to content

Commit

Permalink
fix serving duplicate pod
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce-Huang <[email protected]>
  • Loading branch information
Bryce-huang committed Jul 25, 2024
1 parent f861243 commit a91b545
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions controllers/core/function_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -926,10 +926,6 @@ func (r *FunctionReconciler) needToCreateServing(fn *openfunction.Function) bool
oldHash := fn.Status.Serving.ResourceHash
oldName := fn.Status.Serving.ResourceRef
// Serving had not created, need to create.
if r.servingExits(fn) {
log.V(1).Info("Serving not created")
return true
}

newHash := util.Hash(r.createServingSpec(fn))
// Serving changed, need to update.
Expand All @@ -949,10 +945,6 @@ func (r *FunctionReconciler) needToCreateServing(fn *openfunction.Function) bool
return false
}

func (r *FunctionReconciler) servingExits(fn *openfunction.Function) bool {
return fn.Status.Serving.State != "" && fn.Status.Serving.ResourceHash != "" && fn.Status.Serving.ResourceRef != ""
}

func (r *FunctionReconciler) createOrUpdateHTTPRoute(fn *openfunction.Function) error {
log := r.Log.WithName("createOrUpdateHTTPRoute")
var err error
Expand Down

0 comments on commit a91b545

Please sign in to comment.