forked from projectcalico/calico
/
openapi_generated.go
1921 lines (1873 loc) · 79.5 KB
/
openapi_generated.go
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
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
// Copyright (c) 2016-2021 Tigera, Inc. All rights reserved.
// 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.
// Code generated by openapi-gen. DO NOT EDIT.
// This file was autogenerated by openapi-gen. Do not edit it manually!
package v1
import (
common "k8s.io/kube-openapi/pkg/common"
spec "k8s.io/kube-openapi/pkg/validation/spec"
)
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
return map[string]common.OpenAPIDefinition{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeer": schema_libcalico_go_lib_apis_v1_BGPPeer(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeerList": schema_libcalico_go_lib_apis_v1_BGPPeerList(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeerMetadata": schema_libcalico_go_lib_apis_v1_BGPPeerMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeerSpec": schema_libcalico_go_lib_apis_v1_BGPPeerSpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.CalicoAPIConfig": schema_libcalico_go_lib_apis_v1_CalicoAPIConfig(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigMetadata": schema_libcalico_go_lib_apis_v1_CalicoAPIConfigMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigSpec": schema_libcalico_go_lib_apis_v1_CalicoAPIConfigSpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.EndpointPort": schema_libcalico_go_lib_apis_v1_EndpointPort(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.EntityRule": schema_libcalico_go_lib_apis_v1_EntityRule(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.EtcdConfig": schema_libcalico_go_lib_apis_v1_EtcdConfig(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpoint": schema_libcalico_go_lib_apis_v1_HostEndpoint(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpointList": schema_libcalico_go_lib_apis_v1_HostEndpointList(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpointMetadata": schema_libcalico_go_lib_apis_v1_HostEndpointMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpointSpec": schema_libcalico_go_lib_apis_v1_HostEndpointSpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.ICMPFields": schema_libcalico_go_lib_apis_v1_ICMPFields(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPIPConfiguration": schema_libcalico_go_lib_apis_v1_IPIPConfiguration(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPNAT": schema_libcalico_go_lib_apis_v1_IPNAT(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPool": schema_libcalico_go_lib_apis_v1_IPPool(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPoolList": schema_libcalico_go_lib_apis_v1_IPPoolList(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPoolMetadata": schema_libcalico_go_lib_apis_v1_IPPoolMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPoolSpec": schema_libcalico_go_lib_apis_v1_IPPoolSpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.KubeConfig": schema_libcalico_go_lib_apis_v1_KubeConfig(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.Node": schema_libcalico_go_lib_apis_v1_Node(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.NodeBGPSpec": schema_libcalico_go_lib_apis_v1_NodeBGPSpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.NodeList": schema_libcalico_go_lib_apis_v1_NodeList(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.NodeMetadata": schema_libcalico_go_lib_apis_v1_NodeMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.NodeSpec": schema_libcalico_go_lib_apis_v1_NodeSpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.OrchRef": schema_libcalico_go_lib_apis_v1_OrchRef(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.Policy": schema_libcalico_go_lib_apis_v1_Policy(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.PolicyList": schema_libcalico_go_lib_apis_v1_PolicyList(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.PolicyMetadata": schema_libcalico_go_lib_apis_v1_PolicyMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.PolicySpec": schema_libcalico_go_lib_apis_v1_PolicySpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.Profile": schema_libcalico_go_lib_apis_v1_Profile(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.ProfileList": schema_libcalico_go_lib_apis_v1_ProfileList(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.ProfileMetadata": schema_libcalico_go_lib_apis_v1_ProfileMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.ProfileSpec": schema_libcalico_go_lib_apis_v1_ProfileSpec(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.Rule": schema_libcalico_go_lib_apis_v1_Rule(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.WorkloadEndpoint": schema_libcalico_go_lib_apis_v1_WorkloadEndpoint(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.WorkloadEndpointList": schema_libcalico_go_lib_apis_v1_WorkloadEndpointList(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.WorkloadEndpointMetadata": schema_libcalico_go_lib_apis_v1_WorkloadEndpointMetadata(ref),
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.WorkloadEndpointSpec": schema_libcalico_go_lib_apis_v1_WorkloadEndpointSpec(ref),
}
}
func schema_libcalico_go_lib_apis_v1_BGPPeer(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "BGPPeer contains information about a BGP peer resource that is a peer of a Calico compute node.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"TypeMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"),
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Description: "Metadata for a BGPPeer.",
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeerMetadata"),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Description: "Specification for a BGPPeer.",
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeerSpec"),
},
},
},
Required: []string{"TypeMetadata"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeerMetadata", "github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeerSpec", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_BGPPeerList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "BGPPeerList contains a list of BGP Peer resources. List types are returned from List() enumerations in the client interface.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"TypeMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"),
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"),
},
},
"items": {
SchemaProps: spec.SchemaProps{
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeer"),
},
},
},
},
},
},
Required: []string{"TypeMetadata", "items"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.BGPPeer", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_BGPPeerMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "BGPPeerMetadata contains the metadata for a BGPPeer resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"ObjectMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"),
},
},
"scope": {
SchemaProps: spec.SchemaProps{
Description: "The scope of the peer. This may be global or node. A global peer is a BGP device that peers with all Calico nodes. A node peer is a BGP device that peers with the specified Calico node (specified by the node hostname).",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"node": {
SchemaProps: spec.SchemaProps{
Description: "The node name identifying the Calico node instance that is peering with this peer. When modifying a BGP peer, the node must be specified when the scope is `node`, and must be omitted when the scope is `global`.",
Type: []string{"string"},
Format: "",
},
},
"peerIP": {
SchemaProps: spec.SchemaProps{
Description: "The IP address of the peer.",
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IP"),
},
},
},
Required: []string{"ObjectMetadata", "scope", "peerIP"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata", "github.com/dtest11/calico/libcalico-go/lib/net.IP"},
}
}
func schema_libcalico_go_lib_apis_v1_BGPPeerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "BGPPeerSpec contains the specification for a BGPPeer resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"asNumber": {
SchemaProps: spec.SchemaProps{
Description: "The AS Number of the peer.",
Default: 0,
Type: []string{"integer"},
Format: "int64",
},
},
},
Required: []string{"asNumber"},
},
},
}
}
func schema_libcalico_go_lib_apis_v1_CalicoAPIConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "CalicoAPIConfig contains the connection information for a Calico CalicoAPIConfig resource",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"TypeMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"),
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigMetadata"),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigSpec"),
},
},
},
Required: []string{"TypeMetadata"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigMetadata", "github.com/dtest11/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigSpec", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_CalicoAPIConfigMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "CalicoAPIConfigMetadata contains the metadata for a Calico CalicoAPIConfig resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"ObjectMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"),
},
},
},
Required: []string{"ObjectMetadata"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_CalicoAPIConfigSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "CalicoAPIConfigSpec contains the specification for a Calico CalicoAPIConfig resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"datastoreType": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"EtcdConfig": {
SchemaProps: spec.SchemaProps{
Description: "Inline the ectd config fields",
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.EtcdConfig"),
},
},
"KubeConfig": {
SchemaProps: spec.SchemaProps{
Description: "Inline the k8s config fields.",
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.KubeConfig"),
},
},
},
Required: []string{"datastoreType", "EtcdConfig", "KubeConfig"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.EtcdConfig", "github.com/dtest11/calico/libcalico-go/lib/apis/v1.KubeConfig"},
}
}
func schema_libcalico_go_lib_apis_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Properties: map[string]spec.Schema{
"name": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"protocol": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Protocol"),
},
},
"port": {
SchemaProps: spec.SchemaProps{
Default: 0,
Type: []string{"integer"},
Format: "int32",
},
},
},
Required: []string{"name", "protocol", "port"},
},
},
Dependencies: []string{
"github.com/projectcalico/api/pkg/lib/numorstring.Protocol"},
}
}
func schema_libcalico_go_lib_apis_v1_EntityRule(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "An EntityRule is a sub-component of a Rule comprising the match criteria specific to a particular entity (that is either the source or destination).\n\nA source EntityRule matches the source endpoint and originating traffic. A destination EntityRule matches the destination endpoint and terminating traffic.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"tag": {
SchemaProps: spec.SchemaProps{
Description: "Tag is an optional field that restricts the rule to only apply to traffic that originates from (or terminates at) endpoints that have profiles with the given tag in them.",
Type: []string{"string"},
Format: "",
},
},
"net": {
SchemaProps: spec.SchemaProps{
Description: "Net is an optional field that restricts the rule to only apply to traffic that originates from (or terminates at) IP addresses in the given subnet. Deprecated: superseded by the Nets field.",
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IPNet"),
},
},
"nets": {
SchemaProps: spec.SchemaProps{
Description: "Nets is an optional field that restricts the rule to only apply to traffic that originates from (or terminates at) IP addresses in any of the given subnets.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IPNet"),
},
},
},
},
},
"selector": {
SchemaProps: spec.SchemaProps{
Description: "Selector is an optional field that contains a selector expression (see Policy for sample syntax). Only traffic that originates from (terminates at) endpoints matching the selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the selector expression syntax itself supports negation. The two types of negation are subtly different. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the former is limited to packets from Calico-controlled endpoints.",
Type: []string{"string"},
Format: "",
},
},
"ports": {
SchemaProps: spec.SchemaProps{
Description: "Ports is an optional field that restricts the rule to only apply to traffic that has a source (destination) port that matches one of these ranges/values. This value is a list of integers or strings that represent ranges of ports.\n\nSince only some protocols have ports, if any ports are specified it requires the Protocol match in the Rule to be set to \"tcp\" or \"udp\".",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Port"),
},
},
},
},
},
"notTag": {
SchemaProps: spec.SchemaProps{
Description: "NotTag is the negated version of the Tag field.",
Type: []string{"string"},
Format: "",
},
},
"notNet": {
SchemaProps: spec.SchemaProps{
Description: "NotNet is an optional field that restricts the rule to only apply to traffic that does not originate from (or terminate at) an IP address in the given subnet. Deprecated: superseded by NotNets.",
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IPNet"),
},
},
"notNets": {
SchemaProps: spec.SchemaProps{
Description: "NotNets is an optional field that restricts the rule to only apply to traffic that does not originate from (or terminate at) an IP address in any of the given subnets.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IPNet"),
},
},
},
},
},
"notSelector": {
SchemaProps: spec.SchemaProps{
Description: "NotSelector is the negated version of the Selector field. See Selector field for subtleties with negated selectors.",
Type: []string{"string"},
Format: "",
},
},
"notPorts": {
SchemaProps: spec.SchemaProps{
Description: "NotPorts is the negated version of the Ports field.\n\nSince only some protocols have ports, if any ports are specified it requires the Protocol match in the Rule to be set to \"tcp\" or \"udp\".",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Port"),
},
},
},
},
},
},
},
},
Dependencies: []string{
"github.com/projectcalico/api/pkg/lib/numorstring.Port", "github.com/dtest11/calico/libcalico-go/lib/net.IPNet"},
}
}
func schema_libcalico_go_lib_apis_v1_EtcdConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Properties: map[string]spec.Schema{
"etcdScheme": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdAuthority": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdEndpoints": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdDiscoverySrv": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdUsername": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdPassword": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdKeyFile": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdCertFile": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"etcdCACertFile": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
Required: []string{"etcdScheme", "etcdAuthority", "etcdEndpoints", "etcdDiscoverySrv", "etcdUsername", "etcdPassword", "etcdKeyFile", "etcdCertFile", "etcdCACertFile"},
},
},
}
}
func schema_libcalico_go_lib_apis_v1_HostEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "HostEndpoint contains information about a \"bare-metal\" interfaces attached to the host that is running Calico's agent, Felix. By default, Calico doesn't apply any policy to such interfaces.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"TypeMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"),
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpointMetadata"),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpointSpec"),
},
},
},
Required: []string{"TypeMetadata"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpointMetadata", "github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpointSpec", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_HostEndpointList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "HostEndpointList contains a list of Host Endpoint resources. List types are returned from List() enumerations in the client interface.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"TypeMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"),
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"),
},
},
"items": {
SchemaProps: spec.SchemaProps{
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpoint"),
},
},
},
},
},
},
Required: []string{"TypeMetadata", "items"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.HostEndpoint", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_HostEndpointMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "HostEndpointMetadata contains the Metadata for a HostEndpoint resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"ObjectMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"),
},
},
"name": {
SchemaProps: spec.SchemaProps{
Description: "The name of the endpoint.",
Type: []string{"string"},
Format: "",
},
},
"node": {
SchemaProps: spec.SchemaProps{
Description: "The node name identifying the Calico node instance.",
Type: []string{"string"},
Format: "",
},
},
"labels": {
SchemaProps: spec.SchemaProps{
Description: "The labels applied to the host endpoint. It is expected that many endpoints share the same labels. For example, they could be used to label all \"production\" workloads with \"deployment=prod\" so that security policy can be applied to production workloads.",
Type: []string{"object"},
AdditionalProperties: &spec.SchemaOrBool{
Allows: true,
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
},
Required: []string{"ObjectMetadata"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_HostEndpointSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "HostEndpointSpec contains the specification for a HostEndpoint resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"interfaceName": {
SchemaProps: spec.SchemaProps{
Description: "The name of the linux interface to apply policy to; for example \"eth0\". If \"InterfaceName\" is not present then at least one expected IP must be specified.",
Type: []string{"string"},
Format: "",
},
},
"expectedIPs": {
SchemaProps: spec.SchemaProps{
Description: "The expected IP addresses (IPv4 and IPv6) of the endpoint. If \"InterfaceName\" is not present, Calico will look for an interface matching any of the IPs in the list and apply policy to that.\n\nNote:\n\tWhen using the selector|tag match criteria in an ingress or egress security Policy\n\tor Profile, Calico converts the selector into a set of IP addresses. For host\n\tendpoints, the ExpectedIPs field is used for that purpose. (If only the interface\n\tname is specified, Calico does not learn the IPs of the interface for use in match\n\tcriteria.)",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IP"),
},
},
},
},
},
"profiles": {
SchemaProps: spec.SchemaProps{
Description: "A list of identifiers of security Profile objects that apply to this endpoint. Each profile is applied in the order that they appear in this list. Profile rules are applied after the selector-based security policy.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
"ports": {
SchemaProps: spec.SchemaProps{
Description: "Ports contains the endpoint's named ports, which may be referenced in security policy rules.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.EndpointPort"),
},
},
},
},
},
},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.EndpointPort", "github.com/dtest11/calico/libcalico-go/lib/net.IP"},
}
}
func schema_libcalico_go_lib_apis_v1_ICMPFields(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "ICMPFields defines structure for ICMP and NotICMP sub-struct for ICMP code and type",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"type": {
SchemaProps: spec.SchemaProps{
Description: "Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request (i.e. pings).",
Type: []string{"integer"},
Format: "int32",
},
},
"code": {
SchemaProps: spec.SchemaProps{
Description: "Match on a specific ICMP code. If specified, the Type value must also be specified. This is a technical limitation imposed by the kernel's iptables firewall, which Calico uses to enforce the rule.",
Type: []string{"integer"},
Format: "int32",
},
},
},
},
},
}
}
func schema_libcalico_go_lib_apis_v1_IPIPConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Properties: map[string]spec.Schema{
"enabled": {
SchemaProps: spec.SchemaProps{
Description: "When enabled is true, ipip tunneling will be used to deliver packets to destinations within this pool.",
Type: []string{"boolean"},
Format: "",
},
},
"mode": {
SchemaProps: spec.SchemaProps{
Description: "The IPIP mode. This can be one of \"always\" or \"cross-subnet\". A mode of \"always\" will also use IPIP tunneling for routing to destination IP addresses within this pool. A mode of \"cross-subnet\" will only use IPIP tunneling when the destination node is on a different subnet to the originating node. The default value (if not specified) is \"always\".",
Type: []string{"string"},
Format: "",
},
},
},
},
},
}
}
func schema_libcalico_go_lib_apis_v1_IPNAT(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "IPNat contains a single NAT mapping for a WorkloadEndpoint resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"internalIP": {
SchemaProps: spec.SchemaProps{
Description: "The internal IP address which must be associated with the owning endpoint via the configured IPNetworks for the endpoint.",
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IP"),
},
},
"externalIP": {
SchemaProps: spec.SchemaProps{
Description: "The external IP address.",
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IP"),
},
},
},
Required: []string{"internalIP", "externalIP"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/net.IP"},
}
}
func schema_libcalico_go_lib_apis_v1_IPPool(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "IPPool contains the details of a Calico IP pool resource. A pool resource is used by Calico in two ways:\n - to provide a set of IP addresses from which Calico IPAM assigns addresses\n for workloads.\n - to provide configuration specific to IP address range, such as configuration\n for the BGP daemon (e.g. when to use a GRE tunnel to encapsulate packets\n between compute hosts).",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"TypeMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"),
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPoolMetadata"),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPoolSpec"),
},
},
},
Required: []string{"TypeMetadata"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPoolMetadata", "github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPoolSpec", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_IPPoolList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "IPPoolList contains a list of IP pool resources. List types are returned from List() enumerations in the client interface.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"TypeMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"),
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"),
},
},
"items": {
SchemaProps: spec.SchemaProps{
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPool"),
},
},
},
},
},
},
Required: []string{"TypeMetadata", "items"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPPool", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"},
}
}
func schema_libcalico_go_lib_apis_v1_IPPoolMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "IPPoolMetadata contains the metadata for an IP pool resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"ObjectMetadata": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"),
},
},
"cidr": {
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/net.IPNet"),
},
},
},
Required: []string{"ObjectMetadata", "cidr"},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata", "github.com/dtest11/calico/libcalico-go/lib/net.IPNet"},
}
}
func schema_libcalico_go_lib_apis_v1_IPPoolSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "IPPoolSpec contains the specification for an IP pool resource.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"ipip": {
SchemaProps: spec.SchemaProps{
Description: "Contains configuration for ipip tunneling for this pool. If not specified, then ipip tunneling is disabled for this pool.",
Ref: ref("github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPIPConfiguration"),
},
},
"nat-outgoing": {
SchemaProps: spec.SchemaProps{
Description: "When nat-outgoing is true, packets sent from Calico networked containers in this pool to destinations outside of this pool will be masqueraded.",
Type: []string{"boolean"},
Format: "",
},
},
"disabled": {
SchemaProps: spec.SchemaProps{
Description: "When disabled is true, Calico IPAM will not assign addresses from this pool.",
Type: []string{"boolean"},
Format: "",
},
},
},
},
},
Dependencies: []string{
"github.com/dtest11/calico/libcalico-go/lib/apis/v1.IPIPConfiguration"},
}
}
func schema_libcalico_go_lib_apis_v1_KubeConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kubeconfig": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"k8sAPIEndpoint": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"k8sKeyFile": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"k8sCertFile": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"k8sCAFile": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"k8sAPIToken": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"k8sInsecureSkipTLSVerify": {
SchemaProps: spec.SchemaProps{
Default: false,
Type: []string{"boolean"},
Format: "",
},
},
"k8sDisableNodePoll": {
SchemaProps: spec.SchemaProps{
Default: false,
Type: []string{"boolean"},
Format: "",
},