mirror of https://github.com/status-im/consul.git
add failover policy to ProxyConfigEntry in api (#16759)
* add failover policy to ProxyConfigEntry in api * update docs
This commit is contained in:
parent
a6831da959
commit
a168d0e667
|
@ -312,15 +312,16 @@ func (s *ServiceConfigEntry) GetModifyIndex() uint64 { return s.ModifyIndex
|
|||
type ProxyConfigEntry struct {
|
||||
Kind string
|
||||
Name string
|
||||
Partition string `json:",omitempty"`
|
||||
Namespace string `json:",omitempty"`
|
||||
Mode ProxyMode `json:",omitempty"`
|
||||
TransparentProxy *TransparentProxyConfig `json:",omitempty" alias:"transparent_proxy"`
|
||||
Config map[string]interface{} `json:",omitempty"`
|
||||
MeshGateway MeshGatewayConfig `json:",omitempty" alias:"mesh_gateway"`
|
||||
Expose ExposeConfig `json:",omitempty"`
|
||||
AccessLogs *AccessLogsConfig `json:",omitempty" alias:"access_logs"`
|
||||
EnvoyExtensions []EnvoyExtension `json:",omitempty" alias:"envoy_extensions"`
|
||||
Partition string `json:",omitempty"`
|
||||
Namespace string `json:",omitempty"`
|
||||
Mode ProxyMode `json:",omitempty"`
|
||||
TransparentProxy *TransparentProxyConfig `json:",omitempty" alias:"transparent_proxy"`
|
||||
Config map[string]interface{} `json:",omitempty"`
|
||||
MeshGateway MeshGatewayConfig `json:",omitempty" alias:"mesh_gateway"`
|
||||
Expose ExposeConfig `json:",omitempty"`
|
||||
AccessLogs *AccessLogsConfig `json:",omitempty" alias:"access_logs"`
|
||||
EnvoyExtensions []EnvoyExtension `json:",omitempty" alias:"envoy_extensions"`
|
||||
FailoverPolicy *ServiceResolverFailoverPolicy `json:",omitempty" alias:"failover_policy"`
|
||||
|
||||
Meta map[string]string `json:",omitempty"`
|
||||
CreateIndex uint64
|
||||
|
|
|
@ -408,6 +408,9 @@ func TestDecodeConfigEntry(t *testing.T) {
|
|||
"Type": "file",
|
||||
"Path": "/tmp/logs.txt",
|
||||
"TextFormat": "[%START_TIME%]"
|
||||
},
|
||||
"FailoverPolicy": {
|
||||
"Mode": "default"
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
@ -440,6 +443,9 @@ func TestDecodeConfigEntry(t *testing.T) {
|
|||
Path: "/tmp/logs.txt",
|
||||
TextFormat: "[%START_TIME%]",
|
||||
},
|
||||
FailoverPolicy: &ServiceResolverFailoverPolicy{
|
||||
Mode: "default",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -472,6 +472,19 @@ spec:
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'FailoverPolicy',
|
||||
type: 'ServiceResolverFailoverPolicy: <optional>',
|
||||
description: `Policy specifies the exact mechanism used for failover.
|
||||
Added in v1.16.0.`,
|
||||
children: [
|
||||
{
|
||||
name: 'Mode',
|
||||
type: 'string: ""',
|
||||
description: 'One of `""`, `default`, or `order-by-locality`.',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'AccessLogs',
|
||||
type: 'AccessLogsConfig: <optional>',
|
||||
|
|
Loading…
Reference in New Issue