Skip to content

Commit

Permalink
chore: remove wrong error log
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Jan 3, 2024
1 parent c7a1ebd commit 16a3867
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/canary_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (r *CanaryReconciler) Report() {
var canary v1.Canary
err := r.Get(gocontext.Background(), payload.NamespacedName, &canary)
if err != nil {
r.Log.Error(err, "failed to get canary", "canary", payload.NamespacedName)
r.Log.Error(err, "failed to get canary while reporting", "canary", payload.NamespacedName)
continue
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/jobs/canary/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package canary

import (
"fmt"
"strings"
"time"

v1 "github.com/flanksource/canary-checker/api/v1"
Expand All @@ -20,6 +21,11 @@ func updateCanaryStatusAndEvent(ctx context.Context, canary v1.Canary, results [
return
}

// Skip function if canary is not sourced from Kubernetes CRD
if !strings.HasPrefix(canary.Annotations["source"], "kubernetes") {
return
}

var checkStatus = make(map[string]*v1.CheckStatus)
var duration int64
var messages, errors []string
Expand Down

0 comments on commit 16a3867

Please sign in to comment.