Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
don't return when there is only a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nikals99 committed Sep 14, 2021
1 parent f818696 commit 3dceb5e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions internal/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,18 @@ func (controller *Controller) HandleMutate(w http.ResponseWriter, r *http.Reques
if err != nil {
kind = "unknown"
controller.Sugar.Warnf("Error retrieving kind")
return
}

namespace, err := jsonparser.GetString(body, "request", "object", "metadata", "namespace")
if err != nil {
namespace = "unknown"
controller.Sugar.Warnf("Error retrieving namespace")
return
}

name, err := jsonparser.GetString(body, "request", "object", "metadata", "name")
if err != nil {
name = "unknown"
controller.Sugar.Warnf("Error retrieving name")
return
}

controller.Sugar.Infof("got a mutation request for kind=%s, namespace=%s, name=%s", kind, namespace, name)
Expand Down

0 comments on commit 3dceb5e

Please sign in to comment.