From 7a410d7c5b502e287ce05fccbd799fe9d99020cc Mon Sep 17 00:00:00 2001 From: John Murret Date: Wed, 3 Jan 2024 17:36:25 -0700 Subject: [PATCH] NET-6945 - Replace usage of deprecated Envoy field envoy.config.core.v3.HeaderValueOption.append (#20078) * NET-6945 - Replace usage of deprecated Envoy field envoy.config.core.v3.HeaderValueOption.append * update proto for v2 and then update xds v2 logic * add changelog * Update 20078.txt to be consistent with existing changelog entries * swap enum values tomatch envoy. --- .changelog/20078.txt | 3 + agent/xds/routes.go | 6 +- ...-route-timeoutfilter-one-set.latest.golden | 3 +- .../api-gateway-with-http-route.latest.golden | 3 +- ...ct-proxy-splitter-overweight.latest.golden | 12 ++-- ...-proxy-with-chain-and-router.latest.golden | 6 +- ...roxy-with-chain-and-splitter.latest.golden | 16 ++--- ...hain-and-router-header-manip.latest.golden | 12 ++-- ...ngress-with-chain-and-router.latest.golden | 6 +- ...ress-with-chain-and-splitter.latest.golden | 16 ++--- ...meout-ms-ingress-with-router.latest.golden | 6 +- ...xds-fetch-timeout-ms-sidecar.latest.golden | 6 +- agent/xdsv2/route_resources.go | 30 ++++---- .../pbproxystate/header_mutations.pb.go | 70 ++++++++++--------- .../pbproxystate/header_mutations.proto | 3 +- 15 files changed, 101 insertions(+), 97 deletions(-) create mode 100644 .changelog/20078.txt diff --git a/.changelog/20078.txt b/.changelog/20078.txt new file mode 100644 index 0000000000..00fd03f486 --- /dev/null +++ b/.changelog/20078.txt @@ -0,0 +1,3 @@ +```release-note:improvement +connect: Replace usage of deprecated Envoy field `envoy.config.core.v3.HeaderValueOption.append`. +``` diff --git a/agent/xds/routes.go b/agent/xds/routes.go index 7380314f65..80e207cf41 100644 --- a/agent/xds/routes.go +++ b/agent/xds/routes.go @@ -534,7 +534,10 @@ func makeHeadersValueOptions(vals map[string]string, add bool) []*envoy_core_v3. Key: k, Value: v, }, - Append: response.MakeBoolValue(add), + } + if !add { + // default is APPEND_IF_EXISTS_OR_ADD + o.AppendAction = envoy_core_v3.HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD } opts = append(opts, o) } @@ -1130,6 +1133,7 @@ func injectLBToRouteAction(lb *structs.LoadBalancer, action *envoy_route_v3.Rout } func injectHeaderManipToRoute(dest *structs.ServiceRouteDestination, r *envoy_route_v3.Route) error { + if !dest.RequestHeaders.IsZero() { r.RequestHeadersToAdd = append( r.RequestHeadersToAdd, diff --git a/agent/xds/testdata/routes/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden b/agent/xds/testdata/routes/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden index 2c220ee70e..ac6f2a1c2e 100644 --- a/agent/xds/testdata/routes/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden +++ b/agent/xds/testdata/routes/api-gateway-with-http-route-timeoutfilter-one-set.latest.golden @@ -19,14 +19,13 @@ }, "requestHeadersToAdd": [ { - "append": true, "header": { "key": "X-Header-Add", "value": "added" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "X-Header-Set", "value": "set" diff --git a/agent/xds/testdata/routes/api-gateway-with-http-route.latest.golden b/agent/xds/testdata/routes/api-gateway-with-http-route.latest.golden index 3137421e51..85dd47d993 100644 --- a/agent/xds/testdata/routes/api-gateway-with-http-route.latest.golden +++ b/agent/xds/testdata/routes/api-gateway-with-http-route.latest.golden @@ -19,14 +19,13 @@ }, "requestHeadersToAdd": [ { - "append": true, "header": { "key": "X-Header-Add", "value": "added" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "X-Header-Set", "value": "set" diff --git a/agent/xds/testdata/routes/connect-proxy-splitter-overweight.latest.golden b/agent/xds/testdata/routes/connect-proxy-splitter-overweight.latest.golden index b52cd3205e..486f8021b8 100644 --- a/agent/xds/testdata/routes/connect-proxy-splitter-overweight.latest.golden +++ b/agent/xds/testdata/routes/connect-proxy-splitter-overweight.latest.golden @@ -23,7 +23,7 @@ "name": "big-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "big" @@ -32,7 +32,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "big" @@ -45,7 +45,7 @@ "name": "goldilocks-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "goldilocks" @@ -54,7 +54,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "goldilocks" @@ -67,7 +67,7 @@ "name": "lil-bit-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "small" @@ -76,7 +76,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "small" diff --git a/agent/xds/testdata/routes/connect-proxy-with-chain-and-router.latest.golden b/agent/xds/testdata/routes/connect-proxy-with-chain-and-router.latest.golden index fe2dd30a27..3f590b178e 100644 --- a/agent/xds/testdata/routes/connect-proxy-with-chain-and-router.latest.golden +++ b/agent/xds/testdata/routes/connect-proxy-with-chain-and-router.latest.golden @@ -369,14 +369,13 @@ }, "requestHeadersToAdd": [ { - "append": true, "header": { "key": "request", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" @@ -388,14 +387,13 @@ ], "responseHeadersToAdd": [ { - "append": true, "header": { "key": "response", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" diff --git a/agent/xds/testdata/routes/connect-proxy-with-chain-and-splitter.latest.golden b/agent/xds/testdata/routes/connect-proxy-with-chain-and-splitter.latest.golden index e654d9aa4d..fe5c69a399 100644 --- a/agent/xds/testdata/routes/connect-proxy-with-chain-and-splitter.latest.golden +++ b/agent/xds/testdata/routes/connect-proxy-with-chain-and-splitter.latest.golden @@ -41,7 +41,7 @@ "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "db" @@ -50,7 +50,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "db" @@ -63,7 +63,7 @@ "name": "big-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "big" @@ -72,7 +72,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "big" @@ -85,7 +85,7 @@ "name": "goldilocks-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "goldilocks" @@ -94,7 +94,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "goldilocks" @@ -107,7 +107,7 @@ "name": "lil-bit-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "small" @@ -116,7 +116,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "small" diff --git a/agent/xds/testdata/routes/ingress-with-chain-and-router-header-manip.latest.golden b/agent/xds/testdata/routes/ingress-with-chain-and-router-header-manip.latest.golden index 9ab7d3ae29..25fa94d0f3 100644 --- a/agent/xds/testdata/routes/ingress-with-chain-and-router-header-manip.latest.golden +++ b/agent/xds/testdata/routes/ingress-with-chain-and-router-header-manip.latest.golden @@ -14,14 +14,13 @@ "name": "db", "requestHeadersToAdd": [ { - "append": true, "header": { "key": "foo", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" @@ -33,14 +32,13 @@ ], "responseHeadersToAdd": [ { - "append": true, "header": { "key": "foo", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" @@ -408,14 +406,13 @@ }, "requestHeadersToAdd": [ { - "append": true, "header": { "key": "request", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" @@ -427,14 +424,13 @@ ], "responseHeadersToAdd": [ { - "append": true, "header": { "key": "response", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" diff --git a/agent/xds/testdata/routes/ingress-with-chain-and-router.latest.golden b/agent/xds/testdata/routes/ingress-with-chain-and-router.latest.golden index 06795b1e5e..ba8f0fa73d 100644 --- a/agent/xds/testdata/routes/ingress-with-chain-and-router.latest.golden +++ b/agent/xds/testdata/routes/ingress-with-chain-and-router.latest.golden @@ -370,14 +370,13 @@ }, "requestHeadersToAdd": [ { - "append": true, "header": { "key": "request", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" @@ -389,14 +388,13 @@ ], "responseHeadersToAdd": [ { - "append": true, "header": { "key": "response", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" diff --git a/agent/xds/testdata/routes/ingress-with-chain-and-splitter.latest.golden b/agent/xds/testdata/routes/ingress-with-chain-and-splitter.latest.golden index f85d5c038f..6d9c31be1c 100644 --- a/agent/xds/testdata/routes/ingress-with-chain-and-splitter.latest.golden +++ b/agent/xds/testdata/routes/ingress-with-chain-and-splitter.latest.golden @@ -42,7 +42,7 @@ "name": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "db" @@ -51,7 +51,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "db" @@ -64,7 +64,7 @@ "name": "big-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "big" @@ -73,7 +73,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "big" @@ -86,7 +86,7 @@ "name": "goldilocks-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "goldilocks" @@ -95,7 +95,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "goldilocks" @@ -108,7 +108,7 @@ "name": "lil-bit-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", "requestHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "small" @@ -117,7 +117,7 @@ ], "responseHeadersToAdd": [ { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "x-split-leg", "value": "small" diff --git a/agent/xds/testdata/routes/xds-fetch-timeout-ms-ingress-with-router.latest.golden b/agent/xds/testdata/routes/xds-fetch-timeout-ms-ingress-with-router.latest.golden index 06795b1e5e..ba8f0fa73d 100644 --- a/agent/xds/testdata/routes/xds-fetch-timeout-ms-ingress-with-router.latest.golden +++ b/agent/xds/testdata/routes/xds-fetch-timeout-ms-ingress-with-router.latest.golden @@ -370,14 +370,13 @@ }, "requestHeadersToAdd": [ { - "append": true, "header": { "key": "request", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" @@ -389,14 +388,13 @@ ], "responseHeadersToAdd": [ { - "append": true, "header": { "key": "response", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" diff --git a/agent/xds/testdata/routes/xds-fetch-timeout-ms-sidecar.latest.golden b/agent/xds/testdata/routes/xds-fetch-timeout-ms-sidecar.latest.golden index fe2dd30a27..3f590b178e 100644 --- a/agent/xds/testdata/routes/xds-fetch-timeout-ms-sidecar.latest.golden +++ b/agent/xds/testdata/routes/xds-fetch-timeout-ms-sidecar.latest.golden @@ -369,14 +369,13 @@ }, "requestHeadersToAdd": [ { - "append": true, "header": { "key": "request", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" @@ -388,14 +387,13 @@ ], "responseHeadersToAdd": [ { - "append": true, "header": { "key": "response", "value": "bar" } }, { - "append": false, + "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "bar", "value": "baz" diff --git a/agent/xdsv2/route_resources.go b/agent/xdsv2/route_resources.go index c3526e48de..d2b106f3b6 100644 --- a/agent/xdsv2/route_resources.go +++ b/agent/xdsv2/route_resources.go @@ -328,20 +328,29 @@ func makeEnvoyClusterWeightFromNameAndWeight(name string, weight *wrapperspb.UIn return envoyClusterWeight } +func getXDSAppendActionFromProxyStateAppendAction(action pbproxystate.AppendAction) envoy_core_v3.HeaderValueOption_HeaderAppendAction { + if action == pbproxystate.AppendAction_APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD { + return envoy_core_v3.HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD + } else if action == pbproxystate.AppendAction_APPEND_ACTION_ADD_IF_ABSENT { + return envoy_core_v3.HeaderValueOption_ADD_IF_ABSENT + } + + // XDS default + return envoy_core_v3.HeaderValueOption_APPEND_IF_EXISTS_OR_ADD +} + func injectEnvoyClusterWeightWithProxystateHeaderMutation(envoyClusterWeight *envoy_route_v3.WeightedCluster_ClusterWeight, mutation *pbproxystate.HeaderMutation) { mutation.GetAction() switch mutation.GetAction().(type) { case *pbproxystate.HeaderMutation_RequestHeaderAdd: action := mutation.GetRequestHeaderAdd() header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD - hvo := &envoy_core_v3.HeaderValueOption{ Header: &envoy_core_v3.HeaderValue{ Key: header.GetKey(), Value: header.GetValue(), }, - Append: response.MakeBoolValue(app), + AppendAction: getXDSAppendActionFromProxyStateAppendAction(action.GetAppendAction()), } envoyClusterWeight.RequestHeadersToAdd = append(envoyClusterWeight.RequestHeadersToAdd, hvo) @@ -352,14 +361,13 @@ func injectEnvoyClusterWeightWithProxystateHeaderMutation(envoyClusterWeight *en case *pbproxystate.HeaderMutation_ResponseHeaderAdd: action := mutation.GetResponseHeaderAdd() header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD hvo := &envoy_core_v3.HeaderValueOption{ Header: &envoy_core_v3.HeaderValue{ Key: header.GetKey(), Value: header.GetValue(), }, - Append: response.MakeBoolValue(app), + AppendAction: getXDSAppendActionFromProxyStateAppendAction(action.GetAppendAction()), } envoyClusterWeight.ResponseHeadersToAdd = append(envoyClusterWeight.ResponseHeadersToAdd, hvo) @@ -457,14 +465,13 @@ func injectEnvoyRouteRuleWithProxystateHeaderMutation(envoyRouteRule *envoy_rout case *pbproxystate.HeaderMutation_RequestHeaderAdd: action := mutation.GetRequestHeaderAdd() header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD hvo := &envoy_core_v3.HeaderValueOption{ Header: &envoy_core_v3.HeaderValue{ Key: header.GetKey(), Value: header.GetValue(), }, - Append: response.MakeBoolValue(app), + AppendAction: getXDSAppendActionFromProxyStateAppendAction(action.GetAppendAction()), } envoyRouteRule.RequestHeadersToAdd = append(envoyRouteRule.RequestHeadersToAdd, hvo) @@ -475,14 +482,13 @@ func injectEnvoyRouteRuleWithProxystateHeaderMutation(envoyRouteRule *envoy_rout case *pbproxystate.HeaderMutation_ResponseHeaderAdd: action := mutation.GetResponseHeaderAdd() header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD hvo := &envoy_core_v3.HeaderValueOption{ Header: &envoy_core_v3.HeaderValue{ Key: header.GetKey(), Value: header.GetValue(), }, - Append: response.MakeBoolValue(app), + AppendAction: getXDSAppendActionFromProxyStateAppendAction(action.GetAppendAction()), } envoyRouteRule.ResponseHeadersToAdd = append(envoyRouteRule.ResponseHeadersToAdd, hvo) @@ -502,14 +508,13 @@ func injectEnvoyVirtualHostWithProxystateHeaderMutation(envoyVirtualHost *envoy_ case *pbproxystate.HeaderMutation_RequestHeaderAdd: action := mutation.GetRequestHeaderAdd() header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD hvo := &envoy_core_v3.HeaderValueOption{ Header: &envoy_core_v3.HeaderValue{ Key: header.GetKey(), Value: header.GetValue(), }, - Append: response.MakeBoolValue(app), + AppendAction: getXDSAppendActionFromProxyStateAppendAction(action.GetAppendAction()), } envoyVirtualHost.RequestHeadersToAdd = append(envoyVirtualHost.RequestHeadersToAdd, hvo) @@ -520,14 +525,13 @@ func injectEnvoyVirtualHostWithProxystateHeaderMutation(envoyVirtualHost *envoy_ case *pbproxystate.HeaderMutation_ResponseHeaderAdd: action := mutation.GetResponseHeaderAdd() header := action.GetHeader() - app := action.GetAppendAction() == pbproxystate.AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD hvo := &envoy_core_v3.HeaderValueOption{ Header: &envoy_core_v3.HeaderValue{ Key: header.GetKey(), Value: header.GetValue(), }, - Append: response.MakeBoolValue(app), + AppendAction: getXDSAppendActionFromProxyStateAppendAction(action.GetAppendAction()), } envoyVirtualHost.ResponseHeadersToAdd = append(envoyVirtualHost.ResponseHeadersToAdd, hvo) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go index c915a9f865..dfe1966f21 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go @@ -30,18 +30,21 @@ type AppendAction int32 const ( // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX AppendAction_APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD AppendAction = 0 - AppendAction_APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD AppendAction = 1 + AppendAction_APPEND_ACTION_ADD_IF_ABSENT AppendAction = 1 + AppendAction_APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD AppendAction = 2 ) // Enum value maps for AppendAction. var ( AppendAction_name = map[int32]string{ 0: "APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD", - 1: "APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD", + 1: "APPEND_ACTION_ADD_IF_ABSENT", + 2: "APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD", } AppendAction_value = map[string]int32{ "APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD": 0, - "APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD": 1, + "APPEND_ACTION_ADD_IF_ABSENT": 1, + "APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD": 2, } ) @@ -517,35 +520,38 @@ var file_pbmesh_v2beta1_pbproxystate_header_mutations_proto_rawDesc = []byte{ 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x2a, 0x67, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, - 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, - 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x56, - 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, - 0x53, 0x5f, 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x10, 0x01, 0x42, 0xda, 0x02, 0x0a, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x14, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, - 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, 0x48, 0x43, - 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0xca, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x36, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, - 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x50, 0x62, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, - 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2a, 0x88, 0x01, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, + 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, + 0x1b, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, + 0x44, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x2c, + 0x0a, 0x28, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, + 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x10, 0x02, 0x42, 0xda, 0x02, 0x0a, + 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, + 0x14, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x70, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x05, + 0x48, 0x43, 0x4d, 0x56, 0x50, 0xaa, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, + 0x74, 0x65, 0xca, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0xe2, + 0x02, 0x36, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x50, 0x62, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, + 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3a, 0x3a, 0x50, 0x62, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto index 63a4bf83f6..d0cdcc3ec8 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto @@ -45,5 +45,6 @@ message Header { enum AppendAction { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD = 0; - APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD = 1; + APPEND_ACTION_ADD_IF_ABSENT = 1; + APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD = 2; }