Skip to content

Commit

Permalink
fix: AdmissionResponse.PatchType set to AdmissionResponse.JsonPatch i…
Browse files Browse the repository at this point in the history
…n mutating webhooks (#540)

…in mutating webhooks for modifications. This is a follow up fix for
#536 #537.

Co-authored-by: Christoph Bühler <[email protected]>
  • Loading branch information
tomasfabian and buehler authored Mar 1, 2023
1 parent 4bc5868 commit dcf1f49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/KubeOps/Operator/Webhooks/IMutationWebhook{TEntity}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ AdmissionResponse IAdmissionWebhook<TEntity, MutationResult>.TransformResult(

var patch = KubernetesJsonDiffer.DiffObjects(from, to);
response.Patch = Convert.ToBase64String(Encoding.UTF8.GetBytes(patch.ToString()));
response.PatchType = AdmissionResponse.JsonPatch;
}

return response;
Expand Down

0 comments on commit dcf1f49

Please sign in to comment.