rode / enforcer-k8s

Apache License 2.0
0 stars 0 forks source link

Populate response message #9

Closed alexashley closed 3 years ago

alexashley commented 3 years ago

The enforcer should now return an message when an image fails policy:

Error from server: admission webhook "k8s-enforcer.rode.io" denied the request: container image "harbor.localhost/rode-demo/nginx:latest" failed the Rode policy "Sample Harbor Policy" (id: 38e62c17-750a-43e3-ad54-335571d340c4)

or when an error occurs:

Error from server: admission webhook "k8s-enforcer.rode.io" denied the request: error evaluating policy: rpc error: code = Unavailable desc = connection closed

Also includes some smaller changes:

This will require some changes to the Helm chart to allow for configuring the new flags, which I can do after this is merged and released.

codecov-commenter commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@4b078bf). Click here to learn what that means. The diff coverage is n/a.

:exclamation: Current head 1c64966 differs from pull request most recent head 52d6115. Consider uploading reports for the commit 52d6115 to get more accurate results Impacted file tree graph

@@           Coverage Diff            @@
##             main        #9   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?         2           
  Lines           ?        97           
  Branches        ?         0           
========================================
  Hits            ?        97           
  Misses          ?         0           
  Partials        ?         0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4b078bf...52d6115. Read the comment docs.