1# Copyright 2020 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: apiextensions.k8s.io/v1
16kind: CustomResourceDefinition
17metadata:
18 annotations:
19 cnrm.cloud.google.com/version: 1.106.0
20 creationTimestamp: null
21 labels:
22 cnrm.cloud.google.com/dcl2crd: "true"
23 cnrm.cloud.google.com/managed-by-kcc: "true"
24 cnrm.cloud.google.com/stability-level: stable
25 cnrm.cloud.google.com/system: "true"
26 name: networkserviceshttproutes.networkservices.cnrm.cloud.google.com
27spec:
28 group: networkservices.cnrm.cloud.google.com
29 names:
30 categories:
31 - gcp
32 kind: NetworkServicesHTTPRoute
33 plural: networkserviceshttproutes
34 shortNames:
35 - gcpnetworkserviceshttproute
36 - gcpnetworkserviceshttproutes
37 singular: networkserviceshttproute
38 scope: Namespaced
39 versions:
40 - additionalPrinterColumns:
41 - jsonPath: .metadata.creationTimestamp
42 name: Age
43 type: date
44 - description: When 'True', the most recent reconcile of the resource succeeded
45 jsonPath: .status.conditions[?(@.type=='Ready')].status
46 name: Ready
47 type: string
48 - description: The reason for the value in 'Ready'
49 jsonPath: .status.conditions[?(@.type=='Ready')].reason
50 name: Status
51 type: string
52 - description: The last transition time for the value in 'Status'
53 jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime
54 name: Status Age
55 type: date
56 name: v1beta1
57 schema:
58 openAPIV3Schema:
59 properties:
60 apiVersion:
61 description: 'apiVersion defines the versioned schema of this representation
62 of an object. Servers should convert recognized schemas to the latest
63 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
64 type: string
65 kind:
66 description: 'kind is a string value representing the REST resource this
67 object represents. Servers may infer this from the endpoint the client
68 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
69 type: string
70 metadata:
71 type: object
72 spec:
73 properties:
74 description:
75 description: Optional. A free-text description of the resource. Max
76 length 1024 characters.
77 type: string
78 gateways:
79 items:
80 oneOf:
81 - not:
82 required:
83 - external
84 required:
85 - name
86 - not:
87 anyOf:
88 - required:
89 - name
90 - required:
91 - namespace
92 required:
93 - external
94 properties:
95 external:
96 description: 'Allowed value: The `selfLink` field of a `NetworkServicesGateway`
97 resource.'
98 type: string
99 name:
100 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
101 type: string
102 namespace:
103 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
104 type: string
105 type: object
106 type: array
107 hostnames:
108 description: Required. Hostnames define a set of hosts that should
109 match against the HTTP host header to select a HttpRoute to process
110 the request. Hostname is the fully qualified domain name of a network
111 host, as defined by RFC 1123 with the exception that ip addresses
112 are not allowed. Wildcard hosts are supported as "*" (no prefix
113 or suffix allowed).
114 items:
115 type: string
116 type: array
117 location:
118 description: Immutable. The location for the resource
119 type: string
120 meshes:
121 items:
122 oneOf:
123 - not:
124 required:
125 - external
126 required:
127 - name
128 - not:
129 anyOf:
130 - required:
131 - name
132 - required:
133 - namespace
134 required:
135 - external
136 properties:
137 external:
138 description: 'Allowed value: The `selfLink` field of a `NetworkServicesMesh`
139 resource.'
140 type: string
141 name:
142 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
143 type: string
144 namespace:
145 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
146 type: string
147 type: object
148 type: array
149 projectRef:
150 description: Immutable. The Project that this resource belongs to.
151 oneOf:
152 - not:
153 required:
154 - external
155 required:
156 - name
157 - not:
158 anyOf:
159 - required:
160 - name
161 - required:
162 - namespace
163 required:
164 - external
165 properties:
166 external:
167 description: |-
168 The project for the resource
169
170 Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).
171 type: string
172 name:
173 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
174 type: string
175 namespace:
176 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
177 type: string
178 type: object
179 resourceID:
180 description: Immutable. Optional. The name of the resource. Used for
181 creation and acquisition. When unset, the value of `metadata.name`
182 is used as the default.
183 type: string
184 rules:
185 description: Required. Rules that define how traffic is routed and
186 handled.
187 items:
188 properties:
189 action:
190 description: The detailed rule defining how to route matched
191 traffic.
192 properties:
193 corsPolicy:
194 description: The specification for allowing client side
195 cross-origin requests.
196 properties:
197 allowCredentials:
198 description: In response to a preflight request, setting
199 this to true indicates that the actual request can
200 include user credentials. This translates to the Access-Control-Allow-Credentials
201 header. Default value is false.
202 type: boolean
203 allowHeaders:
204 description: Specifies the content for Access-Control-Allow-Headers
205 header.
206 items:
207 type: string
208 type: array
209 allowMethods:
210 description: Specifies the content for Access-Control-Allow-Methods
211 header.
212 items:
213 type: string
214 type: array
215 allowOriginRegexes:
216 description: Specifies the regular expression patterns
217 that match allowed origins. For regular expression
218 grammar, please see https://github.com/google/re2/wiki/Syntax.
219 items:
220 type: string
221 type: array
222 allowOrigins:
223 description: Specifies the list of origins that will
224 be allowed to do CORS requests. An origin is allowed
225 if it matches either an item in allow_origins or an
226 item in allow_origin_regexes.
227 items:
228 type: string
229 type: array
230 disabled:
231 description: If true, the CORS policy is disabled. The
232 default value is false, which indicates that the CORS
233 policy is in effect.
234 type: boolean
235 exposeHeaders:
236 description: Specifies the content for Access-Control-Expose-Headers
237 header.
238 items:
239 type: string
240 type: array
241 maxAge:
242 description: Specifies how long result of a preflight
243 request can be cached in seconds. This translates
244 to the Access-Control-Max-Age header.
245 type: string
246 type: object
247 destinations:
248 description: The destination to which traffic should be
249 forwarded.
250 items:
251 properties:
252 serviceRef:
253 oneOf:
254 - not:
255 required:
256 - external
257 required:
258 - name
259 - not:
260 anyOf:
261 - required:
262 - name
263 - required:
264 - namespace
265 required:
266 - external
267 properties:
268 external:
269 description: |-
270 The URL of a BackendService to route traffic to.
271
272 Allowed value: The Google Cloud resource name of a `ComputeBackendService` resource (format: `projects/{{project}}/global/backendServices/{{name}}`).
273 type: string
274 name:
275 description: 'Name of the referent. More info:
276 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
277 type: string
278 namespace:
279 description: 'Namespace of the referent. More
280 info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
281 type: string
282 type: object
283 weight:
284 description: 'Specifies the proportion of requests
285 forwarded to the backend referenced by the serviceName
286 field. This is computed as: weight/Sum(weights in
287 this destination list). For non-zero values, there
288 may be some epsilon from the exact proportion defined
289 here depending on the precision an implementation
290 supports. If only one serviceName is specified and
291 it has a weight greater than 0, 100% of the traffic
292 is forwarded to that backend. If weights are specified
293 for any one service name, they need to be specified
294 for all of them. If weights are unspecified for
295 all services, then, traffic is distributed in equal
296 proportions to all of them.'
297 format: int64
298 type: integer
299 type: object
300 type: array
301 faultInjectionPolicy:
302 description: The specification for fault injection introduced
303 into traffic to test the resiliency of clients to backend
304 service failure. As part of fault injection, when clients
305 send requests to a backend service, delays can be introduced
306 on a percentage of requests before sending those requests
307 to the backend service. Similarly requests from clients
308 can be aborted for a percentage of requests. timeout and
309 retry_policy will be ignored by clients that are configured
310 with a fault_injection_policy
311 properties:
312 abort:
313 description: The specification for aborting to client
314 requests.
315 properties:
316 httpStatus:
317 description: The HTTP status code used to abort
318 the request. The value must be between 200 and
319 599 inclusive.
320 format: int64
321 type: integer
322 percentage:
323 description: The percentage of traffic which will
324 be aborted. The value must be between [0, 100]
325 format: int64
326 type: integer
327 type: object
328 delay:
329 description: The specification for injecting delay to
330 client requests.
331 properties:
332 fixedDelay:
333 description: Specify a fixed delay before forwarding
334 the request.
335 type: string
336 percentage:
337 description: The percentage of traffic on which
338 delay will be injected. The value must be between
339 [0, 100]
340 format: int64
341 type: integer
342 type: object
343 type: object
344 redirect:
345 description: If set, the request is directed as configured
346 by this field.
347 properties:
348 hostRedirect:
349 description: The host that will be used in the redirect
350 response instead of the one that was supplied in the
351 request.
352 type: string
353 httpsRedirect:
354 description: If set to true, the URL scheme in the redirected
355 request is set to https. If set to false, the URL
356 scheme of the redirected request will remain the same
357 as that of the request. The default is set to false.
358 type: boolean
359 pathRedirect:
360 description: The path that will be used in the redirect
361 response instead of the one that was supplied in the
362 request. path_redirect can not be supplied together
363 with prefix_redirect. Supply one alone or neither.
364 If neither is supplied, the path of the original request
365 will be used for the redirect.
366 type: string
367 portRedirect:
368 description: The port that will be used in the redirected
369 request instead of the one that was supplied in the
370 request.
371 format: int64
372 type: integer
373 prefixRewrite:
374 description: Indicates that during redirection, the
375 matched prefix (or path) should be swapped with this
376 value. This option allows URLs be dynamically created
377 based on the request.
378 type: string
379 responseCode:
380 description: 'The HTTP Status code to use for the redirect.
381 Possible values: MOVED_PERMANENTLY_DEFAULT, FOUND,
382 SEE_OTHER, TEMPORARY_REDIRECT, PERMANENT_REDIRECT'
383 type: string
384 stripQuery:
385 description: if set to true, any accompanying query
386 portion of the original URL is removed prior to redirecting
387 the request. If set to false, the query portion of
388 the original URL is retained. The default is set to
389 false.
390 type: boolean
391 type: object
392 requestHeaderModifier:
393 description: The specification for modifying the headers
394 of a matching request prior to delivery of the request
395 to the destination.
396 properties:
397 add:
398 additionalProperties:
399 type: string
400 description: Add the headers with given map where key
401 is the name of the header, value is the value of the
402 header.
403 type: object
404 remove:
405 description: Remove headers (matching by header names)
406 specified in the list.
407 items:
408 type: string
409 type: array
410 set:
411 additionalProperties:
412 type: string
413 description: Completely overwrite/replace the headers
414 with given map where key is the name of the header,
415 value is the value of the header.
416 type: object
417 type: object
418 requestMirrorPolicy:
419 description: Specifies the policy on how requests intended
420 for the routes destination are shadowed to a separate
421 mirrored destination. Proxy will not wait for the shadow
422 destination to respond before returning the response.
423 Prior to sending traffic to the shadow service, the host/authority
424 header is suffixed with -shadow.
425 properties:
426 destination:
427 description: The destination the requests will be mirrored
428 to. The weight of the destination will be ignored.
429 properties:
430 serviceRef:
431 oneOf:
432 - not:
433 required:
434 - external
435 required:
436 - name
437 - not:
438 anyOf:
439 - required:
440 - name
441 - required:
442 - namespace
443 required:
444 - external
445 properties:
446 external:
447 description: |-
448 The URL of a BackendService to route traffic to.
449
450 Allowed value: The Google Cloud resource name of a `ComputeBackendService` resource (format: `projects/{{project}}/global/backendServices/{{name}}`).
451 type: string
452 name:
453 description: 'Name of the referent. More info:
454 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
455 type: string
456 namespace:
457 description: 'Namespace of the referent. More
458 info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
459 type: string
460 type: object
461 weight:
462 description: 'Specifies the proportion of requests
463 forwarded to the backend referenced by the serviceName
464 field. This is computed as: weight/Sum(weights
465 in this destination list). For non-zero values,
466 there may be some epsilon from the exact proportion
467 defined here depending on the precision an implementation
468 supports. If only one serviceName is specified
469 and it has a weight greater than 0, 100% of the
470 traffic is forwarded to that backend. If weights
471 are specified for any one service name, they need
472 to be specified for all of them. If weights are
473 unspecified for all services, then, traffic is
474 distributed in equal proportions to all of them.'
475 format: int64
476 type: integer
477 type: object
478 type: object
479 responseHeaderModifier:
480 description: The specification for modifying the headers
481 of a response prior to sending the response back to the
482 client.
483 properties:
484 add:
485 additionalProperties:
486 type: string
487 description: Add the headers with given map where key
488 is the name of the header, value is the value of the
489 header.
490 type: object
491 remove:
492 description: Remove headers (matching by header names)
493 specified in the list.
494 items:
495 type: string
496 type: array
497 set:
498 additionalProperties:
499 type: string
500 description: Completely overwrite/replace the headers
501 with given map where key is the name of the header,
502 value is the value of the header.
503 type: object
504 type: object
505 retryPolicy:
506 description: Specifies the retry policy associated with
507 this route.
508 properties:
509 numRetries:
510 description: Specifies the allowed number of retries.
511 This number must be > 0. If not specified, default
512 to 1.
513 format: int64
514 type: integer
515 perTryTimeout:
516 description: Specifies a non-zero timeout per retry
517 attempt.
518 type: string
519 retryConditions:
520 description: 'Specifies one or more conditions when
521 this retry policy applies. Valid values are: 5xx:
522 Proxy will attempt a retry if the destination service
523 responds with any 5xx response code, of if the destination
524 service does not respond at all, example: disconnect,
525 reset, read timeout, connection failure and refused
526 streams. gateway-error: Similar to 5xx, but only applies
527 to response codes 502, 503, 504. reset: Proxy will
528 attempt a retry if the destination service does not
529 respond at all (disconnect/reset/read timeout) connect-failure:
530 Proxy will retry on failures connecting to destination
531 for example due to connection timeouts. retriable-4xx:
532 Proxy will retry fro retriable 4xx response codes.
533 Currently the only retriable error supported is 409.
534 refused-stream: Proxy will retry if the destination
535 resets the stream with a REFUSED_STREAM error code.
536 This reset type indicates that it is safe to retry.'
537 items:
538 type: string
539 type: array
540 type: object
541 timeout:
542 description: Specifies the timeout for selected route. Timeout
543 is computed from the time the request has been fully processed
544 (i.e. end of stream) up until the response has been completely
545 processed. Timeout includes all retries.
546 type: string
547 urlRewrite:
548 description: The specification for rewrite URL before forwarding
549 requests to the destination.
550 properties:
551 hostRewrite:
552 description: Prior to forwarding the request to the
553 selected destination, the requests host header is
554 replaced by this value.
555 type: string
556 pathPrefixRewrite:
557 description: Prior to forwarding the request to the
558 selected destination, the matching portion of the
559 requests path is replaced by this value.
560 type: string
561 type: object
562 type: object
563 matches:
564 description: A list of matches define conditions used for matching
565 the rule against incoming HTTP requests. Each match is independent,
566 i.e. this rule will be matched if ANY one of the matches is
567 satisfied.
568 items:
569 properties:
570 fullPathMatch:
571 description: The HTTP request path value should exactly
572 match this value. Only one of full_path_match, prefix_match,
573 or regex_match should be used.
574 type: string
575 headers:
576 description: Specifies a list of HTTP request headers
577 to match against. ALL of the supplied headers must be
578 matched.
579 items:
580 properties:
581 exactMatch:
582 description: The value of the header should match
583 exactly the content of exact_match.
584 type: string
585 header:
586 description: The name of the HTTP header to match
587 against.
588 type: string
589 invertMatch:
590 description: If specified, the match result will
591 be inverted before checking. Default value is
592 set to false.
593 type: boolean
594 prefixMatch:
595 description: The value of the header must start
596 with the contents of prefix_match.
597 type: string
598 presentMatch:
599 description: A header with header_name must exist.
600 The match takes place whether or not the header
601 has a value.
602 type: boolean
603 rangeMatch:
604 description: If specified, the rule will match if
605 the request header value is within the range.
606 properties:
607 end:
608 description: End of the range (exclusive)
609 format: int64
610 type: integer
611 start:
612 description: Start of the range (inclusive)
613 format: int64
614 type: integer
615 type: object
616 regexMatch:
617 description: 'The value of the header must match
618 the regular expression specified in regex_match.
619 For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax'
620 type: string
621 suffixMatch:
622 description: The value of the header must end with
623 the contents of suffix_match.
624 type: string
625 type: object
626 type: array
627 ignoreCase:
628 description: Specifies if prefix_match and full_path_match
629 matches are case sensitive. The default value is false.
630 type: boolean
631 prefixMatch:
632 description: The HTTP request path value must begin with
633 specified prefix_match. prefix_match must begin with
634 a /. Only one of full_path_match, prefix_match, or regex_match
635 should be used.
636 type: string
637 queryParameters:
638 description: Specifies a list of query parameters to match
639 against. ALL of the query parameters must be matched.
640 items:
641 properties:
642 exactMatch:
643 description: The value of the query parameter must
644 exactly match the contents of exact_match. Only
645 one of exact_match, regex_match, or present_match
646 must be set.
647 type: string
648 presentMatch:
649 description: Specifies that the QueryParameterMatcher
650 matches if request contains query parameter, irrespective
651 of whether the parameter has a value or not. Only
652 one of exact_match, regex_match, or present_match
653 must be set.
654 type: boolean
655 queryParameter:
656 description: The name of the query parameter to
657 match.
658 type: string
659 regexMatch:
660 description: The value of the query parameter must
661 match the regular expression specified by regex_match.
662 For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
663 Only one of exact_match, regex_match, or present_match
664 must be set.
665 type: string
666 type: object
667 type: array
668 regexMatch:
669 description: The HTTP request path value must satisfy
670 the regular expression specified by regex_match after
671 removing any query parameters and anchor supplied with
672 the original URL. For regular expression grammar, please
673 see https://github.com/google/re2/wiki/Syntax Only one
674 of full_path_match, prefix_match, or regex_match should
675 be used.
676 type: string
677 type: object
678 type: array
679 type: object
680 type: array
681 required:
682 - hostnames
683 - location
684 - projectRef
685 - rules
686 type: object
687 status:
688 properties:
689 conditions:
690 description: Conditions represent the latest available observation
691 of the resource's current state.
692 items:
693 properties:
694 lastTransitionTime:
695 description: Last time the condition transitioned from one status
696 to another.
697 type: string
698 message:
699 description: Human-readable message indicating details about
700 last transition.
701 type: string
702 reason:
703 description: Unique, one-word, CamelCase reason for the condition's
704 last transition.
705 type: string
706 status:
707 description: Status is the status of the condition. Can be True,
708 False, Unknown.
709 type: string
710 type:
711 description: Type is the type of the condition.
712 type: string
713 type: object
714 type: array
715 createTime:
716 description: Output only. The timestamp when the resource was created.
717 format: date-time
718 type: string
719 observedGeneration:
720 description: ObservedGeneration is the generation of the resource
721 that was most recently observed by the Config Connector controller.
722 If this is equal to metadata.generation, then that means that the
723 current reported status reflects the most recent desired state of
724 the resource.
725 type: integer
726 selfLink:
727 description: Output only. Server-defined URL of this resource
728 type: string
729 updateTime:
730 description: Output only. The timestamp when the resource was updated.
731 format: date-time
732 type: string
733 type: object
734 required:
735 - spec
736 type: object
737 served: true
738 storage: true
739 subresources:
740 status: {}
741status:
742 acceptedNames:
743 kind: ""
744 plural: ""
745 conditions: []
746 storedVersions: []
View as plain text