Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ Adding a new version? You'll need three changes:
Service, KongConsumer, KongConsumerGroup object to allow plugins to be associated with combinations
of those objects.
[#6252](https://github.com/Kong/kubernetes-ingress-controller/pull/6252)

### Added
- Add `INFO` log when admission result is not allowed
[#6084](https://github.com/Kong/kubernetes-ingress-controller/issues/6084)

## 3.2.0

Expand Down
11 changes: 11 additions & 0 deletions internal/admission/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

if response.Allowed != true {

Check failure on line 67 in internal/admission/handler.go

View workflow job for this annotation

GitHub Actions / linters / lint

S1002: should omit comparison to bool constant, can be simplified to `!response.Allowed` (gosimple)
h.Logger.Info(
"Object admission request not allowed",
"name", review.Request.Name,
"kind", review.Request.Kind.Kind,
"namespace", review.Request.Namespace,
"message", response.Result.Message,
)
}

review.Response = response

if err := json.NewEncoder(w).Encode(&review); err != nil {
Expand Down
Loading