Skip to content

Commit dcf1f49

Browse files
tomasfabianbuehler
andauthored
fix: AdmissionResponse.PatchType set to AdmissionResponse.JsonPatch in 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]>
1 parent 4bc5868 commit dcf1f49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/KubeOps/Operator/Webhooks/IMutationWebhook{TEntity}.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ AdmissionResponse IAdmissionWebhook<TEntity, MutationResult>.TransformResult(
7777

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

8283
return response;

0 commit comments

Comments
 (0)