Skip to content

Commit

Permalink
plugin: Allow unknown JSON fields from agent (#53)
Browse files Browse the repository at this point in the history
Enables future semver-minor changes to agent->plugin messages.
  • Loading branch information
sharnoff authored Feb 24, 2023
1 parent 6cb918e commit c24f3b9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/plugin/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func (e *AutoscaleEnforcer) runPermitHandler(ctx context.Context) {
defer r.Body.Close()
var req api.AgentRequest
jsonDecoder := json.NewDecoder(io.LimitReader(r.Body, MaxHTTPBodySize))
jsonDecoder.DisallowUnknownFields()
if err := jsonDecoder.Decode(&req); err != nil {
klog.Warningf("[autoscale-enforcer] Received bad JSON request: %s", err)
w.Header().Add("Content-Type", ContentTypeError)
Expand Down

0 comments on commit c24f3b9

Please sign in to comment.