From 60e6b0f90cb4261817391d0c81e5f42685ff20da Mon Sep 17 00:00:00 2001 From: Leonardo Cecchi Date: Mon, 22 Jan 2024 17:44:18 +0100 Subject: [PATCH] fix: use JSON patch instead of expecting the whole object (#15) Signed-off-by: Leonardo Cecchi --- proto/operator.proto | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/proto/operator.proto b/proto/operator.proto index 9f1ac98..fcf61a1 100644 --- a/proto/operator.proto +++ b/proto/operator.proto @@ -33,11 +33,9 @@ message OperatorMutatePodRequest { } message OperatorMutatePodResult { - // This field is OPTIONAL. Value of this field is the JSON - // serialization of the Pod as modified by the plugin. - // If not present, the operator will assume that no changes - // have been requested by the plugins - bytes definition = 1; + // This field is OPTIONAL. Value of this field is a JSONPatch + // to be applied on the passed Pod definition + bytes json_patch = 1; } message OperatorCapabilitiesRequest { @@ -86,10 +84,9 @@ message OperatorMutateClusterRequest { } message OperatorMutateClusterResult { - // This field is REQUIRED. Value of this field is the JSON - // serialization of the Cluster that have received the - // default values - bytes definition = 1; + // This field is OPTIONAL. Value of this field is a JSONPatch + // to be applied on the passed Cluster definition + bytes json_patch = 1; } message ValidationError {