-
Notifications
You must be signed in to change notification settings - Fork 323
/
crd-servicerouters.yaml
335 lines (335 loc) · 16.8 KB
/
crd-servicerouters.yaml
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
{{- if .Values.connectInject.enabled }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
name: servicerouters.consul.hashicorp.com
spec:
group: consul.hashicorp.com
names:
kind: ServiceRouter
listKind: ServiceRouterList
plural: servicerouters
shortNames:
- service-router
singular: servicerouter
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: The sync status of the resource with Consul
jsonPath: .status.conditions[?(@.type=="Synced")].status
name: Synced
type: string
- description: The last successful synced time of the resource with Consul
jsonPath: .status.lastSyncedTime
name: Last Synced
type: date
- description: The age of the resource
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: ServiceRouter is the Schema for the servicerouters API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: ServiceRouterSpec defines the desired state of ServiceRouter.
properties:
routes:
description: |-
Routes are the list of routes to consider when processing L7 requests.
The first route to match in the list is terminal and stops further
evaluation. Traffic that fails to match any of the provided routes will
be routed to the default service.
items:
properties:
destination:
description: Destination controls how to proxy the matching
request(s) to a service.
properties:
idleTimeout:
description: |-
IdleTimeout is total amount of time permitted
for the request stream to be idle.
type: string
namespace:
description: |-
Namespace is the Consul namespace to resolve the service from instead of
the current namespace. If empty the current namespace is assumed.
type: string
numRetries:
description: NumRetries is the number of times to retry
the request when a retryable result occurs
format: int32
type: integer
partition:
description: |-
Partition is the Consul partition to resolve the service from instead of
the current partition. If empty the current partition is assumed.
type: string
prefixRewrite:
description: |-
PrefixRewrite defines how to rewrite the HTTP request path before proxying
it to its final destination.
This requires that either match.http.pathPrefix or match.http.pathExact
be configured on this route.
type: string
requestHeaders:
description: Allow HTTP header manipulation to be configured.
properties:
add:
additionalProperties:
type: string
description: |-
Add is a set of name -> value pairs that should be appended to the request
or response (i.e. allowing duplicates if the same header already exists).
type: object
remove:
description: |-
Remove is the set of header names that should be stripped from the request
or response.
items:
type: string
type: array
set:
additionalProperties:
type: string
description: |-
Set is a set of name -> value pairs that should be added to the request or
response, overwriting any existing header values of the same name.
type: object
type: object
requestTimeout:
description: |-
RequestTimeout is the total amount of time permitted for the entire
downstream request (and retries) to be processed.
type: string
responseHeaders:
description: |-
HTTPHeaderModifiers is a set of rules for HTTP header modification that
should be performed by proxies as the request passes through them. It can
operate on either request or response headers depending on the context in
which it is used.
properties:
add:
additionalProperties:
type: string
description: |-
Add is a set of name -> value pairs that should be appended to the request
or response (i.e. allowing duplicates if the same header already exists).
type: object
remove:
description: |-
Remove is the set of header names that should be stripped from the request
or response.
items:
type: string
type: array
set:
additionalProperties:
type: string
description: |-
Set is a set of name -> value pairs that should be added to the request or
response, overwriting any existing header values of the same name.
type: object
type: object
retryOn:
description: |-
RetryOn is a flat list of conditions for Consul to retry requests based on the response from an upstream service.
Refer to the valid conditions here: https://developer.hashicorp.com/consul/docs/connect/config-entries/service-router#routes-destination-retryon
items:
type: string
type: array
retryOnConnectFailure:
description: RetryOnConnectFailure allows for connection
failure errors to trigger a retry.
type: boolean
retryOnStatusCodes:
description: RetryOnStatusCodes is a flat list of http response
status codes that are eligible for retry.
items:
format: int32
type: integer
type: array
service:
description: |-
Service is the service to resolve instead of the default service.
If empty then the default service name is used.
type: string
serviceSubset:
description: |-
ServiceSubset is a named subset of the given service to resolve instead
of the one defined as that service's DefaultSubset.
If empty, the default subset is used.
type: string
type: object
match:
description: |-
Match is a set of criteria that can match incoming L7 requests.
If empty or omitted it acts as a catch-all.
properties:
http:
description: HTTP is a set of http-specific match criteria.
properties:
caseInsensitive:
description: CaseInsensitive configures PathExact and
PathPrefix matches to ignore upper/lower casing.
type: boolean
header:
description: |-
Header is a set of criteria that can match on HTTP request headers.
If more than one is configured all must match for the overall match to apply.
items:
properties:
exact:
description: Exact will match if the header with
the given name is this value.
type: string
invert:
description: Invert inverts the logic of the match.
type: boolean
name:
description: Name is the name of the header to
match.
type: string
prefix:
description: Prefix will match if the header with
the given name has this prefix.
type: string
present:
description: Present will match if the header
with the given name is present with any value.
type: boolean
regex:
description: Regex will match if the header with
the given name matches this pattern.
type: string
suffix:
description: Suffix will match if the header with
the given name has this suffix.
type: string
required:
- name
type: object
type: array
methods:
description: |-
Methods is a list of HTTP methods for which this match applies.
If unspecified all http methods are matched.
items:
type: string
type: array
pathExact:
description: PathExact is an exact path to match on
the HTTP request path.
type: string
pathPrefix:
description: PathPrefix is a path prefix to match on
the HTTP request path.
type: string
pathRegex:
description: PathRegex is a regular expression to match
on the HTTP request path.
type: string
queryParam:
description: |-
QueryParam is a set of criteria that can match on HTTP query parameters.
If more than one is configured all must match for the overall match to apply.
items:
properties:
exact:
description: Exact will match if the query parameter
with the given name is this value.
type: string
name:
description: Name is the name of the query parameter
to match on.
type: string
present:
description: |-
Present will match if the query parameter with the given name is present
with any value.
type: boolean
regex:
description: Regex will match if the query parameter
with the given name matches this pattern.
type: string
required:
- name
type: object
type: array
type: object
type: object
type: object
type: array
type: object
status:
properties:
conditions:
description: Conditions indicate the latest available observations
of a resource's current state.
items:
description: |-
Conditions define a readiness condition for a Consul resource.
See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
properties:
lastTransitionTime:
description: LastTransitionTime is the last time the condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition.
type: string
required:
- status
- type
type: object
type: array
lastSyncedTime:
description: LastSyncedTime is the last time the resource successfully
synced with Consul.
format: date-time
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
{{- end }}