diff --git a/api/config_entry.go b/api/config_entry.go index 9d734aa646..24254ec709 100644 --- a/api/config_entry.go +++ b/api/config_entry.go @@ -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 diff --git a/api/config_entry_test.go b/api/config_entry_test.go index 30f7510402..a4fe2505f4 100644 --- a/api/config_entry_test.go +++ b/api/config_entry_test.go @@ -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", + }, }, }, { diff --git a/website/content/docs/connect/config-entries/proxy-defaults.mdx b/website/content/docs/connect/config-entries/proxy-defaults.mdx index cb9b999171..bf75c130d2 100644 --- a/website/content/docs/connect/config-entries/proxy-defaults.mdx +++ b/website/content/docs/connect/config-entries/proxy-defaults.mdx @@ -472,6 +472,19 @@ spec: }, ], }, + { + name: 'FailoverPolicy', + type: 'ServiceResolverFailoverPolicy: ', + 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: ',