mirror of https://github.com/status-im/consul.git
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.
This commit is contained in:
parent
55d7e95a3e
commit
7a410d7c5b
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
connect: Replace usage of deprecated Envoy field `envoy.config.core.v3.HeaderValueOption.append`.
|
||||
```
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue