File: client_config.proto.out.cue

package info (click to toggle)
golang-github-cue-lang-cue 0.12.0.-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,072 kB
  • sloc: sh: 57; makefile: 17
file content (189 lines) | stat: -rw-r--r-- 8,140 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
// Copyright 2017 Istio Authors
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

// $title: Mixer Client
// $description: Configuration state for the Mixer client library.
// $location: https://istio.io/docs/reference/config/policy-and-telemetry/istio.mixer.v1.config.client

// Describes the configuration state for the Mixer client library that's built into Envoy.
package client

import (
	"time"
	"istio.io/api/mixer/v1"
)

// Specifies the behavior when the client is unable to connect to Mixer.
#NetworkFailPolicy: {
	// Example of single-value enum.
	#FailPolicy: {
		// If network connection fails, request is allowed and delivered to the
		// service.
		"FAIL_OPEN"
		#enumValue: 0
	}

	#FailPolicy_value: FAIL_OPEN: 0

	// Specifies the behavior when the client is unable to connect to Mixer.
	policy?: #FailPolicy @protobuf(1,FailPolicy)

	// Max retries on transport error.
	maxRetry?: uint32 @protobuf(2,uint32,name=max_retry)

	// Base time to wait between retries.  Will be adjusted by exponential
	// backoff and jitter.
	baseRetryWait?: time.Duration @protobuf(3,google.protobuf.Duration,name=base_retry_wait)

	// Max time to wait between retries.
	maxRetryWait?: time.Duration @protobuf(4,google.protobuf.Duration,name=max_retry_wait)
}

// Defines the per-service client configuration.
#ServiceConfig: {
	// If true, do not call Mixer Check.
	disableCheckCalls?: bool @protobuf(1,bool,name=disable_check_calls)

	// If true, do not call Mixer Report.
	disableReportCalls?: bool @protobuf(2,bool,name=disable_report_calls)

	// Send these attributes to Mixer in both Check and Report. This
	// typically includes the "destination.service" attribute.
	// In case of a per-route override, per-route attributes take precedence
	// over the attributes supplied in the client configuration.
	mixerAttributes?: v1.#Attributes @protobuf(3,Attributes,name=mixer_attributes)

	// HTTP API specifications to generate API attributes.
	httpApiSpec?: [...#HTTPAPISpec] @protobuf(4,HTTPAPISpec,name=http_api_spec)

	// Quota specifications to generate quota requirements.
	quotaSpec?: [...#QuotaSpec] @protobuf(5,QuotaSpec,name=quota_spec)

	// Specifies the behavior when the client is unable to connect to Mixer.
	// This is the service-level policy. It overrides
	// [mesh-level
	// policy][istio.mixer.v1.config.client.TransportConfig.network_fail_policy].
	networkFailPolicy?: #NetworkFailPolicy @protobuf(7,NetworkFailPolicy,name=network_fail_policy)

	// Default attributes to forward to upstream. This typically
	// includes the "source.ip" and "source.uid" attributes.
	// In case of a per-route override, per-route attributes take precedence
	// over the attributes supplied in the client configuration.
	//
	// Forwarded attributes take precedence over the static Mixer attributes.
	// The full order of application is as follows:
	// 1. static Mixer attributes from the filter config;
	// 2. static Mixer attributes from the route config;
	// 3. forwarded attributes from the source filter config (if any);
	// 4. forwarded attributes from the source route config (if any);
	// 5. derived attributes from the request metadata.
	forwardAttributes?: v1.#Attributes @protobuf(8,Attributes,name=forward_attributes)
}

// Defines the transport config on how to call Mixer.
#TransportConfig: {
	// The flag to disable check cache.
	disableCheckCache?: bool @protobuf(1,bool,name=disable_check_cache)

	// The flag to disable quota cache.
	disableQuotaCache?: bool @protobuf(2,bool,name=disable_quota_cache)

	// The flag to disable report batch.
	disableReportBatch?: bool @protobuf(3,bool,name=disable_report_batch)

	// Specifies the behavior when the client is unable to connect to Mixer.
	// This is the mesh level policy. The default value for policy is FAIL_OPEN.
	networkFailPolicy?: #NetworkFailPolicy @protobuf(4,NetworkFailPolicy,name=network_fail_policy)

	// Specify refresh interval to write Mixer client statistics to Envoy share
	// memory. If not specified, the interval is 10 seconds.
	statsUpdateInterval?: time.Duration @protobuf(5,google.protobuf.Duration,name=stats_update_interval)

	// Name of the cluster that will forward check calls to a pool of mixer
	// servers. Defaults to "mixer_server". By using different names for
	// checkCluster and reportCluster, it is possible to have one set of
	// Mixer servers handle check calls, while another set of Mixer servers
	// handle report calls.
	//
	// NOTE: Any value other than the default "mixer_server" will require the
	// Istio Grafana dashboards to be reconfigured to use the new name.
	checkCluster?: string @protobuf(6,string,name=check_cluster)

	// Name of the cluster that will forward report calls to a pool of mixer
	// servers. Defaults to "mixer_server". By using different names for
	// checkCluster and reportCluster, it is possible to have one set of
	// Mixer servers handle check calls, while another set of Mixer servers
	// handle report calls.
	//
	// NOTE: Any value other than the default "mixer_server" will require the
	// Istio Grafana dashboards to be reconfigured to use the new name.
	reportCluster?: string @protobuf(7,string,name=report_cluster)

	// Default attributes to forward to Mixer upstream. This typically
	// includes the "source.ip" and "source.uid" attributes. These
	// attributes are consumed by the proxy in front of mixer.
	attributesForMixerProxy?: v1.#Attributes @protobuf(8,Attributes,name=attributes_for_mixer_proxy)
}

