forked from NVIDIA/k8s-nim-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapps.nvidia.com_nimservices.yaml
More file actions
2944 lines (2891 loc) · 179 KB
/
apps.nvidia.com_nimservices.yaml
File metadata and controls
2944 lines (2891 loc) · 179 KB
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.2
name: nimservices.apps.nvidia.com
spec:
group: apps.nvidia.com
names:
kind: NIMService
listKind: NIMServiceList
plural: nimservices
singular: nimservice
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.state
name: Status
type: string
- format: date-time
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: NIMService is the Schema for the nimservices 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: NIMServiceSpec defines the desired state of NIMService.
properties:
annotations:
additionalProperties:
type: string
type: object
args:
items:
type: string
type: array
authSecret:
description: The name of an existing pull secret containing the NGC_API_KEY
type: string
command:
items:
type: string
type: array
draResources:
description: DRAResources is the list of DRA resource claims to be
used for the NIMService deployment or leader worker set.
items:
description: |-
DRAResource references exactly one ResourceClaim, either directly
or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim.
When creating the NIMService pods, it adds a name (`DNS_LABEL` format) to it
that uniquely identifies the DRA resource.
properties:
claimCreationSpec:
description: |-
ClaimCreationSpec is the spec to auto-generate a DRA resource claim template.
Only one of ClaimCreationSpec, ResourceClaimName or ResourceClaimTemplateName must be specified.
properties:
devices:
items:
properties:
attributeSelectors:
description: AttributeSelectors defines the criteria
which must be satisfied by the device attributes
of a device.
items:
description: DRADeviceAttributeSelector defines
the selector expression for a DRA device attribute.
properties:
key:
description: |-
Key is the name of the device attribute.
This is either a qualified name or a simple name.
If it is a simple name, then it is assumed to be prefixed with the DRA driver name.
Eg: "gpu.nvidia.com/productName" is equivalent to "productName" if the driver name is "gpu.nvidia.com". Otherwise they're treated as 2 different attributes.
maxLength: 64
type: string
op:
default: Equal
description: |-
Op is the operator to use for comparing the device attribute value. Supported operators are:
* Equal: The device attribute value must be equal to the value specified in the selector.
* NotEqual: The device attribute value must not be equal to the value specified in the selector.
* GreaterThan: The device attribute value must be greater than the value specified in the selector.
* GreaterThanOrEqual: The device attribute value must be greater than or equal to the value specified in the selector.
* LessThan: The device attribute value must be less than the value specified in the selector.
* LessThanOrEqual: The device attribute value must be less than or equal to the value specified in the selector.
enum:
- Equal
- NotEqual
- GreaterThan
- GreaterThanOrEqual
- LessThan
- LessThanOrEqual
type: string
value:
description: Value is the value to compare against
the device attribute.
properties:
boolValue:
description: BoolValue is a true/false value.
type: boolean
intValue:
description: IntValue is a number.
format: int32
type: integer
stringValue:
description: StringValue is a string value.
maxLength: 64
type: string
versionValue:
description: VersionValue is a semantic
version according to semver.org spec 2.0.0.
maxLength: 64
type: string
type: object
required:
- key
- op
type: object
type: array
capacitySelectors:
description: CapacitySelectors defines the criteria
which must be satisfied by the device capacity of
a device.
items:
description: DRAResourceQuantitySelector defines
the selector expression for a DRA device capacity.
properties:
key:
description: |-
Key is the name of the resource.
This is either a qualified name or a simple name.
If it is a simple name, then it is assumed to be prefixed with the DRA driver name.
Eg: "gpu.nvidia.com/memory" is equivalent to "memory" if the driver name is "gpu.nvidia.com". Otherwise they're treated as 2 different attributes.
maxLength: 64
type: string
op:
default: Equal
description: |-
Op is the operator to use for comparing against the device capacity. Supported operators are:
* Equal: The resource quantity value must be equal to the value specified in the selector.
* NotEqual: The resource quantity value must not be equal to the value specified in the selector.
* GreaterThan: The resource quantity value must be greater than the value specified in the selector.
* GreaterThanOrEqual: The resource quantity value must be greater than or equal to the value specified in the selector.
* LessThan: The resource quantity value must be less than the value specified in the selector.
* LessThanOrEqual: The resource quantity value must be less than or equal to the value specified in the selector.
enum:
- Equal
- NotEqual
- GreaterThan
- GreaterThanOrEqual
- LessThan
- LessThanOrEqual
type: string
value:
anyOf:
- type: integer
- type: string
description: Value is the resource quantity
to compare against.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- key
- op
- value
type: object
type: array
celExpressions:
description: CELExpressions is a list of CEL expressions
that must be satisfied by the DRA device.
items:
type: string
type: array
count:
default: 1
description: Count is the number of devices to request.
format: int32
type: integer
deviceClassName:
default: gpu.nvidia.com
description: DeviceClassName references a specific
DeviceClass to inherit configuration and selectors
from.
type: string
driverName:
default: gpu.nvidia.com
description: |-
DriverName is the name of the DRA driver providing the capacity information.
Must be a DNS subdomain.
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
type: string
name:
description: |-
Name is the name of the device request to use in the generated claim spec.
Must be a valid DNS_LABEL.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
type: string
required:
- count
- deviceClassName
- name
type: object
x-kubernetes-validations:
- message: celExpressions must not be set if attributeSelectors
or capacitySelectors are set
rule: (has(self.celExpressions) && !(has(self.attributeSelectors)
|| has(self.capacitySelectors))) || !has(self.celExpressions)
type: array
generateName:
description: GenerateName is an optional name prefix to
use for generating the resource claim template.
maxLength: 16
minLength: 1
type: string
required:
- devices
type: object
requests:
description: |-
Requests is the list of requests in the referenced DRA resource claim.
to be made available to the model container of the NIMService pods.
If empty, everything from the claim is made available, otherwise
only the result of this subset of requests.
items:
minLength: 1
type: string
type: array
resourceClaimName:
description: |-
ResourceClaimName is the name of a DRA resource claim object in the same
namespace as the NIMService.
Exactly one of ResourceClaimName and ResourceClaimTemplateName must
be set.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
type: string
resourceClaimTemplateName:
description: |-
ResourceClaimTemplateName is the name of a DRA resource claim template
object in the same namespace as the pods for this NIMService.
The template will be used to create a new DRA resource claim, which will
be bound to the pods created for this NIMService.
Exactly one of ResourceClaimName and ResourceClaimTemplateName must
be set.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
type: string
type: object
x-kubernetes-validations:
- message: exactly one of spec.resourceClaimName, spec.resourceClaimTemplateName,
or spec.claimCreationSpec must be set.
rule: '(has(self.resourceClaimName) ? 1 : 0) + (has(self.resourceClaimTemplateName)
? 1 : 0) + (has(self.claimCreationSpec) ? 1 : 0) == 1'
type: array
env:
items:
description: EnvVar represents an environment variable present in
a Container.
properties:
name:
description: Name of the environment variable. Must be a C_IDENTIFIER.
type: string
value:
description: |-
Variable references $(VAR_NAME) are expanded
using the previously defined environment variables in the container and
any service environment variables. If a variable cannot be resolved,
the reference in the input string will be unchanged. Double $$ are reduced
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
"$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
Escaped references will never be expanded, regardless of whether the variable
exists or not.
Defaults to "".
type: string
valueFrom:
description: Source for the environment variable's value. Cannot
be used if value is not empty.
properties:
configMapKeyRef:
description: Selects a key of a ConfigMap.
properties:
key:
description: The key to select.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
optional:
description: Specify whether the ConfigMap or its key
must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
fieldRef:
description: |-
Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
properties:
apiVersion:
description: Version of the schema the FieldPath is
written in terms of, defaults to "v1".
type: string
fieldPath:
description: Path of the field to select in the specified
API version.
type: string
required:
- fieldPath
type: object
x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
(limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
properties:
containerName:
description: 'Container name: required for volumes,
optional for env vars'
type: string
divisor:
anyOf:
- type: integer
- type: string
description: Specifies the output format of the exposed
resources, defaults to "1"
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
resource:
description: 'Required: resource to select'
type: string
required:
- resource
type: object
x-kubernetes-map-type: atomic
secretKeyRef:
description: Selects a key of a secret in the pod's namespace
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
optional:
description: Specify whether the Secret or its key must
be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
required:
- name
type: object
type: array
expose:
description: Expose defines attributes to expose the service.
properties:
httpRoute:
description: HTTPRoute defines attributes to HTTPRoute in Gateway
API.
properties:
annotations:
additionalProperties:
type: string
type: object
enabled:
type: boolean
spec:
properties:
host:
description: |-
Hostname is the fully qualified domain name of a network host. This matches
the RFC 1123 definition of a hostname with 2 notable exceptions:
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
Hostname can be "precise" which is a domain name without the terminating
dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
domain name prefixed with a single wildcard label (e.g. `*.example.com`).
Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
alphanumeric characters or '-', and must start and end with an alphanumeric
character. No other punctuation is allowed.
maxLength: 253
minLength: 1
pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
parentRefs:
description: |-
ParentRefs references the resources (usually Gateways) that a Route wants
to be attached to. Note that the referenced parent resource needs to
allow this for the attachment to be complete. For Gateways, that means
the Gateway needs to allow attachment from Routes of this kind and
namespace. For Services, that means the Service must either be in the same
namespace for a "producer" route, or the mesh implementation must support
and allow "consumer" routes for the referenced Service. ReferenceGrant is
not applicable for governing ParentRefs to Services - it is not possible to
create a "producer" route for a Service in a different namespace from the
Route.
There are two kinds of parent resources with "Core" support:
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
This API may be extended in the future to support additional kinds of parent
resources.
ParentRefs must be _distinct_. This means either that:
* They select different objects. If this is the case, then parentRef
entries are distinct. In terms of fields, this means that the
multi-part key defined by `group`, `kind`, `namespace`, and `name` must
be unique across all parentRef entries in the Route.
* They do not select different objects, but for each optional field used,
each ParentRef that selects the same object must set the same set of
optional fields to different values. If one ParentRef sets a
combination of optional fields, all must set the same combination.
Some examples:
* If one ParentRef sets `sectionName`, all ParentRefs referencing the
same object must also set `sectionName`.
* If one ParentRef sets `port`, all ParentRefs referencing the same
object must also set `port`.
* If one ParentRef sets `sectionName` and `port`, all ParentRefs
referencing the same object must also set `sectionName` and `port`.
It is possible to separately reference multiple distinct objects that may
be collapsed by an implementation. For example, some implementations may
choose to merge compatible Gateway Listeners together. If that is the
case, the list of routes attached to those resources should also be
merged.
Note that for ParentRefs that cross namespace boundaries, there are specific
rules. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example,
Gateway has the AllowedRoutes field, and ReferenceGrant provides a
generic way to enable other kinds of cross-namespace reference.
<gateway:experimental:description>
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
the intended destination of the connections are a Service targeted as a
ParentRef of the Route.
</gateway:experimental:description>
<gateway:standard:validation:XValidation:message="sectionName must be specified when parentRefs includes 2 or more references to the same parent",rule="self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) ? ((!has(p1.sectionName) || p1.sectionName == '') == (!has(p2.sectionName) || p2.sectionName == '')) : true))">
<gateway:standard:validation:XValidation:message="sectionName must be unique when parentRefs includes 2 or more references to the same parent",rule="self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || (has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName))))">
<gateway:experimental:validation:XValidation:message="sectionName or port must be specified when parentRefs includes 2 or more references to the same parent",rule="self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) || p1.sectionName == '') == (!has(p2.sectionName) || p2.sectionName == '') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) || p2.port == 0)): true))">
<gateway:experimental:validation:XValidation:message="sectionName or port must be unique when parentRefs includes 2 or more references to the same parent",rule="self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || ( has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName)) && (((!has(p1.port) || p1.port == 0) && (!has(p2.port) || p2.port == 0)) || (has(p1.port) && has(p2.port) && p1.port == p2.port))))">
items:
description: |-
ParentReference identifies an API object (usually a Gateway) that can be considered
a parent of this resource (usually a route). There are two kinds of parent resources
with "Core" support:
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
This API may be extended in the future to support additional kinds of parent
resources.
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
properties:
group:
default: gateway.networking.k8s.io
description: |-
Group is the group of the referent.
When unspecified, "gateway.networking.k8s.io" is inferred.
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: Gateway
description: |-
Kind is kind of the referent.
There are two kinds of parent resources with "Core" support:
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: |-
Name is the name of the referent.
Support: Core
maxLength: 253
minLength: 1
type: string
namespace:
description: |-
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
Gateway has the AllowedRoutes field, and ReferenceGrant provides a
generic way to enable any other kind of cross-namespace reference.
<gateway:experimental:description>
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
the intended destination of the connections are a Service targeted as a
ParentRef of the Route.
</gateway:experimental:description>
Support: Core
maxLength: 63
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
type: string
port:
description: |-
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
networking behaviors specified in a Route must apply to a specific port
as opposed to a listener(s) whose port(s) may be changed. When both Port
and SectionName are specified, the name and port of the selected listener
must match both specified values.
<gateway:experimental:description>
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
</gateway:experimental:description>
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
namespace, or hostname. If 1 of 2 Gateway listeners accept attachment
from the referencing Route, the Route MUST be considered successfully
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
Support: Extended
format: int32
maximum: 65535
minimum: 1
type: integer
sectionName:
description: |-
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
* Service: Port name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from
the referencing Route, the Route MUST be considered successfully
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
Support: Core
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
required:
- name
type: object
maxItems: 32
type: array
paths:
items:
properties:
type:
default: PathPrefix
description: Type specifies how to match against
the path Value.
enum:
- Exact
- PathPrefix
- RegularExpression
type: string
value:
default: /
description: Value of the HTTP path to match against.
maxLength: 1024
type: string
type: object
type: array
type: object
type: object
ingress:
description: Ingress defines attributes to enable ingress for
the service.
properties:
annotations:
additionalProperties:
type: string
type: object
enabled:
description: ingress, or virtualService - not both
type: boolean
spec:
description: IngressSpec describes the Ingress the user wishes
to exist.
properties:
defaultBackend:
description: |-
defaultBackend is the backend that should handle requests that don't
match any rule. If Rules are not specified, DefaultBackend must be specified.
If DefaultBackend is not set, the handling of requests that do not match any
of the rules will be up to the Ingress controller.
properties:
resource:
description: |-
resource is an ObjectRef to another Kubernetes resource in the namespace
of the Ingress object. If resource is specified, a service.Name and
service.Port must not be specified.
This is a mutually exclusive setting with "Service".
properties:
apiGroup:
description: |-
APIGroup is the group for the resource being referenced.
If APIGroup is not specified, the specified Kind must be in the core API group.
For any other third-party types, APIGroup is required.
type: string
kind:
description: Kind is the type of resource being
referenced
type: string
name:
description: Name is the name of resource being
referenced
type: string
required:
- kind
- name
type: object
x-kubernetes-map-type: atomic
service:
description: |-
service references a service as a backend.
This is a mutually exclusive setting with "Resource".
properties:
name:
description: |-
name is the referenced service. The service must exist in
the same namespace as the Ingress object.
type: string
port:
description: |-
port of the referenced service. A port name or port number
is required for a IngressServiceBackend.
properties:
name:
description: |-
name is the name of the port on the Service.
This is a mutually exclusive setting with "Number".
type: string
number:
description: |-
number is the numerical port number (e.g. 80) on the Service.
This is a mutually exclusive setting with "Name".
format: int32
type: integer
type: object
x-kubernetes-map-type: atomic
required:
- name
type: object
type: object
ingressClassName:
description: |-
ingressClassName is the name of an IngressClass cluster resource. Ingress
controller implementations use this field to know whether they should be
serving this Ingress resource, by a transitive connection
(controller -> IngressClass -> Ingress resource). Although the
`kubernetes.io/ingress.class` annotation (simple constant name) was never
formally defined, it was widely supported by Ingress controllers to create
a direct binding between Ingress controller and Ingress resources. Newly
created Ingress resources should prefer using the field. However, even
though the annotation is officially deprecated, for backwards compatibility
reasons, ingress controllers should still honor that annotation if present.
type: string
rules:
description: |-
rules is a list of host rules used to configure the Ingress. If unspecified,
or no rule matches, all traffic is sent to the default backend.
items:
description: |-
IngressRule represents the rules mapping the paths under a specified host to
the related backend services. Incoming requests are first evaluated for a host
match, then routed to the backend associated with the matching IngressRuleValue.
properties:
host:
description: "host is the fully qualified domain
name of a network host, as defined by RFC 3986.\nNote
the following deviations from the \"host\" part
of the\nURI as defined in RFC 3986:\n1. IPs are
not allowed. Currently an IngressRuleValue can
only apply to\n the IP in the Spec of the parent
Ingress.\n2. The `:` delimiter is not respected
because ports are not allowed.\n\t Currently
the port of an Ingress is implicitly :80 for http
and\n\t :443 for https.\nBoth these may change
in the future.\nIncoming requests are matched
against the host before the\nIngressRuleValue.
If the host is unspecified, the Ingress routes
all\ntraffic based on the specified IngressRuleValue.\n\nhost
can be \"precise\" which is a domain name without
the terminating dot of\na network host (e.g. \"foo.bar.com\")
or \"wildcard\", which is a domain name\nprefixed
with a single wildcard label (e.g. \"*.foo.com\").\nThe
wildcard character '*' must appear by itself as
the first DNS label and\nmatches only a single
label. You cannot have a wildcard label by itself
(e.g. Host == \"*\").\nRequests will be matched
against the Host field in the following way:\n1.
If host is precise, the request matches this rule
if the http host header is equal to Host.\n2.
If host is a wildcard, then the request matches
this rule if the http host header\nis to equal
to the suffix (removing the first label) of the
wildcard rule."
type: string
http:
description: |-
HTTPIngressRuleValue is a list of http selectors pointing to backends.
In the example: http://<host>/<path>?<searchpart> -> backend where
where parts of the url correspond to RFC 3986, this resource will be used
to match against everything after the last '/' and before the first '?'
or '#'.
properties:
paths:
description: paths is a collection of paths
that map requests to backends.
items:
description: |-
HTTPIngressPath associates a path with a backend. Incoming urls matching the
path are forwarded to the backend.
properties:
backend:
description: |-
backend defines the referenced service endpoint to which the traffic
will be forwarded to.
properties:
resource:
description: |-
resource is an ObjectRef to another Kubernetes resource in the namespace
of the Ingress object. If resource is specified, a service.Name and
service.Port must not be specified.
This is a mutually exclusive setting with "Service".
properties:
apiGroup:
description: |-
APIGroup is the group for the resource being referenced.
If APIGroup is not specified, the specified Kind must be in the core API group.
For any other third-party types, APIGroup is required.
type: string
kind:
description: Kind is the type
of resource being referenced
type: string
name:
description: Name is the name
of resource being referenced
type: string
required:
- kind
- name
type: object
x-kubernetes-map-type: atomic
service:
description: |-
service references a service as a backend.
This is a mutually exclusive setting with "Resource".
properties:
name:
description: |-
name is the referenced service. The service must exist in
the same namespace as the Ingress object.
type: string
port:
description: |-
port of the referenced service. A port name or port number
is required for a IngressServiceBackend.
properties:
name:
description: |-
name is the name of the port on the Service.
This is a mutually exclusive setting with "Number".
type: string
number:
description: |-
number is the numerical port number (e.g. 80) on the Service.
This is a mutually exclusive setting with "Name".
format: int32
type: integer
type: object
x-kubernetes-map-type: atomic
required:
- name
type: object
type: object
path:
description: |-
path is matched against the path of an incoming request. Currently it can
contain characters disallowed from the conventional "path" part of a URL
as defined by RFC 3986. Paths must begin with a '/' and must be present
when using PathType with value "Exact" or "Prefix".
type: string
pathType:
description: |-
pathType determines the interpretation of the path matching. PathType can
be one of the following values:
* Exact: Matches the URL path exactly.
* Prefix: Matches based on a URL path prefix split by '/'. Matching is
done on a path element by element basis. A path element refers is the
list of labels in the path split by the '/' separator. A request is a
match for path p if every p is an element-wise prefix of p of the
request path. Note that if the last element of the path is a substring
of the last element in request path, it is not a match (e.g. /foo/bar
matches /foo/bar/baz, but does not match /foo/barbaz).
* ImplementationSpecific: Interpretation of the Path matching is up to
the IngressClass. Implementations can treat this as a separate PathType
or treat it identically to Prefix or Exact path types.
Implementations are required to support all path types.
type: string
required:
- backend
- pathType
type: object
type: array
x-kubernetes-list-type: atomic
required:
- paths
type: object
type: object
type: array
x-kubernetes-list-type: atomic
tls:
description: |-
tls represents the TLS configuration. Currently the Ingress only supports a
single TLS port, 443. If multiple members of this list specify different hosts,
they will be multiplexed on the same port according to the hostname specified
through the SNI TLS extension, if the ingress controller fulfilling the
ingress supports SNI.
items:
description: IngressTLS describes the transport layer
security associated with an ingress.
properties:
hosts:
description: |-
hosts is a list of hosts included in the TLS certificate. The values in
this list must match the name/s used in the tlsSecret. Defaults to the
wildcard host setting for the loadbalancer controller fulfilling this
Ingress, if left unspecified.
items:
type: string
type: array
x-kubernetes-list-type: atomic
secretName:
description: |-
secretName is the name of the secret used to terminate TLS traffic on
port 443. Field is left optional to allow TLS routing based on SNI
hostname alone. If the SNI host in a listener conflicts with the "Host"
header field used by an IngressRule, the SNI host is used for termination
and value of the "Host" header is used for routing.
type: string
type: object
type: array
x-kubernetes-list-type: atomic
type: object
type: object
service:
description: Service defines attributes to create a service.
properties:
annotations:
additionalProperties:
type: string
type: object
grpcPort:
description: |-
GRPCPort is the GRPC serving port
Note: This port is only applicable for NIMs that runs a Triton GRPC Inference Server.
format: int32
maximum: 65535
minimum: 1
type: integer
metricsPort:
description: |-
MetricsPort is the port for metrics
Note: This port is only applicable for NIMs that runs a separate metrics endpoint on Triton Inference Server.
format: int32
maximum: 65535
minimum: 1
type: integer
name:
description: Override the default service name
type: string
port:
default: 8000
description: 'Port is the main api serving port (default:
8000)'
format: int32
maximum: 65535
minimum: 1
type: integer
type:
description: Service Type string describes ingress methods
for a service
type: string
type: object