// Defines the client config for HTTP.
#HttpClientConfig: {
	// The transport config.
	transport?: #TransportConfig @protobuf(1,TransportConfig)

	// Map of control configuration indexed by destination.service. This
	// is used to support per-service configuration for cases where a
	// mixerclient serves multiple services.
	serviceConfigs?: {
		[string]: #ServiceConfig
	} @protobuf(2,map[string]ServiceConfig,service_configs)

	// Default destination service name if none was specified in the
	// client request.
	defaultDestinationService?: string @protobuf(3,string,name=default_destination_service)

	// Default attributes to send to Mixer in both Check and
	// Report. This typically includes "destination.ip" and
	// "destination.uid" attributes.
	mixerAttributes?: v1.#Attributes @protobuf(4,Attributes,name=mixer_attributes)

	// Default attributes to forward to upstream. This typically
	// includes the "source.ip" and "source.uid" attributes.
	forwardAttributes?: v1.#Attributes @protobuf(5,Attributes,name=forward_attributes)
}

// Defines the client config for TCP.
#TcpClientConfig: {
	// The transport config.
	transport?: #TransportConfig @protobuf(1,TransportConfig)

	// Default attributes to send to Mixer in both Check and
	// Report. This typically includes "destination.ip" and
	// "destination.uid" attributes.
	mixerAttributes?: v1.#Attributes @protobuf(2,Attributes,name=mixer_attributes)

	// If set to true, disables Mixer check calls.
	disableCheckCalls?: bool @protobuf(3,bool,name=disable_check_calls)

	// If set to true, disables Mixer check calls.
	disableReportCalls?: bool @protobuf(4,bool,name=disable_report_calls)

	// Quota specifications to generate quota requirements.
	// It applies on the new TCP connections.
	connectionQuotaSpec?: #QuotaSpec @protobuf(5,QuotaSpec,name=connection_quota_spec)

	// Specify report interval to send periodical reports for long TCP
	// connections. If not specified, the interval is 10 seconds. This interval
	// should not be less than 1 second, otherwise it will be reset to 1 second.
	reportInterval?: time.Duration @protobuf(6,google.protobuf.Duration,name=report_interval)
}