1
2
3
4 package swaggerdocs
5
6 import (
7 "bytes"
8 "encoding/json"
9 "strings"
10
11 "github.com/alecthomas/template"
12 "github.com/swaggo/swag"
13 )
14
15 var doc = `{
16 "schemes": {{ marshal .Schemes }},
17 "swagger": "2.0",
18 "info": {
19 "description": "{{.Description}}",
20 "title": "{{.Title}}",
21 "contact": {
22 "name": "GitHub Issues",
23 "url": "https://github.com/chaos-mesh/chaos-mesh/issues"
24 },
25 "license": {
26 "name": "Apache 2.0",
27 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
28 },
29 "version": "{{.Version}}"
30 },
31 "host": "{{.Host}}",
32 "basePath": "{{.BasePath}}",
33 "paths": {
34 "/archives": {
35 "get": {
36 "description": "Get archived chaos experiments.",
37 "produces": [
38 "application/json"
39 ],
40 "tags": [
41 "archives"
42 ],
43 "summary": "Get archived chaos experiments.",
44 "parameters": [
45 {
46 "type": "string",
47 "description": "namespace",
48 "name": "namespace",
49 "in": "query"
50 },
51 {
52 "type": "string",
53 "description": "name",
54 "name": "name",
55 "in": "query"
56 },
57 {
58 "enum": [
59 "PodChaos",
60 "IOChaos",
61 "NetworkChaos",
62 "TimeChaos",
63 "KernelChaos",
64 "StressChaos"
65 ],
66 "type": "string",
67 "description": "kind",
68 "name": "kind",
69 "in": "query"
70 }
71 ],
72 "responses": {
73 "200": {
74 "description": "OK",
75 "schema": {
76 "type": "array",
77 "items": {
78 "$ref": "#/definitions/archive.Archive"
79 }
80 }
81 },
82 "500": {
83 "description": "Internal Server Error",
84 "schema": {
85 "$ref": "#/definitions/utils.APIError"
86 }
87 }
88 }
89 },
90 "delete": {
91 "description": "Delete the specified archived experiment.",
92 "produces": [
93 "application/json"
94 ],
95 "tags": [
96 "archives"
97 ],
98 "summary": "Delete the specified archived experiment.",
99 "parameters": [
100 {
101 "type": "string",
102 "description": "uids",
103 "name": "uids",
104 "in": "query",
105 "required": true
106 }
107 ],
108 "responses": {
109 "200": {
110 "description": "OK",
111 "schema": {
112 "$ref": "#/definitions/utils.Response"
113 }
114 },
115 "500": {
116 "description": "Internal Server Error",
117 "schema": {
118 "$ref": "#/definitions/utils.APIError"
119 }
120 }
121 }
122 }
123 },
124 "/archives/schedules": {
125 "get": {
126 "description": "Get archived schedule experiments.",
127 "produces": [
128 "application/json"
129 ],
130 "tags": [
131 "archives"
132 ],
133 "summary": "Get archived schedule experiments.",
134 "parameters": [
135 {
136 "type": "string",
137 "description": "namespace",
138 "name": "namespace",
139 "in": "query"
140 },
141 {
142 "type": "string",
143 "description": "name",
144 "name": "name",
145 "in": "query"
146 }
147 ],
148 "responses": {
149 "200": {
150 "description": "OK",
151 "schema": {
152 "type": "array",
153 "items": {
154 "$ref": "#/definitions/archive.Archive"
155 }
156 }
157 },
158 "500": {
159 "description": "Internal Server Error",
160 "schema": {
161 "$ref": "#/definitions/utils.APIError"
162 }
163 }
164 }
165 },
166 "delete": {
167 "description": "Delete the specified archived schedule.",
168 "produces": [
169 "application/json"
170 ],
171 "tags": [
172 "archives"
173 ],
174 "summary": "Delete the specified archived schedule.",
175 "parameters": [
176 {
177 "type": "string",
178 "description": "uids",
179 "name": "uids",
180 "in": "query",
181 "required": true
182 }
183 ],
184 "responses": {
185 "200": {
186 "description": "OK",
187 "schema": {
188 "$ref": "#/definitions/utils.Response"
189 }
190 },
191 "500": {
192 "description": "Internal Server Error",
193 "schema": {
194 "$ref": "#/definitions/utils.APIError"
195 }
196 }
197 }
198 }
199 },
200 "/archives/schedules/{uid}": {
201 "get": {
202 "description": "Get the detail of an archived schedule experiment.",
203 "produces": [
204 "application/json"
205 ],
206 "tags": [
207 "archives"
208 ],
209 "summary": "Get the detail of an archived schedule experiment.",
210 "parameters": [
211 {
212 "type": "string",
213 "description": "uid",
214 "name": "uid",
215 "in": "query",
216 "required": true
217 }
218 ],
219 "responses": {
220 "200": {
221 "description": "OK",
222 "schema": {
223 "$ref": "#/definitions/archive.Detail"
224 }
225 },
226 "500": {
227 "description": "Internal Server Error",
228 "schema": {
229 "$ref": "#/definitions/utils.APIError"
230 }
231 }
232 }
233 },
234 "delete": {
235 "description": "Delete the specified archived schedule.",
236 "produces": [
237 "application/json"
238 ],
239 "tags": [
240 "archives"
241 ],
242 "summary": "Delete the specified archived schedule.",
243 "parameters": [
244 {
245 "type": "string",
246 "description": "uid",
247 "name": "uid",
248 "in": "path",
249 "required": true
250 }
251 ],
252 "responses": {
253 "200": {
254 "description": "OK",
255 "schema": {
256 "$ref": "#/definitions/utils.Response"
257 }
258 },
259 "500": {
260 "description": "Internal Server Error",
261 "schema": {
262 "$ref": "#/definitions/utils.APIError"
263 }
264 }
265 }
266 }
267 },
268 "/archives/workflows": {
269 "get": {
270 "description": "Get archived workflow.",
271 "produces": [
272 "application/json"
273 ],
274 "tags": [
275 "archives"
276 ],
277 "summary": "Get archived workflow.",
278 "parameters": [
279 {
280 "type": "string",
281 "description": "namespace",
282 "name": "namespace",
283 "in": "query"
284 },
285 {
286 "type": "string",
287 "description": "name",
288 "name": "name",
289 "in": "query"
290 }
291 ],
292 "responses": {
293 "200": {
294 "description": "OK",
295 "schema": {
296 "type": "array",
297 "items": {
298 "$ref": "#/definitions/archive.Archive"
299 }
300 }
301 },
302 "500": {
303 "description": "Internal Server Error",
304 "schema": {
305 "$ref": "#/definitions/utils.APIError"
306 }
307 }
308 }
309 },
310 "delete": {
311 "description": "Delete the specified archived workflows.",
312 "produces": [
313 "application/json"
314 ],
315 "tags": [
316 "archives"
317 ],
318 "summary": "Delete the specified archived workflows.",
319 "parameters": [
320 {
321 "type": "string",
322 "description": "uids",
323 "name": "uids",
324 "in": "query",
325 "required": true
326 }
327 ],
328 "responses": {
329 "200": {
330 "description": "OK",
331 "schema": {
332 "$ref": "#/definitions/utils.Response"
333 }
334 },
335 "500": {
336 "description": "Internal Server Error",
337 "schema": {
338 "$ref": "#/definitions/utils.APIError"
339 }
340 }
341 }
342 }
343 },
344 "/archives/workflows/{uid}": {
345 "get": {
346 "description": "Get the detail of an archived workflow.",
347 "produces": [
348 "application/json"
349 ],
350 "tags": [
351 "archives"
352 ],
353 "summary": "Get the detail of an archived workflow.",
354 "parameters": [
355 {
356 "type": "string",
357 "description": "uid",
358 "name": "uid",
359 "in": "query",
360 "required": true
361 }
362 ],
363 "responses": {
364 "200": {
365 "description": "OK",
366 "schema": {
367 "$ref": "#/definitions/archive.Detail"
368 }
369 },
370 "500": {
371 "description": "Internal Server Error",
372 "schema": {
373 "$ref": "#/definitions/utils.APIError"
374 }
375 }
376 }
377 },
378 "delete": {
379 "description": "Delete the specified archived workflow.",
380 "produces": [
381 "application/json"
382 ],
383 "tags": [
384 "archives"
385 ],
386 "summary": "Delete the specified archived workflow.",
387 "parameters": [
388 {
389 "type": "string",
390 "description": "uid",
391 "name": "uid",
392 "in": "path",
393 "required": true
394 }
395 ],
396 "responses": {
397 "200": {
398 "description": "OK",
399 "schema": {
400 "$ref": "#/definitions/utils.Response"
401 }
402 },
403 "500": {
404 "description": "Internal Server Error",
405 "schema": {
406 "$ref": "#/definitions/utils.APIError"
407 }
408 }
409 }
410 }
411 },
412 "/archives/{uid}": {
413 "get": {
414 "description": "Get the archived chaos experiment's detail by uid.",
415 "produces": [
416 "application/json"
417 ],
418 "tags": [
419 "archives"
420 ],
421 "summary": "Get an archived chaos experiment.",
422 "parameters": [
423 {
424 "type": "string",
425 "description": "the archive uid",
426 "name": "uid",
427 "in": "path",
428 "required": true
429 }
430 ],
431 "responses": {
432 "200": {
433 "description": "OK",
434 "schema": {
435 "$ref": "#/definitions/archive.Detail"
436 }
437 },
438 "404": {
439 "description": "Not Found",
440 "schema": {
441 "$ref": "#/definitions/utils.APIError"
442 }
443 },
444 "500": {
445 "description": "Internal Server Error",
446 "schema": {
447 "$ref": "#/definitions/utils.APIError"
448 }
449 }
450 }
451 },
452 "delete": {
453 "description": "Delete the specified archived experiment.",
454 "produces": [
455 "application/json"
456 ],
457 "tags": [
458 "archives"
459 ],
460 "summary": "Delete the specified archived experiment.",
461 "parameters": [
462 {
463 "type": "string",
464 "description": "uid",
465 "name": "uid",
466 "in": "path",
467 "required": true
468 }
469 ],
470 "responses": {
471 "200": {
472 "description": "OK",
473 "schema": {
474 "$ref": "#/definitions/utils.Response"
475 }
476 },
477 "500": {
478 "description": "Internal Server Error",
479 "schema": {
480 "$ref": "#/definitions/utils.APIError"
481 }
482 }
483 }
484 }
485 },
486 "/common/annotations": {
487 "get": {
488 "description": "Get the annotations of the pods in the specified namespace from Kubernetes cluster.",
489 "produces": [
490 "application/json"
491 ],
492 "tags": [
493 "common"
494 ],
495 "summary": "Get the annotations of the pods in the specified namespace from Kubernetes cluster.",
496 "parameters": [
497 {
498 "type": "string",
499 "description": "The pod's namespace list, split by ,",
500 "name": "podNamespaceList",
501 "in": "query",
502 "required": true
503 }
504 ],
505 "responses": {
506 "200": {
507 "description": "OK",
508 "schema": {
509 "$ref": "#/definitions/common.MapSlice"
510 }
511 },
512 "500": {
513 "description": "Internal Server Error",
514 "schema": {
515 "$ref": "#/definitions/utils.APIError"
516 }
517 }
518 }
519 }
520 },
521 "/common/chaos-available-namespaces": {
522 "get": {
523 "description": "Get all namespaces which could inject chaos(explosion scope) from Kubernetes cluster.",
524 "produces": [
525 "application/json"
526 ],
527 "tags": [
528 "common"
529 ],
530 "summary": "Get all namespaces which could inject chaos(explosion scope) from Kubernetes cluster.",
531 "responses": {
532 "200": {
533 "description": "OK",
534 "schema": {
535 "type": "array",
536 "items": {
537 "type": "string"
538 }
539 }
540 },
541 "500": {
542 "description": "Internal Server Error",
543 "schema": {
544 "$ref": "#/definitions/utils.APIError"
545 }
546 }
547 }
548 }
549 },
550 "/common/config": {
551 "get": {
552 "description": "Get the config of Dashboard.",
553 "produces": [
554 "application/json"
555 ],
556 "tags": [
557 "common"
558 ],
559 "summary": "Get the config of Dashboard.",
560 "responses": {
561 "200": {
562 "description": "OK",
563 "schema": {
564 "$ref": "#/definitions/config.ChaosDashboardConfig"
565 }
566 },
567 "500": {
568 "description": "Internal Server Error",
569 "schema": {
570 "$ref": "#/definitions/utils.APIError"
571 }
572 }
573 }
574 }
575 },
576 "/common/kinds": {
577 "get": {
578 "description": "Get all chaos kinds from Kubernetes cluster.",
579 "produces": [
580 "application/json"
581 ],
582 "tags": [
583 "common"
584 ],
585 "summary": "Get all chaos kinds from Kubernetes cluster.",
586 "responses": {
587 "200": {
588 "description": "OK",
589 "schema": {
590 "type": "array",
591 "items": {
592 "type": "string"
593 }
594 }
595 },
596 "500": {
597 "description": "Internal Server Error",
598 "schema": {
599 "$ref": "#/definitions/utils.APIError"
600 }
601 }
602 }
603 }
604 },
605 "/common/labels": {
606 "get": {
607 "description": "Get the labels of the pods in the specified namespace from Kubernetes cluster.",
608 "produces": [
609 "application/json"
610 ],
611 "tags": [
612 "common"
613 ],
614 "summary": "Get the labels of the pods in the specified namespace from Kubernetes cluster.",
615 "parameters": [
616 {
617 "type": "string",
618 "description": "The pod's namespace list, split by ,",
619 "name": "podNamespaceList",
620 "in": "query",
621 "required": true
622 }
623 ],
624 "responses": {
625 "200": {
626 "description": "OK",
627 "schema": {
628 "$ref": "#/definitions/common.MapSlice"
629 }
630 },
631 "500": {
632 "description": "Internal Server Error",
633 "schema": {
634 "$ref": "#/definitions/utils.APIError"
635 }
636 }
637 }
638 }
639 },
640 "/common/namespaces": {
641 "get": {
642 "description": "Get all from Kubernetes cluster.",
643 "produces": [
644 "application/json"
645 ],
646 "tags": [
647 "common"
648 ],
649 "summary": "Get all namespaces from Kubernetes cluster.",
650 "deprecated": true,
651 "responses": {
652 "200": {
653 "description": "OK",
654 "schema": {
655 "type": "array",
656 "items": {
657 "type": "string"
658 }
659 }
660 },
661 "500": {
662 "description": "Internal Server Error",
663 "schema": {
664 "$ref": "#/definitions/utils.APIError"
665 }
666 }
667 }
668 }
669 },
670 "/common/pods": {
671 "post": {
672 "description": "Get pods from Kubernetes cluster.",
673 "produces": [
674 "application/json"
675 ],
676 "tags": [
677 "common"
678 ],
679 "summary": "Get pods from Kubernetes cluster.",
680 "parameters": [
681 {
682 "description": "Request body",
683 "name": "request",
684 "in": "body",
685 "required": true,
686 "schema": {
687 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
688 }
689 }
690 ],
691 "responses": {
692 "200": {
693 "description": "OK",
694 "schema": {
695 "type": "array",
696 "items": {
697 "$ref": "#/definitions/common.Pod"
698 }
699 }
700 },
701 "500": {
702 "description": "Internal Server Error",
703 "schema": {
704 "$ref": "#/definitions/utils.APIError"
705 }
706 }
707 }
708 }
709 },
710 "/common/rbac-config": {
711 "get": {
712 "description": "Get the rbac config according to the user's choice.",
713 "produces": [
714 "application/json"
715 ],
716 "tags": [
717 "common"
718 ],
719 "summary": "Get the rbac config according to the user's choice.",
720 "responses": {
721 "200": {
722 "description": "OK",
723 "schema": {
724 "$ref": "#/definitions/common.MapSlice"
725 }
726 },
727 "500": {
728 "description": "Internal Server Error",
729 "schema": {
730 "$ref": "#/definitions/utils.APIError"
731 }
732 }
733 }
734 }
735 },
736 "/events": {
737 "get": {
738 "description": "Get events from db.",
739 "produces": [
740 "application/json"
741 ],
742 "tags": [
743 "events"
744 ],
745 "summary": "list events.",
746 "parameters": [
747 {
748 "type": "string",
749 "description": "The create time of events",
750 "name": "created_at",
751 "in": "query"
752 },
753 {
754 "type": "string",
755 "description": "The name of the object",
756 "name": "name",
757 "in": "query"
758 },
759 {
760 "type": "string",
761 "description": "The namespace of the object",
762 "name": "namespace",
763 "in": "query"
764 },
765 {
766 "type": "string",
767 "description": "The UID of the object",
768 "name": "object_id",
769 "in": "query"
770 },
771 {
772 "enum": [
773 "PodChaos",
774 "IOChaos",
775 "NetworkChaos",
776 "TimeChaos",
777 "KernelChaos",
778 "StressChaos",
779 "AWSChaos",
780 "GCPChaos",
781 "DNSChaos",
782 "Schedule"
783 ],
784 "type": "string",
785 "description": "kind",
786 "name": "kind",
787 "in": "query"
788 },
789 {
790 "type": "string",
791 "description": "The max length of events list",
792 "name": "limit",
793 "in": "query"
794 }
795 ],
796 "responses": {
797 "200": {
798 "description": "OK",
799 "schema": {
800 "type": "array",
801 "items": {
802 "$ref": "#/definitions/core.Event"
803 }
804 }
805 },
806 "500": {
807 "description": "Internal Server Error",
808 "schema": {
809 "$ref": "#/definitions/utils.APIError"
810 }
811 }
812 }
813 }
814 },
815 "/events/workflow/{uid}": {
816 "get": {
817 "description": "list all events for Workflow and related WorkflowNode.",
818 "produces": [
819 "application/json"
820 ],
821 "tags": [
822 "events"
823 ],
824 "summary": "cascadeFetchEventsForWorkflow list all events for Workflow and related WorkflowNode.",
825 "parameters": [
826 {
827 "type": "string",
828 "description": "The namespace of the object",
829 "name": "namespace",
830 "in": "query"
831 },
832 {
833 "type": "string",
834 "description": "The UID of the Workflow",
835 "name": "uid",
836 "in": "path"
837 },
838 {
839 "type": "string",
840 "description": "The max length of events list",
841 "name": "limit",
842 "in": "query"
843 }
844 ],
845 "responses": {
846 "200": {
847 "description": "OK",
848 "schema": {
849 "type": "array",
850 "items": {
851 "$ref": "#/definitions/core.Event"
852 }
853 }
854 },
855 "500": {
856 "description": "Internal Server Error",
857 "schema": {
858 "$ref": "#/definitions/utils.APIError"
859 }
860 }
861 }
862 }
863 },
864 "/events/{id}": {
865 "get": {
866 "description": "Get the event from db by ID.",
867 "produces": [
868 "application/json"
869 ],
870 "tags": [
871 "events"
872 ],
873 "summary": "Get an event.",
874 "parameters": [
875 {
876 "type": "integer",
877 "description": "The event ID",
878 "name": "id",
879 "in": "path",
880 "required": true
881 }
882 ],
883 "responses": {
884 "200": {
885 "description": "OK",
886 "schema": {
887 "$ref": "#/definitions/core.Event"
888 }
889 },
890 "400": {
891 "description": "Bad Request",
892 "schema": {
893 "$ref": "#/definitions/utils.APIError"
894 }
895 },
896 "404": {
897 "description": "Not Found",
898 "schema": {
899 "$ref": "#/definitions/utils.APIError"
900 }
901 },
902 "500": {
903 "description": "Internal Server Error",
904 "schema": {
905 "$ref": "#/definitions/utils.APIError"
906 }
907 }
908 }
909 }
910 },
911 "/experiments": {
912 "get": {
913 "description": "Get chaos experiments from k8s clusters in real time.",
914 "produces": [
915 "application/json"
916 ],
917 "tags": [
918 "experiments"
919 ],
920 "summary": "List chaos experiments.",
921 "parameters": [
922 {
923 "type": "string",
924 "description": "filter exps by namespace",
925 "name": "namespace",
926 "in": "query"
927 },
928 {
929 "type": "string",
930 "description": "filter exps by name",
931 "name": "name",
932 "in": "query"
933 },
934 {
935 "enum": [
936 "PodChaos",
937 "NetworkChaos",
938 "IOChaos",
939 "StressChaos",
940 "KernelChaos",
941 "TimeChaos",
942 "DNSChaos",
943 "AWSChaos",
944 "GCPChaos",
945 "JVMChaos",
946 "HTTPChaos"
947 ],
948 "type": "string",
949 "description": "filter exps by kind",
950 "name": "kind",
951 "in": "query"
952 },
953 {
954 "enum": [
955 "Injecting",
956 "Running",
957 "Finished",
958 "Paused"
959 ],
960 "type": "string",
961 "description": "filter exps by status",
962 "name": "status",
963 "in": "query"
964 }
965 ],
966 "responses": {
967 "200": {
968 "description": "OK",
969 "schema": {
970 "type": "array",
971 "items": {
972 "$ref": "#/definitions/experiment.Experiment"
973 }
974 }
975 },
976 "400": {
977 "description": "Bad Request",
978 "schema": {
979 "$ref": "#/definitions/utils.APIError"
980 }
981 },
982 "500": {
983 "description": "Internal Server Error",
984 "schema": {
985 "$ref": "#/definitions/utils.APIError"
986 }
987 }
988 }
989 },
990 "post": {
991 "description": "Pass a JSON object to create a new chaos experiment. The schema for JSON is the same as the YAML schema for the Kubernetes object.",
992 "consumes": [
993 "application/json"
994 ],
995 "produces": [
996 "application/json"
997 ],
998 "tags": [
999 "experiments"
1000 ],
1001 "summary": "Create a new chaos experiment.",
1002 "parameters": [
1003 {
1004 "description": "the chaos definition",
1005 "name": "chaos",
1006 "in": "body",
1007 "required": true,
1008 "schema": {
1009 "type": "object",
1010 "additionalProperties": true
1011 }
1012 }
1013 ],
1014 "responses": {
1015 "200": {
1016 "description": "OK",
1017 "schema": {
1018 "type": "object",
1019 "additionalProperties": true
1020 }
1021 },
1022 "400": {
1023 "description": "Bad Request",
1024 "schema": {
1025 "$ref": "#/definitions/utils.APIError"
1026 }
1027 },
1028 "500": {
1029 "description": "Internal Server Error",
1030 "schema": {
1031 "$ref": "#/definitions/utils.APIError"
1032 }
1033 }
1034 }
1035 },
1036 "delete": {
1037 "description": "Batch delete chaos experiments by uids.",
1038 "produces": [
1039 "application/json"
1040 ],
1041 "tags": [
1042 "experiments"
1043 ],
1044 "summary": "Batch delete chaos experiments.",
1045 "parameters": [
1046 {
1047 "type": "string",
1048 "description": "the experiment uids, split with comma. Example: ?uids=uid1,uid2",
1049 "name": "uids",
1050 "in": "query",
1051 "required": true
1052 },
1053 {
1054 "enum": [
1055 "true",
1056 "false"
1057 ],
1058 "type": "string",
1059 "description": "force",
1060 "name": "force",
1061 "in": "query"
1062 }
1063 ],
1064 "responses": {
1065 "200": {
1066 "description": "OK",
1067 "schema": {
1068 "$ref": "#/definitions/utils.Response"
1069 }
1070 },
1071 "400": {
1072 "description": "Bad Request",
1073 "schema": {
1074 "$ref": "#/definitions/utils.APIError"
1075 }
1076 },
1077 "404": {
1078 "description": "Not Found",
1079 "schema": {
1080 "$ref": "#/definitions/utils.APIError"
1081 }
1082 },
1083 "500": {
1084 "description": "Internal Server Error",
1085 "schema": {
1086 "$ref": "#/definitions/utils.APIError"
1087 }
1088 }
1089 }
1090 }
1091 },
1092 "/experiments/pause/{uid}": {
1093 "put": {
1094 "description": "Pause a chaos experiment.",
1095 "produces": [
1096 "application/json"
1097 ],
1098 "tags": [
1099 "experiments"
1100 ],
1101 "summary": "Pause a chaos experiment.",
1102 "parameters": [
1103 {
1104 "type": "string",
1105 "description": "the experiment uid",
1106 "name": "uid",
1107 "in": "path",
1108 "required": true
1109 }
1110 ],
1111 "responses": {
1112 "200": {
1113 "description": "OK",
1114 "schema": {
1115 "$ref": "#/definitions/utils.Response"
1116 }
1117 },
1118 "400": {
1119 "description": "Bad Request",
1120 "schema": {
1121 "$ref": "#/definitions/utils.APIError"
1122 }
1123 },
1124 "404": {
1125 "description": "Not Found",
1126 "schema": {
1127 "$ref": "#/definitions/utils.APIError"
1128 }
1129 },
1130 "500": {
1131 "description": "Internal Server Error",
1132 "schema": {
1133 "$ref": "#/definitions/utils.APIError"
1134 }
1135 }
1136 }
1137 }
1138 },
1139 "/experiments/start/{uid}": {
1140 "put": {
1141 "description": "Start a chaos experiment.",
1142 "produces": [
1143 "application/json"
1144 ],
1145 "tags": [
1146 "experiments"
1147 ],
1148 "summary": "Start a chaos experiment.",
1149 "parameters": [
1150 {
1151 "type": "string",
1152 "description": "the experiment uid",
1153 "name": "uid",
1154 "in": "path",
1155 "required": true
1156 }
1157 ],
1158 "responses": {
1159 "200": {
1160 "description": "OK",
1161 "schema": {
1162 "$ref": "#/definitions/utils.Response"
1163 }
1164 },
1165 "400": {
1166 "description": "Bad Request",
1167 "schema": {
1168 "$ref": "#/definitions/utils.APIError"
1169 }
1170 },
1171 "404": {
1172 "description": "Not Found",
1173 "schema": {
1174 "$ref": "#/definitions/utils.APIError"
1175 }
1176 },
1177 "500": {
1178 "description": "Internal Server Error",
1179 "schema": {
1180 "$ref": "#/definitions/utils.APIError"
1181 }
1182 }
1183 }
1184 }
1185 },
1186 "/experiments/state": {
1187 "get": {
1188 "description": "Get the status of all experiments.",
1189 "produces": [
1190 "application/json"
1191 ],
1192 "tags": [
1193 "experiments"
1194 ],
1195 "summary": "Get the status of all experiments.",
1196 "parameters": [
1197 {
1198 "type": "string",
1199 "description": "namespace",
1200 "name": "namespace",
1201 "in": "query"
1202 }
1203 ],
1204 "responses": {
1205 "200": {
1206 "description": "OK",
1207 "schema": {
1208 "$ref": "#/definitions/status.AllChaosStatus"
1209 }
1210 },
1211 "400": {
1212 "description": "Bad Request",
1213 "schema": {
1214 "$ref": "#/definitions/utils.APIError"
1215 }
1216 },
1217 "500": {
1218 "description": "Internal Server Error",
1219 "schema": {
1220 "$ref": "#/definitions/utils.APIError"
1221 }
1222 }
1223 }
1224 }
1225 },
1226 "/experiments/{uid}": {
1227 "get": {
1228 "description": "Get the chaos experiment's detail by uid.",
1229 "produces": [
1230 "application/json"
1231 ],
1232 "tags": [
1233 "experiments"
1234 ],
1235 "summary": "Get a chaos experiment.",
1236 "parameters": [
1237 {
1238 "type": "string",
1239 "description": "the experiment uid",
1240 "name": "uid",
1241 "in": "path",
1242 "required": true
1243 }
1244 ],
1245 "responses": {
1246 "200": {
1247 "description": "OK",
1248 "schema": {
1249 "$ref": "#/definitions/experiment.Detail"
1250 }
1251 },
1252 "400": {
1253 "description": "Bad Request",
1254 "schema": {
1255 "$ref": "#/definitions/utils.APIError"
1256 }
1257 },
1258 "404": {
1259 "description": "Not Found",
1260 "schema": {
1261 "$ref": "#/definitions/utils.APIError"
1262 }
1263 },
1264 "500": {
1265 "description": "Internal Server Error",
1266 "schema": {
1267 "$ref": "#/definitions/utils.APIError"
1268 }
1269 }
1270 }
1271 },
1272 "delete": {
1273 "description": "Delete the chaos experiment by uid.",
1274 "produces": [
1275 "application/json"
1276 ],
1277 "tags": [
1278 "experiments"
1279 ],
1280 "summary": "Delete a chaos experiment.",
1281 "parameters": [
1282 {
1283 "type": "string",
1284 "description": "the experiment uid",
1285 "name": "uid",
1286 "in": "path",
1287 "required": true
1288 },
1289 {
1290 "enum": [
1291 "true",
1292 "false"
1293 ],
1294 "type": "string",
1295 "description": "force",
1296 "name": "force",
1297 "in": "query"
1298 }
1299 ],
1300 "responses": {
1301 "200": {
1302 "description": "OK",
1303 "schema": {
1304 "$ref": "#/definitions/utils.Response"
1305 }
1306 },
1307 "400": {
1308 "description": "Bad Request",
1309 "schema": {
1310 "$ref": "#/definitions/utils.APIError"
1311 }
1312 },
1313 "404": {
1314 "description": "Not Found",
1315 "schema": {
1316 "$ref": "#/definitions/utils.APIError"
1317 }
1318 },
1319 "500": {
1320 "description": "Internal Server Error",
1321 "schema": {
1322 "$ref": "#/definitions/utils.APIError"
1323 }
1324 }
1325 }
1326 }
1327 },
1328 "/schedules": {
1329 "get": {
1330 "description": "Get chaos schedules from k8s cluster in real time.",
1331 "produces": [
1332 "application/json"
1333 ],
1334 "tags": [
1335 "schedules"
1336 ],
1337 "summary": "List chaos schedules.",
1338 "parameters": [
1339 {
1340 "type": "string",
1341 "description": "filter schedules by namespace",
1342 "name": "namespace",
1343 "in": "query"
1344 },
1345 {
1346 "type": "string",
1347 "description": "filter schedules by name",
1348 "name": "name",
1349 "in": "query"
1350 }
1351 ],
1352 "responses": {
1353 "200": {
1354 "description": "OK",
1355 "schema": {
1356 "type": "array",
1357 "items": {
1358 "$ref": "#/definitions/schedule.Schedule"
1359 }
1360 }
1361 },
1362 "400": {
1363 "description": "Bad Request",
1364 "schema": {
1365 "$ref": "#/definitions/utils.APIError"
1366 }
1367 },
1368 "500": {
1369 "description": "Internal Server Error",
1370 "schema": {
1371 "$ref": "#/definitions/utils.APIError"
1372 }
1373 }
1374 }
1375 },
1376 "post": {
1377 "description": "Pass a JSON object to create a new schedule. The schema for JSON is the same as the YAML schema for the Kubernetes object.",
1378 "consumes": [
1379 "application/json"
1380 ],
1381 "produces": [
1382 "application/json"
1383 ],
1384 "tags": [
1385 "schedules"
1386 ],
1387 "summary": "Create a new schedule.",
1388 "parameters": [
1389 {
1390 "description": "the schedule definition",
1391 "name": "schedule",
1392 "in": "body",
1393 "required": true,
1394 "schema": {
1395 "$ref": "#/definitions/v1alpha1.Schedule"
1396 }
1397 }
1398 ],
1399 "responses": {
1400 "200": {
1401 "description": "OK",
1402 "schema": {
1403 "$ref": "#/definitions/v1alpha1.Schedule"
1404 }
1405 },
1406 "400": {
1407 "description": "Bad Request",
1408 "schema": {
1409 "$ref": "#/definitions/utils.APIError"
1410 }
1411 },
1412 "500": {
1413 "description": "Internal Server Error",
1414 "schema": {
1415 "$ref": "#/definitions/utils.APIError"
1416 }
1417 }
1418 }
1419 },
1420 "delete": {
1421 "description": "Batch delete schedules by uids.",
1422 "produces": [
1423 "application/json"
1424 ],
1425 "tags": [
1426 "schedules"
1427 ],
1428 "summary": "Batch delete schedules.",
1429 "parameters": [
1430 {
1431 "type": "string",
1432 "description": "the schedule uids, split with comma. Example: ?uids=uid1,uid2",
1433 "name": "uids",
1434 "in": "query",
1435 "required": true
1436 }
1437 ],
1438 "responses": {
1439 "200": {
1440 "description": "OK",
1441 "schema": {
1442 "$ref": "#/definitions/utils.Response"
1443 }
1444 },
1445 "400": {
1446 "description": "Bad Request",
1447 "schema": {
1448 "$ref": "#/definitions/utils.APIError"
1449 }
1450 },
1451 "404": {
1452 "description": "Not Found",
1453 "schema": {
1454 "$ref": "#/definitions/utils.APIError"
1455 }
1456 },
1457 "500": {
1458 "description": "Internal Server Error",
1459 "schema": {
1460 "$ref": "#/definitions/utils.APIError"
1461 }
1462 }
1463 }
1464 }
1465 },
1466 "/schedules/pause/{uid}": {
1467 "put": {
1468 "description": "Pause a schedule.",
1469 "produces": [
1470 "application/json"
1471 ],
1472 "tags": [
1473 "schedules"
1474 ],
1475 "summary": "Pause a schedule.",
1476 "parameters": [
1477 {
1478 "type": "string",
1479 "description": "the schedule uid",
1480 "name": "uid",
1481 "in": "path",
1482 "required": true
1483 }
1484 ],
1485 "responses": {
1486 "200": {
1487 "description": "OK",
1488 "schema": {
1489 "$ref": "#/definitions/utils.Response"
1490 }
1491 },
1492 "400": {
1493 "description": "Bad Request",
1494 "schema": {
1495 "$ref": "#/definitions/utils.APIError"
1496 }
1497 },
1498 "404": {
1499 "description": "Not Found",
1500 "schema": {
1501 "$ref": "#/definitions/utils.APIError"
1502 }
1503 },
1504 "500": {
1505 "description": "Internal Server Error",
1506 "schema": {
1507 "$ref": "#/definitions/utils.APIError"
1508 }
1509 }
1510 }
1511 }
1512 },
1513 "/schedules/start/{uid}": {
1514 "put": {
1515 "description": "Start a schedule.",
1516 "produces": [
1517 "application/json"
1518 ],
1519 "tags": [
1520 "schedules"
1521 ],
1522 "summary": "Start a schedule.",
1523 "parameters": [
1524 {
1525 "type": "string",
1526 "description": "the schedule uid",
1527 "name": "uid",
1528 "in": "path",
1529 "required": true
1530 }
1531 ],
1532 "responses": {
1533 "200": {
1534 "description": "OK",
1535 "schema": {
1536 "$ref": "#/definitions/utils.Response"
1537 }
1538 },
1539 "400": {
1540 "description": "Bad Request",
1541 "schema": {
1542 "$ref": "#/definitions/utils.APIError"
1543 }
1544 },
1545 "404": {
1546 "description": "Not Found",
1547 "schema": {
1548 "$ref": "#/definitions/utils.APIError"
1549 }
1550 },
1551 "500": {
1552 "description": "Internal Server Error",
1553 "schema": {
1554 "$ref": "#/definitions/utils.APIError"
1555 }
1556 }
1557 }
1558 }
1559 },
1560 "/schedules/{uid}": {
1561 "get": {
1562 "description": "Get the schedule's detail by uid.",
1563 "produces": [
1564 "application/json"
1565 ],
1566 "tags": [
1567 "schedules"
1568 ],
1569 "summary": "Get a schedule.",
1570 "parameters": [
1571 {
1572 "type": "string",
1573 "description": "the schedule uid",
1574 "name": "uid",
1575 "in": "path",
1576 "required": true
1577 }
1578 ],
1579 "responses": {
1580 "200": {
1581 "description": "OK",
1582 "schema": {
1583 "$ref": "#/definitions/schedule.Detail"
1584 }
1585 },
1586 "400": {
1587 "description": "Bad Request",
1588 "schema": {
1589 "$ref": "#/definitions/utils.APIError"
1590 }
1591 },
1592 "404": {
1593 "description": "Not Found",
1594 "schema": {
1595 "$ref": "#/definitions/utils.APIError"
1596 }
1597 },
1598 "500": {
1599 "description": "Internal Server Error",
1600 "schema": {
1601 "$ref": "#/definitions/utils.APIError"
1602 }
1603 }
1604 }
1605 },
1606 "delete": {
1607 "description": "Delete the schedule by uid.",
1608 "produces": [
1609 "application/json"
1610 ],
1611 "tags": [
1612 "schedules"
1613 ],
1614 "summary": "Delete a schedule.",
1615 "parameters": [
1616 {
1617 "type": "string",
1618 "description": "the schedule uid",
1619 "name": "uid",
1620 "in": "path",
1621 "required": true
1622 }
1623 ],
1624 "responses": {
1625 "200": {
1626 "description": "OK",
1627 "schema": {
1628 "$ref": "#/definitions/utils.Response"
1629 }
1630 },
1631 "400": {
1632 "description": "Bad Request",
1633 "schema": {
1634 "$ref": "#/definitions/utils.APIError"
1635 }
1636 },
1637 "404": {
1638 "description": "Not Found",
1639 "schema": {
1640 "$ref": "#/definitions/utils.APIError"
1641 }
1642 },
1643 "500": {
1644 "description": "Internal Server Error",
1645 "schema": {
1646 "$ref": "#/definitions/utils.APIError"
1647 }
1648 }
1649 }
1650 }
1651 },
1652 "/workflows": {
1653 "get": {
1654 "description": "List workflows from Kubernetes cluster.",
1655 "produces": [
1656 "application/json"
1657 ],
1658 "tags": [
1659 "workflows"
1660 ],
1661 "summary": "List workflows from Kubernetes cluster.",
1662 "parameters": [
1663 {
1664 "type": "string",
1665 "description": "namespace, given empty string means list from all namespace",
1666 "name": "namespace",
1667 "in": "query"
1668 },
1669 {
1670 "enum": [
1671 "Initializing",
1672 "Running",
1673 "Errored",
1674 "Finished"
1675 ],
1676 "type": "string",
1677 "description": "status",
1678 "name": "status",
1679 "in": "query"
1680 }
1681 ],
1682 "responses": {
1683 "200": {
1684 "description": "OK",
1685 "schema": {
1686 "type": "array",
1687 "items": {
1688 "$ref": "#/definitions/core.WorkflowMeta"
1689 }
1690 }
1691 },
1692 "500": {
1693 "description": "Internal Server Error",
1694 "schema": {
1695 "$ref": "#/definitions/utils.APIError"
1696 }
1697 }
1698 }
1699 }
1700 },
1701 "/workflows/new": {
1702 "post": {
1703 "description": "Create a new workflow.",
1704 "produces": [
1705 "application/json"
1706 ],
1707 "tags": [
1708 "workflows"
1709 ],
1710 "summary": "Create a new workflow.",
1711 "parameters": [
1712 {
1713 "description": "Request body",
1714 "name": "request",
1715 "in": "body",
1716 "required": true,
1717 "schema": {
1718 "$ref": "#/definitions/v1alpha1.Workflow"
1719 }
1720 }
1721 ],
1722 "responses": {
1723 "200": {
1724 "description": "OK",
1725 "schema": {
1726 "$ref": "#/definitions/core.WorkflowDetail"
1727 }
1728 },
1729 "400": {
1730 "description": "Bad Request",
1731 "schema": {
1732 "$ref": "#/definitions/utils.APIError"
1733 }
1734 },
1735 "500": {
1736 "description": "Internal Server Error",
1737 "schema": {
1738 "$ref": "#/definitions/utils.APIError"
1739 }
1740 }
1741 }
1742 }
1743 },
1744 "/workflows/parse-task/http": {
1745 "post": {
1746 "description": "Parse the rendered task back to the original request",
1747 "produces": [
1748 "application/json"
1749 ],
1750 "tags": [
1751 "workflows"
1752 ],
1753 "summary": "Parse the rendered task back to the original request",
1754 "parameters": [
1755 {
1756 "description": "Rendered Task",
1757 "name": "request",
1758 "in": "body",
1759 "required": true,
1760 "schema": {
1761 "$ref": "#/definitions/v1alpha1.Template"
1762 }
1763 }
1764 ],
1765 "responses": {
1766 "200": {
1767 "description": "OK",
1768 "schema": {
1769 "$ref": "#/definitions/curl.RequestForm"
1770 }
1771 },
1772 "400": {
1773 "description": "Bad Request",
1774 "schema": {
1775 "$ref": "#/definitions/utils.APIError"
1776 }
1777 },
1778 "500": {
1779 "description": "Internal Server Error",
1780 "schema": {
1781 "$ref": "#/definitions/utils.APIError"
1782 }
1783 }
1784 }
1785 }
1786 },
1787 "/workflows/render-task/http": {
1788 "post": {
1789 "description": "Render a task which sends HTTP request",
1790 "produces": [
1791 "application/json"
1792 ],
1793 "tags": [
1794 "workflows"
1795 ],
1796 "summary": "Render a task which sends HTTP request",
1797 "parameters": [
1798 {
1799 "description": "Origin HTTP Request",
1800 "name": "request",
1801 "in": "body",
1802 "required": true,
1803 "schema": {
1804 "$ref": "#/definitions/curl.RequestForm"
1805 }
1806 }
1807 ],
1808 "responses": {
1809 "200": {
1810 "description": "OK",
1811 "schema": {
1812 "$ref": "#/definitions/v1alpha1.Template"
1813 }
1814 },
1815 "400": {
1816 "description": "Bad Request",
1817 "schema": {
1818 "$ref": "#/definitions/utils.APIError"
1819 }
1820 },
1821 "500": {
1822 "description": "Internal Server Error",
1823 "schema": {
1824 "$ref": "#/definitions/utils.APIError"
1825 }
1826 }
1827 }
1828 }
1829 },
1830 "/workflows/validate-task/http": {
1831 "post": {
1832 "description": "Validate the given template is a valid rendered HTTP Task",
1833 "produces": [
1834 "application/json"
1835 ],
1836 "tags": [
1837 "workflows"
1838 ],
1839 "summary": "Validate the given template is a valid rendered HTTP Task",
1840 "parameters": [
1841 {
1842 "description": "Rendered Task",
1843 "name": "request",
1844 "in": "body",
1845 "required": true,
1846 "schema": {
1847 "$ref": "#/definitions/v1alpha1.Template"
1848 }
1849 }
1850 ],
1851 "responses": {
1852 "200": {
1853 "description": "OK",
1854 "schema": {
1855 "type": "boolean"
1856 }
1857 },
1858 "400": {
1859 "description": "Bad Request",
1860 "schema": {
1861 "$ref": "#/definitions/utils.APIError"
1862 }
1863 },
1864 "500": {
1865 "description": "Internal Server Error",
1866 "schema": {
1867 "$ref": "#/definitions/utils.APIError"
1868 }
1869 }
1870 }
1871 }
1872 },
1873 "/workflows/{uid}": {
1874 "get": {
1875 "description": "Get detailed information about the specified workflow. If that object is not existed in kubernetes, it will only return ths persisted data in the database.",
1876 "produces": [
1877 "application/json"
1878 ],
1879 "tags": [
1880 "workflows"
1881 ],
1882 "summary": "Get detailed information about the specified workflow.",
1883 "parameters": [
1884 {
1885 "type": "string",
1886 "description": "uid",
1887 "name": "uid",
1888 "in": "path",
1889 "required": true
1890 }
1891 ],
1892 "responses": {
1893 "200": {
1894 "description": "OK",
1895 "schema": {
1896 "$ref": "#/definitions/core.WorkflowDetail"
1897 }
1898 },
1899 "400": {
1900 "description": "Bad Request",
1901 "schema": {
1902 "$ref": "#/definitions/utils.APIError"
1903 }
1904 },
1905 "500": {
1906 "description": "Internal Server Error",
1907 "schema": {
1908 "$ref": "#/definitions/utils.APIError"
1909 }
1910 }
1911 }
1912 },
1913 "put": {
1914 "description": "Update a workflow.",
1915 "produces": [
1916 "application/json"
1917 ],
1918 "tags": [
1919 "workflows"
1920 ],
1921 "summary": "Update a workflow.",
1922 "parameters": [
1923 {
1924 "type": "string",
1925 "description": "uid",
1926 "name": "uid",
1927 "in": "path",
1928 "required": true
1929 },
1930 {
1931 "description": "Request body",
1932 "name": "request",
1933 "in": "body",
1934 "required": true,
1935 "schema": {
1936 "$ref": "#/definitions/v1alpha1.Workflow"
1937 }
1938 }
1939 ],
1940 "responses": {
1941 "200": {
1942 "description": "OK",
1943 "schema": {
1944 "$ref": "#/definitions/core.WorkflowDetail"
1945 }
1946 },
1947 "400": {
1948 "description": "Bad Request",
1949 "schema": {
1950 "$ref": "#/definitions/utils.APIError"
1951 }
1952 },
1953 "500": {
1954 "description": "Internal Server Error",
1955 "schema": {
1956 "$ref": "#/definitions/utils.APIError"
1957 }
1958 }
1959 }
1960 },
1961 "delete": {
1962 "description": "Delete the specified workflow.",
1963 "produces": [
1964 "application/json"
1965 ],
1966 "tags": [
1967 "workflows"
1968 ],
1969 "summary": "Delete the specified workflow.",
1970 "parameters": [
1971 {
1972 "type": "string",
1973 "description": "uid",
1974 "name": "uid",
1975 "in": "path",
1976 "required": true
1977 }
1978 ],
1979 "responses": {
1980 "200": {
1981 "description": "OK",
1982 "schema": {
1983 "$ref": "#/definitions/workflow.StatusResponse"
1984 }
1985 },
1986 "400": {
1987 "description": "Bad Request",
1988 "schema": {
1989 "$ref": "#/definitions/utils.APIError"
1990 }
1991 },
1992 "404": {
1993 "description": "Not Found",
1994 "schema": {
1995 "$ref": "#/definitions/utils.APIError"
1996 }
1997 },
1998 "500": {
1999 "description": "Internal Server Error",
2000 "schema": {
2001 "$ref": "#/definitions/utils.APIError"
2002 }
2003 }
2004 }
2005 }
2006 }
2007 },
2008 "definitions": {
2009 "archive.Archive": {
2010 "$ref": "#/definitions/core.ObjectBase"
2011 },
2012 "archive.Detail": {
2013 "type": "object",
2014 "properties": {
2015 "kube_object": {
2016 "type": "object",
2017 "$ref": "#/definitions/core.KubeObjectDesc"
2018 }
2019 }
2020 },
2021 "common.MapSlice": {
2022 "type": "object",
2023 "additionalProperties": {
2024 "type": "array",
2025 "items": {
2026 "type": "string"
2027 }
2028 }
2029 },
2030 "common.Pod": {
2031 "type": "object",
2032 "properties": {
2033 "ip": {
2034 "type": "string"
2035 },
2036 "name": {
2037 "type": "string"
2038 },
2039 "namespace": {
2040 "type": "string"
2041 },
2042 "state": {
2043 "type": "string"
2044 }
2045 }
2046 },
2047 "config.ChaosDashboardConfig": {
2048 "type": "object",
2049 "properties": {
2050 "cluster_mode": {
2051 "description": "ClusterScoped means control Chaos Object in cluster level(all namespace).",
2052 "type": "boolean",
2053 "default": true
2054 },
2055 "dns_server_create": {
2056 "type": "boolean",
2057 "default": false
2058 },
2059 "enableFilterNamespace": {
2060 "description": "EnableFilterNamespace will filter namespace with annotation. Only the pods/containers in namespace\nannotated with ` + "`" + `chaos-mesh.org/inject=enabled` + "`" + ` will be injected.",
2061 "type": "boolean",
2062 "default": false
2063 },
2064 "gcp_security_mode": {
2065 "description": "GcpSecurityMode will use the gcloud authentication to login to GKE user",
2066 "type": "boolean",
2067 "default": false
2068 },
2069 "listen_host": {
2070 "type": "string",
2071 "default": "0.0.0.0"
2072 },
2073 "listen_port": {
2074 "type": "integer",
2075 "default": 2333
2076 },
2077 "root_path": {
2078 "type": "string",
2079 "default": "http://localhost:2333"
2080 },
2081 "security_mode": {
2082 "description": "SecurityMode will use the token login by the user if set to true",
2083 "type": "boolean",
2084 "default": true
2085 },
2086 "target_namespace": {
2087 "description": "TargetNamespace is the target namespace to injecting chaos.\nIt only works with ClusterScoped is false.",
2088 "type": "string"
2089 },
2090 "version": {
2091 "type": "string"
2092 }
2093 }
2094 },
2095 "core.ConditionalBranch": {
2096 "type": "object",
2097 "properties": {
2098 "expression": {
2099 "type": "string"
2100 },
2101 "name": {
2102 "type": "string"
2103 },
2104 "template": {
2105 "type": "string"
2106 }
2107 }
2108 },
2109 "core.Event": {
2110 "type": "object",
2111 "properties": {
2112 "created_at": {
2113 "type": "string"
2114 },
2115 "id": {
2116 "type": "integer"
2117 },
2118 "kind": {
2119 "type": "string"
2120 },
2121 "message": {
2122 "type": "string"
2123 },
2124 "name": {
2125 "type": "string"
2126 },
2127 "namespace": {
2128 "type": "string"
2129 },
2130 "object_id": {
2131 "type": "string"
2132 },
2133 "reason": {
2134 "type": "string"
2135 },
2136 "type": {
2137 "type": "string"
2138 }
2139 }
2140 },
2141 "core.KubeObjectDesc": {
2142 "type": "object",
2143 "properties": {
2144 "metadata": {
2145 "type": "object",
2146 "$ref": "#/definitions/core.KubeObjectMeta"
2147 },
2148 "spec": {
2149 "type": "object"
2150 }
2151 }
2152 },
2153 "core.KubeObjectMeta": {
2154 "type": "object",
2155 "properties": {
2156 "annotations": {
2157 "type": "object",
2158 "additionalProperties": {
2159 "type": "string"
2160 }
2161 },
2162 "labels": {
2163 "type": "object",
2164 "additionalProperties": {
2165 "type": "string"
2166 }
2167 },
2168 "name": {
2169 "type": "string"
2170 },
2171 "namespace": {
2172 "type": "string"
2173 }
2174 }
2175 },
2176 "core.Node": {
2177 "type": "object",
2178 "properties": {
2179 "conditional_branches": {
2180 "type": "array",
2181 "items": {
2182 "$ref": "#/definitions/core.ConditionalBranch"
2183 }
2184 },
2185 "name": {
2186 "type": "string"
2187 },
2188 "parallel": {
2189 "type": "array",
2190 "items": {
2191 "$ref": "#/definitions/core.NodeNameWithTemplate"
2192 }
2193 },
2194 "serial": {
2195 "type": "array",
2196 "items": {
2197 "$ref": "#/definitions/core.NodeNameWithTemplate"
2198 }
2199 },
2200 "state": {
2201 "type": "string"
2202 },
2203 "template": {
2204 "type": "string"
2205 },
2206 "type": {
2207 "type": "string"
2208 },
2209 "uid": {
2210 "type": "string"
2211 }
2212 }
2213 },
2214 "core.NodeNameWithTemplate": {
2215 "type": "object",
2216 "properties": {
2217 "name": {
2218 "type": "string"
2219 },
2220 "template": {
2221 "type": "string"
2222 }
2223 }
2224 },
2225 "core.ObjectBase": {
2226 "type": "object",
2227 "properties": {
2228 "created_at": {
2229 "type": "string"
2230 },
2231 "kind": {
2232 "type": "string"
2233 },
2234 "name": {
2235 "type": "string"
2236 },
2237 "namespace": {
2238 "type": "string"
2239 },
2240 "uid": {
2241 "type": "string"
2242 }
2243 }
2244 },
2245 "core.Topology": {
2246 "type": "object",
2247 "properties": {
2248 "nodes": {
2249 "type": "array",
2250 "items": {
2251 "$ref": "#/definitions/core.Node"
2252 }
2253 }
2254 }
2255 },
2256 "core.WorkflowDetail": {
2257 "type": "object",
2258 "properties": {
2259 "created_at": {
2260 "type": "string"
2261 },
2262 "end_time": {
2263 "type": "string"
2264 },
2265 "entry": {
2266 "description": "the entry node name",
2267 "type": "string"
2268 },
2269 "id": {
2270 "type": "integer"
2271 },
2272 "kube_object": {
2273 "type": "object",
2274 "$ref": "#/definitions/core.KubeObjectDesc"
2275 },
2276 "name": {
2277 "type": "string"
2278 },
2279 "namespace": {
2280 "type": "string"
2281 },
2282 "status": {
2283 "type": "string"
2284 },
2285 "topology": {
2286 "type": "object",
2287 "$ref": "#/definitions/core.Topology"
2288 },
2289 "uid": {
2290 "type": "string"
2291 }
2292 }
2293 },
2294 "core.WorkflowMeta": {
2295 "type": "object",
2296 "properties": {
2297 "created_at": {
2298 "type": "string"
2299 },
2300 "end_time": {
2301 "type": "string"
2302 },
2303 "entry": {
2304 "description": "the entry node name",
2305 "type": "string"
2306 },
2307 "id": {
2308 "type": "integer"
2309 },
2310 "name": {
2311 "type": "string"
2312 },
2313 "namespace": {
2314 "type": "string"
2315 },
2316 "status": {
2317 "type": "string"
2318 },
2319 "uid": {
2320 "type": "string"
2321 }
2322 }
2323 },
2324 "curl.Header": {
2325 "type": "object",
2326 "additionalProperties": {
2327 "type": "array",
2328 "items": {
2329 "type": "string"
2330 }
2331 }
2332 },
2333 "curl.RequestForm": {
2334 "type": "object",
2335 "properties": {
2336 "body": {
2337 "type": "string"
2338 },
2339 "followLocation": {
2340 "type": "boolean"
2341 },
2342 "header": {
2343 "type": "object",
2344 "$ref": "#/definitions/curl.Header"
2345 },
2346 "jsonContent": {
2347 "type": "boolean"
2348 },
2349 "method": {
2350 "type": "string"
2351 },
2352 "name": {
2353 "type": "string"
2354 },
2355 "url": {
2356 "type": "string"
2357 }
2358 }
2359 },
2360 "experiment.Detail": {
2361 "type": "object",
2362 "properties": {
2363 "created_at": {
2364 "type": "string"
2365 },
2366 "failed_message": {
2367 "type": "string"
2368 },
2369 "kind": {
2370 "type": "string"
2371 },
2372 "kube_object": {
2373 "type": "object",
2374 "$ref": "#/definitions/core.KubeObjectDesc"
2375 },
2376 "name": {
2377 "type": "string"
2378 },
2379 "namespace": {
2380 "type": "string"
2381 },
2382 "status": {
2383 "type": "string"
2384 },
2385 "uid": {
2386 "type": "string"
2387 }
2388 }
2389 },
2390 "experiment.Experiment": {
2391 "type": "object",
2392 "properties": {
2393 "created_at": {
2394 "type": "string"
2395 },
2396 "failed_message": {
2397 "type": "string"
2398 },
2399 "kind": {
2400 "type": "string"
2401 },
2402 "name": {
2403 "type": "string"
2404 },
2405 "namespace": {
2406 "type": "string"
2407 },
2408 "status": {
2409 "type": "string"
2410 },
2411 "uid": {
2412 "type": "string"
2413 }
2414 }
2415 },
2416 "schedule.Detail": {
2417 "type": "object",
2418 "properties": {
2419 "created_at": {
2420 "type": "string"
2421 },
2422 "experiment_uids": {
2423 "type": "array",
2424 "items": {
2425 "type": "string"
2426 }
2427 },
2428 "kind": {
2429 "type": "string"
2430 },
2431 "kube_object": {
2432 "type": "object",
2433 "$ref": "#/definitions/core.KubeObjectDesc"
2434 },
2435 "name": {
2436 "type": "string"
2437 },
2438 "namespace": {
2439 "type": "string"
2440 },
2441 "status": {
2442 "type": "string"
2443 },
2444 "uid": {
2445 "type": "string"
2446 }
2447 }
2448 },
2449 "schedule.Schedule": {
2450 "type": "object",
2451 "properties": {
2452 "created_at": {
2453 "type": "string"
2454 },
2455 "kind": {
2456 "type": "string"
2457 },
2458 "name": {
2459 "type": "string"
2460 },
2461 "namespace": {
2462 "type": "string"
2463 },
2464 "status": {
2465 "type": "string"
2466 },
2467 "uid": {
2468 "type": "string"
2469 }
2470 }
2471 },
2472 "status.AllChaosStatus": {
2473 "type": "object",
2474 "properties": {
2475 "finished": {
2476 "type": "integer"
2477 },
2478 "injecting": {
2479 "type": "integer"
2480 },
2481 "paused": {
2482 "type": "integer"
2483 },
2484 "running": {
2485 "type": "integer"
2486 }
2487 }
2488 },
2489 "utils.APIError": {
2490 "type": "object",
2491 "properties": {
2492 "code": {
2493 "type": "integer"
2494 },
2495 "full_text": {
2496 "type": "string"
2497 },
2498 "message": {
2499 "type": "string"
2500 },
2501 "type": {
2502 "type": "string"
2503 }
2504 }
2505 },
2506 "utils.Response": {
2507 "type": "object",
2508 "properties": {
2509 "status": {
2510 "type": "string"
2511 }
2512 }
2513 },
2514 "v1alpha1.AWSChaosSpec": {
2515 "type": "object",
2516 "properties": {
2517 "action": {
2518 "description": "Action defines the specific aws chaos action.\nSupported action: ec2-stop / ec2-restart / detach-volume\nDefault action: ec2-stop\n+kubebuilder:validation:Enum=ec2-stop;ec2-restart;detach-volume",
2519 "type": "string"
2520 },
2521 "awsRegion": {
2522 "description": "AWSRegion defines the region of aws.",
2523 "type": "string"
2524 },
2525 "deviceName": {
2526 "description": "DeviceName indicates the name of the device.\nNeeded in detach-volume.\n+optional",
2527 "type": "string"
2528 },
2529 "duration": {
2530 "description": "Duration represents the duration of the chaos action.\n+optional",
2531 "type": "string"
2532 },
2533 "ec2Instance": {
2534 "description": "Ec2Instance indicates the ID of the ec2 instance.",
2535 "type": "string"
2536 },
2537 "endpoint": {
2538 "description": "Endpoint indicates the endpoint of the aws server. Just used it in test now.\n+optional",
2539 "type": "string"
2540 },
2541 "secretName": {
2542 "description": "SecretName defines the name of kubernetes secret.\n+optional",
2543 "type": "string"
2544 },
2545 "volumeID": {
2546 "description": "EbsVolume indicates the ID of the EBS volume.\nNeeded in detach-volume.\n+optional",
2547 "type": "string"
2548 }
2549 }
2550 },
2551 "v1alpha1.AttrOverrideSpec": {
2552 "type": "object",
2553 "properties": {
2554 "atime": {
2555 "description": "+optional",
2556 "type": "object",
2557 "$ref": "#/definitions/v1alpha1.Timespec"
2558 },
2559 "blocks": {
2560 "description": "+optional",
2561 "type": "integer"
2562 },
2563 "ctime": {
2564 "description": "+optional",
2565 "type": "object",
2566 "$ref": "#/definitions/v1alpha1.Timespec"
2567 },
2568 "gid": {
2569 "description": "+optional",
2570 "type": "integer"
2571 },
2572 "ino": {
2573 "description": "+optional",
2574 "type": "integer"
2575 },
2576 "kind": {
2577 "description": "+optional",
2578 "type": "string"
2579 },
2580 "mtime": {
2581 "description": "+optional",
2582 "type": "object",
2583 "$ref": "#/definitions/v1alpha1.Timespec"
2584 },
2585 "nlink": {
2586 "description": "+optional",
2587 "type": "integer"
2588 },
2589 "perm": {
2590 "description": "+optional",
2591 "type": "integer"
2592 },
2593 "rdev": {
2594 "description": "+optional",
2595 "type": "integer"
2596 },
2597 "size": {
2598 "description": "+optional",
2599 "type": "integer"
2600 },
2601 "uid": {
2602 "description": "+optional",
2603 "type": "integer"
2604 }
2605 }
2606 },
2607 "v1alpha1.BandwidthSpec": {
2608 "type": "object",
2609 "properties": {
2610 "buffer": {
2611 "description": "Buffer is the maximum amount of bytes that tokens can be available for instantaneously.\n+kubebuilder:validation:Minimum=1",
2612 "type": "integer"
2613 },
2614 "limit": {
2615 "description": "Limit is the number of bytes that can be queued waiting for tokens to become available.\n+kubebuilder:validation:Minimum=1",
2616 "type": "integer"
2617 },
2618 "minburst": {
2619 "description": "Minburst specifies the size of the peakrate bucket. For perfect\naccuracy, should be set to the MTU of the interface. If a\npeakrate is needed, but some burstiness is acceptable, this\nsize can be raised. A 3000 byte minburst allows around 3mbit/s\nof peakrate, given 1000 byte packets.\n+optional\n+kubebuilder:validation:Minimum=0",
2620 "type": "integer"
2621 },
2622 "peakrate": {
2623 "description": "Peakrate is the maximum depletion rate of the bucket.\nThe peakrate does not need to be set, it is only necessary\nif perfect millisecond timescale shaping is required.\n+optional\n+kubebuilder:validation:Minimum=0",
2624 "type": "integer"
2625 },
2626 "rate": {
2627 "description": "Rate is the speed knob. Allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second.",
2628 "type": "string"
2629 }
2630 }
2631 },
2632 "v1alpha1.CPUStressor": {
2633 "type": "object",
2634 "properties": {
2635 "load": {
2636 "description": "Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100\nis full loading.\n+optional",
2637 "type": "integer"
2638 },
2639 "options": {
2640 "description": "extend stress-ng options\n+optional",
2641 "type": "array",
2642 "items": {
2643 "type": "string"
2644 }
2645 },
2646 "workers": {
2647 "description": "Workers specifies N workers to apply the stressor.\nMaximum 8192 workers can run by stress-ng\n+kubebuilder:validation:Maximum=8192",
2648 "type": "integer"
2649 }
2650 }
2651 },
2652 "v1alpha1.ChaosOnlyScheduleSpec": {
2653 "type": "object",
2654 "properties": {
2655 "awsChaos": {
2656 "description": "+optional",
2657 "type": "object",
2658 "$ref": "#/definitions/v1alpha1.AWSChaosSpec"
2659 },
2660 "concurrencyPolicy": {
2661 "description": "+optional\n+kubebuilder:validation:Enum=Forbid;Allow",
2662 "type": "string"
2663 },
2664 "dnsChaos": {
2665 "description": "+optional",
2666 "type": "object",
2667 "$ref": "#/definitions/v1alpha1.DNSChaosSpec"
2668 },
2669 "gcpChaos": {
2670 "description": "+optional",
2671 "type": "object",
2672 "$ref": "#/definitions/v1alpha1.GCPChaosSpec"
2673 },
2674 "historyLimit": {
2675 "description": "+optional\n+kubebuilder:validation:Minimum=1",
2676 "type": "integer"
2677 },
2678 "httpChaos": {
2679 "description": "+optional",
2680 "type": "object",
2681 "$ref": "#/definitions/v1alpha1.HTTPChaosSpec"
2682 },
2683 "ioChaos": {
2684 "description": "+optional",
2685 "type": "object",
2686 "$ref": "#/definitions/v1alpha1.IOChaosSpec"
2687 },
2688 "jvmChaos": {
2689 "description": "+optional",
2690 "type": "object",
2691 "$ref": "#/definitions/v1alpha1.JVMChaosSpec"
2692 },
2693 "kernelChaos": {
2694 "description": "+optional",
2695 "type": "object",
2696 "$ref": "#/definitions/v1alpha1.KernelChaosSpec"
2697 },
2698 "networkChaos": {
2699 "description": "+optional",
2700 "type": "object",
2701 "$ref": "#/definitions/v1alpha1.NetworkChaosSpec"
2702 },
2703 "physicalmachineChaos": {
2704 "description": "+optional",
2705 "type": "object",
2706 "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec"
2707 },
2708 "podChaos": {
2709 "description": "+optional",
2710 "type": "object",
2711 "$ref": "#/definitions/v1alpha1.PodChaosSpec"
2712 },
2713 "schedule": {
2714 "type": "string"
2715 },
2716 "startingDeadlineSeconds": {
2717 "description": "+optional\n+nullable\n+kubebuilder:validation:Minimum=0",
2718 "type": "integer"
2719 },
2720 "stressChaos": {
2721 "description": "+optional",
2722 "type": "object",
2723 "$ref": "#/definitions/v1alpha1.StressChaosSpec"
2724 },
2725 "timeChaos": {
2726 "description": "+optional",
2727 "type": "object",
2728 "$ref": "#/definitions/v1alpha1.TimeChaosSpec"
2729 },
2730 "type": {
2731 "description": "TODO: use a custom type, as ` + "`" + `TemplateType` + "`" + ` contains other possible values",
2732 "type": "string"
2733 }
2734 }
2735 },
2736 "v1alpha1.ClockSpec": {
2737 "type": "object",
2738 "properties": {
2739 "clock-ids-slice": {
2740 "description": "the identifier of the particular clock on which to act.\nMore clock description in linux kernel can be found in man page of clock_getres, clock_gettime, clock_settime.\nMuti clock ids should be split with \",\"",
2741 "type": "string"
2742 },
2743 "pid": {
2744 "description": "the pid of target program.",
2745 "type": "integer"
2746 },
2747 "time-offset": {
2748 "description": "specifies the length of time offset.",
2749 "type": "string"
2750 }
2751 }
2752 },
2753 "v1alpha1.ConditionalBranch": {
2754 "type": "object",
2755 "properties": {
2756 "expression": {
2757 "description": "Expression is the expression for this conditional branch, expected type of result is boolean. If expression is empty, this branch will always be selected/the template will be spawned.\n+optional",
2758 "type": "string"
2759 },
2760 "target": {
2761 "description": "Target is the name of other template, if expression is evaluated as true, this template will be spawned.",
2762 "type": "string"
2763 }
2764 }
2765 },
2766 "v1alpha1.CorruptSpec": {
2767 "type": "object",
2768 "properties": {
2769 "correlation": {
2770 "description": "+optional",
2771 "type": "string",
2772 "default": "0"
2773 },
2774 "corrupt": {
2775 "type": "string"
2776 }
2777 }
2778 },
2779 "v1alpha1.DNSChaosSpec": {
2780 "type": "object",
2781 "properties": {
2782 "action": {
2783 "description": "Action defines the specific DNS chaos action.\nSupported action: error, random\nDefault action: error\n+kubebuilder:validation:Enum=error;random",
2784 "type": "string"
2785 },
2786 "containerNames": {
2787 "description": "ContainerNames indicates list of the name of affected container.\nIf not set, all containers will be injected\n+optional",
2788 "type": "array",
2789 "items": {
2790 "type": "string"
2791 }
2792 },
2793 "duration": {
2794 "description": "Duration represents the duration of the chaos action",
2795 "type": "string"
2796 },
2797 "mode": {
2798 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
2799 "type": "string"
2800 },
2801 "patterns": {
2802 "description": "Choose which domain names to take effect, support the placeholder ? and wildcard *, or the Specified domain name.\nNote:\n 1. The wildcard * must be at the end of the string. For example, chaos-*.org is invalid.\n 2. if the patterns is empty, will take effect on all the domain names.\nFor example:\n\t\tThe value is [\"google.com\", \"github.*\", \"chaos-mes?.org\"],\n\t\twill take effect on \"google.com\", \"github.com\" and \"chaos-mesh.org\"\n+optional",
2803 "type": "array",
2804 "items": {
2805 "type": "string"
2806 }
2807 },
2808 "selector": {
2809 "description": "Selector is used to select pods that are used to inject chaos action.",
2810 "type": "object",
2811 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
2812 },
2813 "value": {
2814 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
2815 "type": "string"
2816 }
2817 }
2818 },
2819 "v1alpha1.DelaySpec": {
2820 "type": "object",
2821 "properties": {
2822 "correlation": {
2823 "description": "+optional",
2824 "type": "string",
2825 "default": "0"
2826 },
2827 "jitter": {
2828 "description": "+optional",
2829 "type": "string",
2830 "default": "0ms"
2831 },
2832 "latency": {
2833 "type": "string"
2834 },
2835 "reorder": {
2836 "description": "+optional",
2837 "type": "object",
2838 "$ref": "#/definitions/v1alpha1.ReorderSpec"
2839 }
2840 }
2841 },
2842 "v1alpha1.DiskFillSpec": {
2843 "type": "object",
2844 "properties": {
2845 "fill-by-fallocate": {
2846 "description": "fill disk by fallocate",
2847 "type": "boolean"
2848 },
2849 "path": {
2850 "description": "specifies the location to fill data in. if path not provided,\npayload will read/write from/into a temp file, temp file will be deleted after writing",
2851 "type": "string"
2852 },
2853 "size": {
2854 "description": "specifies how many units of data will write into the file path. support unit: c=1, w=2, b=512, kB=1000,\nK=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 BYTES. example : 1M | 512kB",
2855 "type": "string"
2856 }
2857 }
2858 },
2859 "v1alpha1.DiskPayloadSpec": {
2860 "type": "object",
2861 "properties": {
2862 "path": {
2863 "description": "specifies the location to fill data in. if path not provided,\npayload will read/write from/into a temp file, temp file will be deleted after writing",
2864 "type": "string"
2865 },
2866 "payload-process-num": {
2867 "description": "specifies the number of process work on writing, default 1, only 1-255 is valid value",
2868 "type": "integer"
2869 },
2870 "size": {
2871 "description": "specifies how many units of data will write into the file path. support unit: c=1, w=2, b=512, kB=1000,\nK=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 BYTES. example : 1M | 512kB",
2872 "type": "string"
2873 }
2874 }
2875 },
2876 "v1alpha1.DuplicateSpec": {
2877 "type": "object",
2878 "properties": {
2879 "correlation": {
2880 "description": "+optional",
2881 "type": "string",
2882 "default": "0"
2883 },
2884 "duplicate": {
2885 "type": "string"
2886 }
2887 }
2888 },
2889 "v1alpha1.FailKernRequest": {
2890 "type": "object",
2891 "properties": {
2892 "callchain": {
2893 "description": "Callchain indicate a special call chain, such as:\n ext4_mount\n -\u003e mount_subtree\n -\u003e ...\n -\u003e should_failslab\nWith an optional set of predicates and an optional set of\nparameters, which used with predicates. You can read call chan\nand predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples\nto learn more.\nIf no special call chain, just keep Callchain empty, which means it will fail at any call chain\nwith slab alloc (eg: kmalloc).",
2894 "type": "array",
2895 "items": {
2896 "$ref": "#/definitions/v1alpha1.Frame"
2897 }
2898 },
2899 "failtype": {
2900 "description": "FailType indicates what to fail, can be set to '0' / '1' / '2'\nIf ` + "`" + `0` + "`" + `, indicates slab to fail (should_failslab)\nIf ` + "`" + `1` + "`" + `, indicates alloc_page to fail (should_fail_alloc_page)\nIf ` + "`" + `2` + "`" + `, indicates bio to fail (should_fail_bio)\nYou can read:\n 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html\n 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt\nto learn more\n+kubebuilder:validation:Maximum=2\n+kubebuilder:validation:Minimum=0",
2901 "type": "integer"
2902 },
2903 "headers": {
2904 "description": "Headers indicates the appropriate kernel headers you need.\nEg: \"linux/mmzone.h\", \"linux/blkdev.h\" and so on",
2905 "type": "array",
2906 "items": {
2907 "type": "string"
2908 }
2909 },
2910 "probability": {
2911 "description": "Probability indicates the fails with probability.\nIf you want 1%, please set this field with 1.\n+kubebuilder:validation:Minimum=0\n+kubebuilder:validation:Maximum=100",
2912 "type": "integer"
2913 },
2914 "times": {
2915 "description": "Times indicates the max times of fails.\n+kubebuilder:validation:Minimum=0",
2916 "type": "integer"
2917 }
2918 }
2919 },
2920 "v1alpha1.Frame": {
2921 "type": "object",
2922 "properties": {
2923 "funcname": {
2924 "description": "Funcname can be find from kernel source or ` + "`" + `/proc/kallsyms` + "`" + `, such as ` + "`" + `ext4_mount` + "`" + `",
2925 "type": "string"
2926 },
2927 "parameters": {
2928 "description": "Parameters is used with predicate, for example, if you want to inject slab error\nin ` + "`" + `d_alloc_parallel(struct dentry *parent, const struct qstr *name)` + "`" + ` with a special\nname ` + "`" + `bananas` + "`" + `, you need to set it to ` + "`" + `struct dentry *parent, const struct qstr *name` + "`" + `\notherwise omit it.",
2929 "type": "string"
2930 },
2931 "predicate": {
2932 "description": "Predicate will access the arguments of this Frame, example with Parameters's, you can\nset it to ` + "`" + `STRNCMP(name-\u003ename, \"bananas\", 8)` + "`" + ` to make inject only with it, or omit it\nto inject for all d_alloc_parallel call chain.",
2933 "type": "string"
2934 }
2935 }
2936 },
2937 "v1alpha1.GCPChaosSpec": {
2938 "type": "object",
2939 "properties": {
2940 "action": {
2941 "description": "Action defines the specific gcp chaos action.\nSupported action: node-stop / node-reset / disk-loss\nDefault action: node-stop\n+kubebuilder:validation:Enum=node-stop;node-reset;disk-loss",
2942 "type": "string"
2943 },
2944 "deviceNames": {
2945 "description": "The device name of disks to detach.\nNeeded in disk-loss.\n+optional",
2946 "type": "array",
2947 "items": {
2948 "type": "string"
2949 }
2950 },
2951 "duration": {
2952 "description": "Duration represents the duration of the chaos action.\n+optional",
2953 "type": "string"
2954 },
2955 "instance": {
2956 "description": "Instance defines the name of the instance",
2957 "type": "string"
2958 },
2959 "project": {
2960 "description": "Project defines the name of gcp project.",
2961 "type": "string"
2962 },
2963 "secretName": {
2964 "description": "SecretName defines the name of kubernetes secret. It is used for GCP credentials.\n+optional",
2965 "type": "string"
2966 },
2967 "zone": {
2968 "description": "Zone defines the zone of gcp project.",
2969 "type": "string"
2970 }
2971 }
2972 },
2973 "v1alpha1.HTTPChaosSpec": {
2974 "type": "object",
2975 "properties": {
2976 "abort": {
2977 "description": "Abort is a rule to abort a http session.\n+optional",
2978 "type": "boolean"
2979 },
2980 "code": {
2981 "description": "Code is a rule to select target by http status code in response.\n+optional",
2982 "type": "integer"
2983 },
2984 "delay": {
2985 "description": "Delay represents the delay of the target request/response.\nA duration string is a possibly unsigned sequence of\ndecimal numbers, each with optional fraction and a unit suffix,\nsuch as \"300ms\", \"2h45m\".\nValid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n+optional",
2986 "type": "string"
2987 },
2988 "duration": {
2989 "description": "Duration represents the duration of the chaos action.\n+optional",
2990 "type": "string"
2991 },
2992 "method": {
2993 "description": "Method is a rule to select target by http method in request.\n+optional",
2994 "type": "string"
2995 },
2996 "mode": {
2997 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
2998 "type": "string"
2999 },
3000 "patch": {
3001 "description": "Patch is a rule to patch some contents in target.\n+optional",
3002 "type": "object",
3003 "$ref": "#/definitions/v1alpha1.PodHttpChaosPatchActions"
3004 },
3005 "path": {
3006 "description": "Path is a rule to select target by uri path in http request.\n+optional",
3007 "type": "string"
3008 },
3009 "port": {
3010 "description": "Port represents the target port to be proxy of.",
3011 "type": "integer"
3012 },
3013 "replace": {
3014 "description": "Replace is a rule to replace some contents in target.\n+optional",
3015 "type": "object",
3016 "$ref": "#/definitions/v1alpha1.PodHttpChaosReplaceActions"
3017 },
3018 "request_headers": {
3019 "description": "RequestHeaders is a rule to select target by http headers in request.\nThe key-value pairs represent header name and header value pairs.\n+optional",
3020 "type": "object",
3021 "additionalProperties": {
3022 "type": "string"
3023 }
3024 },
3025 "response_headers": {
3026 "description": "ResponseHeaders is a rule to select target by http headers in response.\nThe key-value pairs represent header name and header value pairs.\n+optional",
3027 "type": "object",
3028 "additionalProperties": {
3029 "type": "string"
3030 }
3031 },
3032 "selector": {
3033 "description": "Selector is used to select pods that are used to inject chaos action.",
3034 "type": "object",
3035 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
3036 },
3037 "target": {
3038 "description": "+kubebuilder:validation:Enum=Request;Response\nTarget is the object to be selected and injected.",
3039 "type": "string"
3040 },
3041 "value": {
3042 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
3043 "type": "string"
3044 }
3045 }
3046 },
3047 "v1alpha1.IOChaosSpec": {
3048 "type": "object",
3049 "properties": {
3050 "action": {
3051 "description": "Action defines the specific pod chaos action.\nSupported action: latency / fault / attrOverride / mistake\n+kubebuilder:validation:Enum=latency;fault;attrOverride;mistake",
3052 "type": "string"
3053 },
3054 "attr": {
3055 "description": "Attr defines the overrided attribution\n+optional",
3056 "type": "object",
3057 "$ref": "#/definitions/v1alpha1.AttrOverrideSpec"
3058 },
3059 "containerNames": {
3060 "description": "ContainerNames indicates list of the name of affected container.\nIf not set, all containers will be injected\n+optional",
3061 "type": "array",
3062 "items": {
3063 "type": "string"
3064 }
3065 },
3066 "delay": {
3067 "description": "Delay defines the value of I/O chaos action delay.\nA delay string is a possibly signed sequence of\ndecimal numbers, each with optional fraction and a unit suffix,\nsuch as \"300ms\".\nValid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n+optional",
3068 "type": "string"
3069 },
3070 "duration": {
3071 "description": "Duration represents the duration of the chaos action.\nIt is required when the action is ` + "`" + `PodFailureAction` + "`" + `.\nA duration string is a possibly signed sequence of\ndecimal numbers, each with optional fraction and a unit suffix,\nsuch as \"300ms\", \"-1.5h\" or \"2h45m\".\nValid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n+optional",
3072 "type": "string"
3073 },
3074 "errno": {
3075 "description": "Errno defines the error code that returned by I/O action.\nrefer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html\n+optional",
3076 "type": "integer"
3077 },
3078 "methods": {
3079 "description": "Methods defines the I/O methods for injecting I/O chaos action.\ndefault: all I/O methods.\n+optional",
3080 "type": "array",
3081 "items": {
3082 "type": "string"
3083 }
3084 },
3085 "mistake": {
3086 "description": "Mistake defines what types of incorrectness are injected to IO operations\n+optional",
3087 "type": "object",
3088 "$ref": "#/definitions/v1alpha1.MistakeSpec"
3089 },
3090 "mode": {
3091 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
3092 "type": "string"
3093 },
3094 "path": {
3095 "description": "Path defines the path of files for injecting I/O chaos action.\n+optional",
3096 "type": "string"
3097 },
3098 "percent": {
3099 "description": "Percent defines the percentage of injection errors and provides a number from 0-100.\ndefault: 100.\n+optional",
3100 "type": "integer"
3101 },
3102 "selector": {
3103 "description": "Selector is used to select pods that are used to inject chaos action.",
3104 "type": "object",
3105 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
3106 },
3107 "value": {
3108 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
3109 "type": "string"
3110 },
3111 "volumePath": {
3112 "description": "VolumePath represents the mount path of injected volume",
3113 "type": "string"
3114 }
3115 }
3116 },
3117 "v1alpha1.JVMChaosSpec": {
3118 "type": "object",
3119 "properties": {
3120 "action": {
3121 "description": "Action defines the specific jvm chaos action.\nSupported action: latency;return;exception;stress;gc;ruleData\n+kubebuilder:validation:Enum=latency;return;exception;stress;gc;ruleData",
3122 "type": "string"
3123 },
3124 "class": {
3125 "description": "+optional\nJava class",
3126 "type": "string"
3127 },
3128 "containerNames": {
3129 "description": "ContainerNames indicates list of the name of affected container.\nIf not set, all containers will be injected\n+optional",
3130 "type": "array",
3131 "items": {
3132 "type": "string"
3133 }
3134 },
3135 "cpuCount": {
3136 "description": "+optional\nthe CPU core number need to use, only set it when action is stress",
3137 "type": "integer"
3138 },
3139 "duration": {
3140 "description": "Duration represents the duration of the chaos action\n+optional",
3141 "type": "string"
3142 },
3143 "exception": {
3144 "description": "+optional\nthe exception which needs to throw for action ` + "`" + `exception` + "`" + `",
3145 "type": "string"
3146 },
3147 "latency": {
3148 "description": "+optional\nthe latency duration for action 'latency', unit ms",
3149 "type": "integer"
3150 },
3151 "memType": {
3152 "description": "+optional\nthe memory type need to locate, only set it when action is stress, the value can be 'stack' or 'heap'",
3153 "type": "string"
3154 },
3155 "method": {
3156 "description": "+optional\nthe method in Java class",
3157 "type": "string"
3158 },
3159 "mode": {
3160 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
3161 "type": "string"
3162 },
3163 "name": {
3164 "description": "+optional\nbyteman rule name, should be unique, and will use JVMChaos' name if not set",
3165 "type": "string"
3166 },
3167 "port": {
3168 "description": "+optional\nthe port of agent server, default 9277",
3169 "type": "integer"
3170 },
3171 "ruleData": {
3172 "description": "+optional",
3173 "type": "string"
3174 },
3175 "selector": {
3176 "description": "Selector is used to select pods that are used to inject chaos action.",
3177 "type": "object",
3178 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
3179 },
3180 "value": {
3181 "description": "+optional\nthe return value for action 'return'",
3182 "type": "string"
3183 }
3184 }
3185 },
3186 "v1alpha1.JVMExceptionSpec": {
3187 "type": "object",
3188 "properties": {
3189 "class": {
3190 "description": "Java class",
3191 "type": "string"
3192 },
3193 "exception": {
3194 "description": "the exception which needs to throw for action ` + "`" + `exception` + "`" + `",
3195 "type": "string"
3196 },
3197 "method": {
3198 "description": "the method in Java class",
3199 "type": "string"
3200 },
3201 "pid": {
3202 "description": "the pid of Java process which need to attach",
3203 "type": "integer"
3204 },
3205 "port": {
3206 "description": "the port of agent server",
3207 "type": "integer"
3208 }
3209 }
3210 },
3211 "v1alpha1.JVMGCSpec": {
3212 "type": "object",
3213 "properties": {
3214 "pid": {
3215 "description": "the pid of Java process which need to attach",
3216 "type": "integer"
3217 },
3218 "port": {
3219 "description": "the port of agent server",
3220 "type": "integer"
3221 }
3222 }
3223 },
3224 "v1alpha1.JVMLatencySpec": {
3225 "type": "object",
3226 "properties": {
3227 "class": {
3228 "description": "Java class",
3229 "type": "string"
3230 },
3231 "latency": {
3232 "description": "the latency duration for action 'latency', unit ms",
3233 "type": "integer"
3234 },
3235 "method": {
3236 "description": "the method in Java class",
3237 "type": "string"
3238 },
3239 "pid": {
3240 "description": "the pid of Java process which need to attach",
3241 "type": "integer"
3242 },
3243 "port": {
3244 "description": "the port of agent server",
3245 "type": "integer"
3246 }
3247 }
3248 },
3249 "v1alpha1.JVMReturnSpec": {
3250 "type": "object",
3251 "properties": {
3252 "class": {
3253 "description": "Java class",
3254 "type": "string"
3255 },
3256 "method": {
3257 "description": "the method in Java class",
3258 "type": "string"
3259 },
3260 "pid": {
3261 "description": "the pid of Java process which need to attach",
3262 "type": "integer"
3263 },
3264 "port": {
3265 "description": "the port of agent server",
3266 "type": "integer"
3267 },
3268 "value": {
3269 "description": "the return value for action 'return'",
3270 "type": "string"
3271 }
3272 }
3273 },
3274 "v1alpha1.JVMRuleDataSpec": {
3275 "type": "object",
3276 "properties": {
3277 "pid": {
3278 "description": "the pid of Java process which need to attach",
3279 "type": "integer"
3280 },
3281 "port": {
3282 "description": "the port of agent server",
3283 "type": "integer"
3284 },
3285 "rule-data": {
3286 "description": "RuleData used to save the rule file's data, will use it when recover",
3287 "type": "string"
3288 }
3289 }
3290 },
3291 "v1alpha1.JVMStressSpec": {
3292 "type": "object",
3293 "properties": {
3294 "cpu-count": {
3295 "description": "the CPU core number need to use, only set it when action is stress",
3296 "type": "integer"
3297 },
3298 "mem-type": {
3299 "description": "the memory type need to locate, only set it when action is stress, the value can be 'stack' or 'heap'",
3300 "type": "string"
3301 },
3302 "pid": {
3303 "description": "the pid of Java process which need to attach",
3304 "type": "integer"
3305 },
3306 "port": {
3307 "description": "the port of agent server",
3308 "type": "integer"
3309 }
3310 }
3311 },
3312 "v1alpha1.KernelChaosSpec": {
3313 "type": "object",
3314 "properties": {
3315 "duration": {
3316 "description": "Duration represents the duration of the chaos action",
3317 "type": "string"
3318 },
3319 "failKernRequest": {
3320 "description": "FailKernRequest defines the request of kernel injection",
3321 "type": "object",
3322 "$ref": "#/definitions/v1alpha1.FailKernRequest"
3323 },
3324 "mode": {
3325 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
3326 "type": "string"
3327 },
3328 "selector": {
3329 "description": "Selector is used to select pods that are used to inject chaos action.",
3330 "type": "object",
3331 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
3332 },
3333 "value": {
3334 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
3335 "type": "string"
3336 }
3337 }
3338 },
3339 "v1alpha1.LabelSelectorRequirements": {
3340 "type": "array",
3341 "items": {
3342 "$ref": "#/definitions/metav1.LabelSelectorRequirement"
3343 }
3344 },
3345 "v1alpha1.LossSpec": {
3346 "type": "object",
3347 "properties": {
3348 "correlation": {
3349 "description": "+optional",
3350 "type": "string",
3351 "default": "0"
3352 },
3353 "loss": {
3354 "type": "string"
3355 }
3356 }
3357 },
3358 "v1alpha1.MemoryStressor": {
3359 "type": "object",
3360 "properties": {
3361 "options": {
3362 "description": "extend stress-ng options\n+optional",
3363 "type": "array",
3364 "items": {
3365 "type": "string"
3366 }
3367 },
3368 "size": {
3369 "description": "Size specifies N bytes consumed per vm worker, default is the total available memory.\nOne can specify the size as % of total available memory or in units of B, KB/KiB,\nMB/MiB, GB/GiB, TB/TiB.\n+optional",
3370 "type": "string"
3371 },
3372 "workers": {
3373 "description": "Workers specifies N workers to apply the stressor.\nMaximum 8192 workers can run by stress-ng\n+kubebuilder:validation:Maximum=8192",
3374 "type": "integer"
3375 }
3376 }
3377 },
3378 "v1alpha1.MistakeSpec": {
3379 "type": "object",
3380 "properties": {
3381 "filling": {
3382 "description": "Filling determines what is filled in the miskate data.\n+optional\n+kubebuilder:validation:Enum=zero;random",
3383 "type": "string"
3384 },
3385 "maxLength": {
3386 "description": "Max length of each wrong data segment in bytes\n+optional\n+kubebuilder:validation:Minimum=1",
3387 "type": "integer"
3388 },
3389 "maxOccurrences": {
3390 "description": "There will be [1, MaxOccurrences] segments of wrong data.\n+optional\n+kubebuilder:validation:Minimum=1",
3391 "type": "integer"
3392 }
3393 }
3394 },
3395 "v1alpha1.NetworkBandwidthSpec": {
3396 "type": "object",
3397 "properties": {
3398 "buffer": {
3399 "description": "+kubebuilder:validation:Minimum=1",
3400 "type": "integer"
3401 },
3402 "device": {
3403 "type": "string"
3404 },
3405 "hostname": {
3406 "type": "string"
3407 },
3408 "ip-address": {
3409 "type": "string"
3410 },
3411 "limit": {
3412 "description": "+kubebuilder:validation:Minimum=1",
3413 "type": "integer"
3414 },
3415 "minburst": {
3416 "type": "integer"
3417 },
3418 "peakrate": {
3419 "type": "integer"
3420 },
3421 "rate": {
3422 "type": "string"
3423 }
3424 }
3425 },
3426 "v1alpha1.NetworkChaosSpec": {
3427 "type": "object",
3428 "properties": {
3429 "action": {
3430 "description": "Action defines the specific network chaos action.\nSupported action: partition, netem, delay, loss, duplicate, corrupt\nDefault action: delay\n+kubebuilder:validation:Enum=netem;delay;loss;duplicate;corrupt;partition;bandwidth",
3431 "type": "string"
3432 },
3433 "bandwidth": {
3434 "description": "Bandwidth represents the detail about bandwidth control action\n+optional",
3435 "type": "object",
3436 "$ref": "#/definitions/v1alpha1.BandwidthSpec"
3437 },
3438 "corrupt": {
3439 "description": "Corrupt represents the detail about corrupt action\n+optional",
3440 "type": "object",
3441 "$ref": "#/definitions/v1alpha1.CorruptSpec"
3442 },
3443 "delay": {
3444 "description": "Delay represents the detail about delay action\n+optional",
3445 "type": "object",
3446 "$ref": "#/definitions/v1alpha1.DelaySpec"
3447 },
3448 "device": {
3449 "description": "Device represents the network device to be affected.\n+optional",
3450 "type": "string"
3451 },
3452 "direction": {
3453 "description": "Direction represents the direction, this applies on netem and network partition action\n+optional\n+kubebuilder:validation:Enum=to;from;both;\"\"",
3454 "type": "string"
3455 },
3456 "duplicate": {
3457 "description": "DuplicateSpec represents the detail about loss action\n+optional",
3458 "type": "object",
3459 "$ref": "#/definitions/v1alpha1.DuplicateSpec"
3460 },
3461 "duration": {
3462 "description": "Duration represents the duration of the chaos action",
3463 "type": "string"
3464 },
3465 "externalTargets": {
3466 "description": "ExternalTargets represents network targets outside k8s\n+optional",
3467 "type": "array",
3468 "items": {
3469 "type": "string"
3470 }
3471 },
3472 "loss": {
3473 "description": "Loss represents the detail about loss action\n+optional",
3474 "type": "object",
3475 "$ref": "#/definitions/v1alpha1.LossSpec"
3476 },
3477 "mode": {
3478 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
3479 "type": "string"
3480 },
3481 "selector": {
3482 "description": "Selector is used to select pods that are used to inject chaos action.",
3483 "type": "object",
3484 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
3485 },
3486 "target": {
3487 "description": "Target represents network target, this applies on netem and network partition action\n+optional",
3488 "type": "object",
3489 "$ref": "#/definitions/v1alpha1.PodSelector"
3490 },
3491 "targetDevice": {
3492 "description": "TargetDevice represents the network device to be affected in target scope.\n+optional",
3493 "type": "string"
3494 },
3495 "value": {
3496 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
3497 "type": "string"
3498 }
3499 }
3500 },
3501 "v1alpha1.NetworkCorruptSpec": {
3502 "type": "object",
3503 "properties": {
3504 "correlation": {
3505 "description": "correlation is percentage (10 is 10%)",
3506 "type": "string"
3507 },
3508 "device": {
3509 "description": "the network interface to impact",
3510 "type": "string"
3511 },
3512 "egress-port": {
3513 "description": "only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3514 "type": "string"
3515 },
3516 "hostname": {
3517 "description": "only impact traffic to these hostnames",
3518 "type": "string"
3519 },
3520 "ip-address": {
3521 "description": "only impact egress traffic to these IP addresses",
3522 "type": "string"
3523 },
3524 "ip-protocol": {
3525 "description": "only impact traffic using this IP protocol, supported: tcp, udp, icmp, all",
3526 "type": "string"
3527 },
3528 "percent": {
3529 "description": "percentage of packets to corrupt (10 is 10%)",
3530 "type": "string"
3531 },
3532 "source-port": {
3533 "description": "only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3534 "type": "string"
3535 }
3536 }
3537 },
3538 "v1alpha1.NetworkDNSSpec": {
3539 "type": "object",
3540 "properties": {
3541 "dns-domain-name": {
3542 "description": "map this host to specified IP",
3543 "type": "string"
3544 },
3545 "dns-ip": {
3546 "description": "map specified host to this IP address",
3547 "type": "string"
3548 },
3549 "dns-server": {
3550 "description": "update the DNS server in /etc/resolv.conf with this value",
3551 "type": "string"
3552 }
3553 }
3554 },
3555 "v1alpha1.NetworkDelaySpec": {
3556 "type": "object",
3557 "properties": {
3558 "correlation": {
3559 "description": "correlation is percentage (10 is 10%)",
3560 "type": "string"
3561 },
3562 "device": {
3563 "description": "the network interface to impact",
3564 "type": "string"
3565 },
3566 "egress-port": {
3567 "description": "only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3568 "type": "string"
3569 },
3570 "hostname": {
3571 "description": "only impact traffic to these hostnames",
3572 "type": "string"
3573 },
3574 "ip-address": {
3575 "description": "only impact egress traffic to these IP addresses",
3576 "type": "string"
3577 },
3578 "ip-protocol": {
3579 "description": "only impact traffic using this IP protocol, supported: tcp, udp, icmp, all",
3580 "type": "string"
3581 },
3582 "jitter": {
3583 "description": "jitter time, time units: ns, us (or µs), ms, s, m, h.",
3584 "type": "string"
3585 },
3586 "latency": {
3587 "description": "delay egress time, time units: ns, us (or µs), ms, s, m, h.",
3588 "type": "string"
3589 },
3590 "source-port": {
3591 "description": "only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3592 "type": "string"
3593 }
3594 }
3595 },
3596 "v1alpha1.NetworkDuplicateSpec": {
3597 "type": "object",
3598 "properties": {
3599 "correlation": {
3600 "description": "correlation is percentage (10 is 10%)",
3601 "type": "string"
3602 },
3603 "device": {
3604 "description": "the network interface to impact",
3605 "type": "string"
3606 },
3607 "egress-port": {
3608 "description": "only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3609 "type": "string"
3610 },
3611 "hostname": {
3612 "description": "only impact traffic to these hostnames",
3613 "type": "string"
3614 },
3615 "ip-address": {
3616 "description": "only impact egress traffic to these IP addresses",
3617 "type": "string"
3618 },
3619 "ip-protocol": {
3620 "description": "only impact traffic using this IP protocol, supported: tcp, udp, icmp, all",
3621 "type": "string"
3622 },
3623 "percent": {
3624 "description": "percentage of packets to duplicate (10 is 10%)",
3625 "type": "string"
3626 },
3627 "source-port": {
3628 "description": "only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3629 "type": "string"
3630 }
3631 }
3632 },
3633 "v1alpha1.NetworkLossSpec": {
3634 "type": "object",
3635 "properties": {
3636 "correlation": {
3637 "description": "correlation is percentage (10 is 10%)",
3638 "type": "string"
3639 },
3640 "device": {
3641 "description": "the network interface to impact",
3642 "type": "string"
3643 },
3644 "egress-port": {
3645 "description": "only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3646 "type": "string"
3647 },
3648 "hostname": {
3649 "description": "only impact traffic to these hostnames",
3650 "type": "string"
3651 },
3652 "ip-address": {
3653 "description": "only impact egress traffic to these IP addresses",
3654 "type": "string"
3655 },
3656 "ip-protocol": {
3657 "description": "only impact traffic using this IP protocol, supported: tcp, udp, icmp, all",
3658 "type": "string"
3659 },
3660 "percent": {
3661 "description": "percentage of packets to loss (10 is 10%)",
3662 "type": "string"
3663 },
3664 "source-port": {
3665 "description": "only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.\nit can only be used in conjunction with -p tcp or -p udp",
3666 "type": "string"
3667 }
3668 }
3669 },
3670 "v1alpha1.NetworkPartitionSpec": {
3671 "type": "object",
3672 "properties": {
3673 "accept-tcp-flags": {
3674 "description": "only the packet which match the tcp flag can be accepted, others will be dropped.\nonly set when the IPProtocol is tcp, used for partition.",
3675 "type": "string"
3676 },
3677 "device": {
3678 "description": "the network interface to impact",
3679 "type": "string"
3680 },
3681 "direction": {
3682 "description": "specifies the partition direction, values can be 'from', 'to'.\n'from' means packets coming from the 'IPAddress' or 'Hostname' and going to your server,\n'to' means packets originating from your server and going to the 'IPAddress' or 'Hostname'.",
3683 "type": "string"
3684 },
3685 "hostname": {
3686 "description": "only impact traffic to these hostnames",
3687 "type": "string"
3688 },
3689 "ip-address": {
3690 "description": "only impact egress traffic to these IP addresses",
3691 "type": "string"
3692 },
3693 "ip-protocol": {
3694 "description": "only impact egress traffic to these IP addresses",
3695 "type": "string"
3696 }
3697 }
3698 },
3699 "v1alpha1.PhysicalMachineChaosSpec": {
3700 "type": "object",
3701 "properties": {
3702 "action": {
3703 "description": "the subAction, generate automatically\n+optional",
3704 "type": "string"
3705 },
3706 "address": {
3707 "type": "array",
3708 "items": {
3709 "type": "string"
3710 }
3711 },
3712 "clock": {
3713 "description": "+optional",
3714 "type": "object",
3715 "$ref": "#/definitions/v1alpha1.ClockSpec"
3716 },
3717 "disk-fill": {
3718 "description": "+optional",
3719 "type": "object",
3720 "$ref": "#/definitions/v1alpha1.DiskFillSpec"
3721 },
3722 "disk-read-payload": {
3723 "description": "+optional",
3724 "type": "object",
3725 "$ref": "#/definitions/v1alpha1.DiskPayloadSpec"
3726 },
3727 "disk-write-payload": {
3728 "description": "+optional",
3729 "type": "object",
3730 "$ref": "#/definitions/v1alpha1.DiskPayloadSpec"
3731 },
3732 "duration": {
3733 "description": "Duration represents the duration of the chaos action\n+optional",
3734 "type": "string"
3735 },
3736 "jvm-exception": {
3737 "description": "+optional",
3738 "type": "object",
3739 "$ref": "#/definitions/v1alpha1.JVMExceptionSpec"
3740 },
3741 "jvm-gc": {
3742 "description": "+optional",
3743 "type": "object",
3744 "$ref": "#/definitions/v1alpha1.JVMGCSpec"
3745 },
3746 "jvm-latency": {
3747 "description": "+optional",
3748 "type": "object",
3749 "$ref": "#/definitions/v1alpha1.JVMLatencySpec"
3750 },
3751 "jvm-return": {
3752 "description": "+optional",
3753 "type": "object",
3754 "$ref": "#/definitions/v1alpha1.JVMReturnSpec"
3755 },
3756 "jvm-rule-data": {
3757 "description": "+optional",
3758 "type": "object",
3759 "$ref": "#/definitions/v1alpha1.JVMRuleDataSpec"
3760 },
3761 "jvm-stress": {
3762 "description": "+optional",
3763 "type": "object",
3764 "$ref": "#/definitions/v1alpha1.JVMStressSpec"
3765 },
3766 "network-bandwidth": {
3767 "description": "+optional",
3768 "type": "object",
3769 "$ref": "#/definitions/v1alpha1.NetworkBandwidthSpec"
3770 },
3771 "network-corrupt": {
3772 "description": "+optional",
3773 "type": "object",
3774 "$ref": "#/definitions/v1alpha1.NetworkCorruptSpec"
3775 },
3776 "network-delay": {
3777 "description": "+optional",
3778 "type": "object",
3779 "$ref": "#/definitions/v1alpha1.NetworkDelaySpec"
3780 },
3781 "network-dns": {
3782 "description": "+optional",
3783 "type": "object",
3784 "$ref": "#/definitions/v1alpha1.NetworkDNSSpec"
3785 },
3786 "network-duplicate": {
3787 "description": "+optional",
3788 "type": "object",
3789 "$ref": "#/definitions/v1alpha1.NetworkDuplicateSpec"
3790 },
3791 "network-loss": {
3792 "description": "+optional",
3793 "type": "object",
3794 "$ref": "#/definitions/v1alpha1.NetworkLossSpec"
3795 },
3796 "network-partition": {
3797 "description": "+optional",
3798 "type": "object",
3799 "$ref": "#/definitions/v1alpha1.NetworkPartitionSpec"
3800 },
3801 "process": {
3802 "description": "+optional",
3803 "type": "object",
3804 "$ref": "#/definitions/v1alpha1.ProcessSpec"
3805 },
3806 "stress-cpu": {
3807 "description": "+optional",
3808 "type": "object",
3809 "$ref": "#/definitions/v1alpha1.StressCPUSpec"
3810 },
3811 "stress-mem": {
3812 "description": "+optional",
3813 "type": "object",
3814 "$ref": "#/definitions/v1alpha1.StressMemorySpec"
3815 },
3816 "uid": {
3817 "description": "the experiment ID\n+optional",
3818 "type": "string"
3819 }
3820 }
3821 },
3822 "v1alpha1.PodChaosSpec": {
3823 "type": "object",
3824 "properties": {
3825 "action": {
3826 "description": "Action defines the specific pod chaos action.\nSupported action: pod-kill / pod-failure / container-kill\nDefault action: pod-kill\n+kubebuilder:validation:Enum=pod-kill;pod-failure;container-kill",
3827 "type": "string"
3828 },
3829 "containerNames": {
3830 "description": "ContainerNames indicates list of the name of affected container.\nIf not set, all containers will be injected\n+optional",
3831 "type": "array",
3832 "items": {
3833 "type": "string"
3834 }
3835 },
3836 "duration": {
3837 "description": "Duration represents the duration of the chaos action.\nIt is required when the action is ` + "`" + `PodFailureAction` + "`" + `.\nA duration string is a possibly signed sequence of\ndecimal numbers, each with optional fraction and a unit suffix,\nsuch as \"300ms\", \"-1.5h\" or \"2h45m\".\nValid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n+optional",
3838 "type": "string"
3839 },
3840 "gracePeriod": {
3841 "description": "GracePeriod is used in pod-kill action. It represents the duration in seconds before the pod should be deleted.\nValue must be non-negative integer. The default value is zero that indicates delete immediately.\n+optional\n+kubebuilder:validation:Minimum=0",
3842 "type": "integer"
3843 },
3844 "mode": {
3845 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
3846 "type": "string"
3847 },
3848 "selector": {
3849 "description": "Selector is used to select pods that are used to inject chaos action.",
3850 "type": "object",
3851 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
3852 },
3853 "value": {
3854 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
3855 "type": "string"
3856 }
3857 }
3858 },
3859 "v1alpha1.PodHttpChaosPatchActions": {
3860 "type": "object",
3861 "properties": {
3862 "body": {
3863 "description": "Body is a rule to patch message body of target.\n+optional",
3864 "type": "object",
3865 "$ref": "#/definitions/v1alpha1.PodHttpChaosPatchBodyAction"
3866 },
3867 "headers": {
3868 "description": "Headers is a rule to append http headers of target.\nFor example: ` + "`" + `[[\"Set-Cookie\", \"\u003cone cookie\u003e\"], [\"Set-Cookie\", \"\u003canother cookie\u003e\"]]` + "`" + `.\n+optional",
3869 "type": "array",
3870 "items": {
3871 "type": "array",
3872 "items": {
3873 "type": "string"
3874 }
3875 }
3876 },
3877 "queries": {
3878 "description": "Queries is a rule to append uri queries of target(Request only).\nFor example: ` + "`" + `[[\"foo\", \"bar\"], [\"foo\", \"unknown\"]]` + "`" + `.\n+optional",
3879 "type": "array",
3880 "items": {
3881 "type": "array",
3882 "items": {
3883 "type": "string"
3884 }
3885 }
3886 }
3887 }
3888 },
3889 "v1alpha1.PodHttpChaosPatchBodyAction": {
3890 "type": "object",
3891 "properties": {
3892 "type": {
3893 "description": "Type represents the patch type, only support ` + "`" + `JSON` + "`" + ` as [merge patch json](https://tools.ietf.org/html/rfc7396) currently.",
3894 "type": "string"
3895 },
3896 "value": {
3897 "description": "Value is the patch contents.",
3898 "type": "string"
3899 }
3900 }
3901 },
3902 "v1alpha1.PodHttpChaosReplaceActions": {
3903 "type": "object",
3904 "properties": {
3905 "body": {
3906 "description": "Body is a rule to replace http message body in target.\n+optional",
3907 "type": "array",
3908 "items": {
3909 "type": "integer"
3910 }
3911 },
3912 "code": {
3913 "description": "Code is a rule to replace http status code in response.\n+optional",
3914 "type": "integer"
3915 },
3916 "headers": {
3917 "description": "Headers is a rule to replace http headers of target.\nThe key-value pairs represent header name and header value pairs.\n+optional",
3918 "type": "object",
3919 "additionalProperties": {
3920 "type": "string"
3921 }
3922 },
3923 "method": {
3924 "description": "Method is a rule to replace http method in request.\n+optional",
3925 "type": "string"
3926 },
3927 "path": {
3928 "description": "Path is rule to to replace uri path in http request.\n+optional",
3929 "type": "string"
3930 },
3931 "queries": {
3932 "description": "Queries is a rule to replace uri queries in http request.\nFor example, with value ` + "`" + `{ \"foo\": \"unknown\" }` + "`" + `, the ` + "`" + `/?foo=bar` + "`" + ` will be altered to ` + "`" + `/?foo=unknown` + "`" + `,\n+optional",
3933 "type": "object",
3934 "additionalProperties": {
3935 "type": "string"
3936 }
3937 }
3938 }
3939 },
3940 "v1alpha1.PodSelector": {
3941 "type": "object",
3942 "properties": {
3943 "mode": {
3944 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
3945 "type": "string"
3946 },
3947 "selector": {
3948 "description": "Selector is used to select pods that are used to inject chaos action.",
3949 "type": "object",
3950 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
3951 },
3952 "value": {
3953 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
3954 "type": "string"
3955 }
3956 }
3957 },
3958 "v1alpha1.PodSelectorSpec": {
3959 "type": "object",
3960 "properties": {
3961 "annotationSelectors": {
3962 "description": "Map of string keys and values that can be used to select objects.\nA selector based on annotations.\n+optional",
3963 "type": "object",
3964 "additionalProperties": {
3965 "type": "string"
3966 }
3967 },
3968 "expressionSelectors": {
3969 "description": "a slice of label selector expressions that can be used to select objects.\nA list of selectors based on set-based label expressions.\n+optional",
3970 "type": "object",
3971 "$ref": "#/definitions/v1alpha1.LabelSelectorRequirements"
3972 },
3973 "fieldSelectors": {
3974 "description": "Map of string keys and values that can be used to select objects.\nA selector based on fields.\n+optional",
3975 "type": "object",
3976 "additionalProperties": {
3977 "type": "string"
3978 }
3979 },
3980 "labelSelectors": {
3981 "description": "Map of string keys and values that can be used to select objects.\nA selector based on labels.\n+optional",
3982 "type": "object",
3983 "additionalProperties": {
3984 "type": "string"
3985 }
3986 },
3987 "namespaces": {
3988 "description": "Namespaces is a set of namespace to which objects belong.\n+optional",
3989 "type": "array",
3990 "items": {
3991 "type": "string"
3992 }
3993 },
3994 "nodeSelectors": {
3995 "description": "Map of string keys and values that can be used to select nodes.\nSelector which must match a node's labels,\nand objects must belong to these selected nodes.\n+optional",
3996 "type": "object",
3997 "additionalProperties": {
3998 "type": "string"
3999 }
4000 },
4001 "nodes": {
4002 "description": "Nodes is a set of node name and objects must belong to these nodes.\n+optional",
4003 "type": "array",
4004 "items": {
4005 "type": "string"
4006 }
4007 },
4008 "podPhaseSelectors": {
4009 "description": "PodPhaseSelectors is a set of condition of a pod at the current time.\nsupported value: Pending / Running / Succeeded / Failed / Unknown\n+optional",
4010 "type": "array",
4011 "items": {
4012 "type": "string"
4013 }
4014 },
4015 "pods": {
4016 "description": "Pods is a map of string keys and a set values that used to select pods.\nThe key defines the namespace which pods belong,\nand the each values is a set of pod names.\n+optional",
4017 "type": "object",
4018 "additionalProperties": {
4019 "type": "array",
4020 "items": {
4021 "type": "string"
4022 }
4023 }
4024 }
4025 }
4026 },
4027 "v1alpha1.ProcessSpec": {
4028 "type": "object",
4029 "properties": {
4030 "process": {
4031 "description": "the process name or the process ID",
4032 "type": "string"
4033 },
4034 "signal": {
4035 "description": "the signal number to send",
4036 "type": "integer"
4037 }
4038 }
4039 },
4040 "v1alpha1.ReorderSpec": {
4041 "type": "object",
4042 "properties": {
4043 "correlation": {
4044 "description": "+optional",
4045 "type": "string",
4046 "default": "0"
4047 },
4048 "gap": {
4049 "type": "integer"
4050 },
4051 "reorder": {
4052 "type": "string"
4053 }
4054 }
4055 },
4056 "v1alpha1.Schedule": {
4057 "type": "object",
4058 "properties": {
4059 "spec": {
4060 "type": "object",
4061 "$ref": "#/definitions/v1alpha1.ScheduleSpec"
4062 },
4063 "status": {
4064 "description": "+optional",
4065 "type": "object",
4066 "$ref": "#/definitions/v1alpha1.ScheduleStatus"
4067 }
4068 }
4069 },
4070 "v1alpha1.ScheduleSpec": {
4071 "type": "object",
4072 "properties": {
4073 "awsChaos": {
4074 "description": "+optional",
4075 "type": "object",
4076 "$ref": "#/definitions/v1alpha1.AWSChaosSpec"
4077 },
4078 "concurrencyPolicy": {
4079 "description": "+optional\n+kubebuilder:validation:Enum=Forbid;Allow",
4080 "type": "string"
4081 },
4082 "dnsChaos": {
4083 "description": "+optional",
4084 "type": "object",
4085 "$ref": "#/definitions/v1alpha1.DNSChaosSpec"
4086 },
4087 "gcpChaos": {
4088 "description": "+optional",
4089 "type": "object",
4090 "$ref": "#/definitions/v1alpha1.GCPChaosSpec"
4091 },
4092 "historyLimit": {
4093 "description": "+optional\n+kubebuilder:validation:Minimum=1",
4094 "type": "integer"
4095 },
4096 "httpChaos": {
4097 "description": "+optional",
4098 "type": "object",
4099 "$ref": "#/definitions/v1alpha1.HTTPChaosSpec"
4100 },
4101 "ioChaos": {
4102 "description": "+optional",
4103 "type": "object",
4104 "$ref": "#/definitions/v1alpha1.IOChaosSpec"
4105 },
4106 "jvmChaos": {
4107 "description": "+optional",
4108 "type": "object",
4109 "$ref": "#/definitions/v1alpha1.JVMChaosSpec"
4110 },
4111 "kernelChaos": {
4112 "description": "+optional",
4113 "type": "object",
4114 "$ref": "#/definitions/v1alpha1.KernelChaosSpec"
4115 },
4116 "networkChaos": {
4117 "description": "+optional",
4118 "type": "object",
4119 "$ref": "#/definitions/v1alpha1.NetworkChaosSpec"
4120 },
4121 "physicalmachineChaos": {
4122 "description": "+optional",
4123 "type": "object",
4124 "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec"
4125 },
4126 "podChaos": {
4127 "description": "+optional",
4128 "type": "object",
4129 "$ref": "#/definitions/v1alpha1.PodChaosSpec"
4130 },
4131 "schedule": {
4132 "type": "string"
4133 },
4134 "startingDeadlineSeconds": {
4135 "description": "+optional\n+nullable\n+kubebuilder:validation:Minimum=0\n+kubebuilder:validation:ExclusiveMinimum=true",
4136 "type": "integer"
4137 },
4138 "stressChaos": {
4139 "description": "+optional",
4140 "type": "object",
4141 "$ref": "#/definitions/v1alpha1.StressChaosSpec"
4142 },
4143 "timeChaos": {
4144 "description": "+optional",
4145 "type": "object",
4146 "$ref": "#/definitions/v1alpha1.TimeChaosSpec"
4147 },
4148 "type": {
4149 "description": "TODO: use a custom type, as ` + "`" + `TemplateType` + "`" + ` contains other possible values",
4150 "type": "string"
4151 },
4152 "workflow": {
4153 "description": "+optional",
4154 "type": "object",
4155 "$ref": "#/definitions/v1alpha1.WorkflowSpec"
4156 }
4157 }
4158 },
4159 "v1alpha1.ScheduleStatus": {
4160 "type": "object",
4161 "properties": {
4162 "active": {
4163 "description": "+optional",
4164 "type": "string"
4165 },
4166 "time": {
4167 "description": "+optional\n+nullable",
4168 "type": "string"
4169 }
4170 }
4171 },
4172 "v1alpha1.StressCPUSpec": {
4173 "type": "object",
4174 "properties": {
4175 "load": {
4176 "description": "specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading.",
4177 "type": "integer"
4178 },
4179 "options": {
4180 "description": "extend stress-ng options",
4181 "type": "string"
4182 },
4183 "workers": {
4184 "description": "specifies N workers to apply the stressor.",
4185 "type": "integer"
4186 }
4187 }
4188 },
4189 "v1alpha1.StressChaosSpec": {
4190 "type": "object",
4191 "properties": {
4192 "containerNames": {
4193 "description": "ContainerNames indicates list of the name of affected container.\nIf not set, all containers will be injected\n+optional",
4194 "type": "array",
4195 "items": {
4196 "type": "string"
4197 }
4198 },
4199 "duration": {
4200 "description": "Duration represents the duration of the chaos action\n+optional",
4201 "type": "string"
4202 },
4203 "mode": {
4204 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
4205 "type": "string"
4206 },
4207 "selector": {
4208 "description": "Selector is used to select pods that are used to inject chaos action.",
4209 "type": "object",
4210 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
4211 },
4212 "stressngStressors": {
4213 "description": "StressngStressors defines plenty of stressors just like ` + "`" + `Stressors` + "`" + ` except that it's an experimental\nfeature and more powerful. You can define stressors in ` + "`" + `stress-ng` + "`" + ` (see also ` + "`" + `man stress-ng` + "`" + `) dialect,\nhowever not all of the supported stressors are well tested. It maybe retired in later releases. You\nshould always use ` + "`" + `Stressors` + "`" + ` to define the stressors and use this only when you want more stressors\nunsupported by ` + "`" + `Stressors` + "`" + `. When both ` + "`" + `StressngStressors` + "`" + ` and ` + "`" + `Stressors` + "`" + ` are defined, ` + "`" + `StressngStressors` + "`" + `\nwins.\n+optional",
4214 "type": "string"
4215 },
4216 "stressors": {
4217 "description": "Stressors defines plenty of stressors supported to stress system components out.\nYou can use one or more of them to make up various kinds of stresses. At least\none of the stressors should be specified.\n+optional",
4218 "type": "object",
4219 "$ref": "#/definitions/v1alpha1.Stressors"
4220 },
4221 "value": {
4222 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
4223 "type": "string"
4224 }
4225 }
4226 },
4227 "v1alpha1.StressMemorySpec": {
4228 "type": "object",
4229 "properties": {
4230 "options": {
4231 "description": "extend stress-ng options",
4232 "type": "string"
4233 },
4234 "size": {
4235 "description": "specifies N bytes consumed per vm worker, default is the total available memory.\nOne can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB..",
4236 "type": "string"
4237 }
4238 }
4239 },
4240 "v1alpha1.Stressors": {
4241 "type": "object",
4242 "properties": {
4243 "cpu": {
4244 "description": "CPUStressor stresses CPU out\n+optional",
4245 "type": "object",
4246 "$ref": "#/definitions/v1alpha1.CPUStressor"
4247 },
4248 "memory": {
4249 "description": "MemoryStressor stresses virtual memory out\n+optional",
4250 "type": "object",
4251 "$ref": "#/definitions/v1alpha1.MemoryStressor"
4252 }
4253 }
4254 },
4255 "v1alpha1.Task": {
4256 "type": "object",
4257 "properties": {
4258 "container": {
4259 "description": "Container is the main container image to run in the pod",
4260 "type": "string"
4261 },
4262 "volumes": {
4263 "description": "Volumes is a list of volumes that can be mounted by containers in a template.\n+patchStrategy=merge\n+patchMergeKey=name",
4264 "type": "string"
4265 }
4266 }
4267 },
4268 "v1alpha1.Template": {
4269 "type": "object",
4270 "properties": {
4271 "awsChaos": {
4272 "description": "+optional",
4273 "type": "object",
4274 "$ref": "#/definitions/v1alpha1.AWSChaosSpec"
4275 },
4276 "children": {
4277 "description": "Children describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel.\n+optional",
4278 "type": "array",
4279 "items": {
4280 "type": "string"
4281 }
4282 },
4283 "conditionalBranches": {
4284 "description": "ConditionalBranches describes the conditional branches of custom tasks. Only used when Type is TypeTask.\n+optional",
4285 "type": "array",
4286 "items": {
4287 "$ref": "#/definitions/v1alpha1.ConditionalBranch"
4288 }
4289 },
4290 "deadline": {
4291 "description": "+optional",
4292 "type": "string"
4293 },
4294 "dnsChaos": {
4295 "description": "+optional",
4296 "type": "object",
4297 "$ref": "#/definitions/v1alpha1.DNSChaosSpec"
4298 },
4299 "gcpChaos": {
4300 "description": "+optional",
4301 "type": "object",
4302 "$ref": "#/definitions/v1alpha1.GCPChaosSpec"
4303 },
4304 "httpChaos": {
4305 "description": "+optional",
4306 "type": "object",
4307 "$ref": "#/definitions/v1alpha1.HTTPChaosSpec"
4308 },
4309 "ioChaos": {
4310 "description": "+optional",
4311 "type": "object",
4312 "$ref": "#/definitions/v1alpha1.IOChaosSpec"
4313 },
4314 "jvmChaos": {
4315 "description": "+optional",
4316 "type": "object",
4317 "$ref": "#/definitions/v1alpha1.JVMChaosSpec"
4318 },
4319 "kernelChaos": {
4320 "description": "+optional",
4321 "type": "object",
4322 "$ref": "#/definitions/v1alpha1.KernelChaosSpec"
4323 },
4324 "name": {
4325 "type": "string"
4326 },
4327 "networkChaos": {
4328 "description": "+optional",
4329 "type": "object",
4330 "$ref": "#/definitions/v1alpha1.NetworkChaosSpec"
4331 },
4332 "physicalmachineChaos": {
4333 "description": "+optional",
4334 "type": "object",
4335 "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec"
4336 },
4337 "podChaos": {
4338 "description": "+optional",
4339 "type": "object",
4340 "$ref": "#/definitions/v1alpha1.PodChaosSpec"
4341 },
4342 "schedule": {
4343 "description": "Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule.\n+optional",
4344 "type": "object",
4345 "$ref": "#/definitions/v1alpha1.ChaosOnlyScheduleSpec"
4346 },
4347 "stressChaos": {
4348 "description": "+optional",
4349 "type": "object",
4350 "$ref": "#/definitions/v1alpha1.StressChaosSpec"
4351 },
4352 "task": {
4353 "description": "Task describes the behavior of the custom task. Only used when Type is TypeTask.\n+optional",
4354 "type": "object",
4355 "$ref": "#/definitions/v1alpha1.Task"
4356 },
4357 "templateType": {
4358 "type": "string"
4359 },
4360 "timeChaos": {
4361 "description": "+optional",
4362 "type": "object",
4363 "$ref": "#/definitions/v1alpha1.TimeChaosSpec"
4364 }
4365 }
4366 },
4367 "v1alpha1.TimeChaosSpec": {
4368 "type": "object",
4369 "properties": {
4370 "clockIds": {
4371 "description": "ClockIds defines all affected clock id\nAll available options are [\"CLOCK_REALTIME\",\"CLOCK_MONOTONIC\",\"CLOCK_PROCESS_CPUTIME_ID\",\"CLOCK_THREAD_CPUTIME_ID\",\n\"CLOCK_MONOTONIC_RAW\",\"CLOCK_REALTIME_COARSE\",\"CLOCK_MONOTONIC_COARSE\",\"CLOCK_BOOTTIME\",\"CLOCK_REALTIME_ALARM\",\n\"CLOCK_BOOTTIME_ALARM\"]\nDefault value is [\"CLOCK_REALTIME\"]",
4372 "type": "array",
4373 "items": {
4374 "type": "string"
4375 }
4376 },
4377 "containerNames": {
4378 "description": "ContainerNames indicates list of the name of affected container.\nIf not set, all containers will be injected\n+optional",
4379 "type": "array",
4380 "items": {
4381 "type": "string"
4382 }
4383 },
4384 "duration": {
4385 "description": "Duration represents the duration of the chaos action",
4386 "type": "string"
4387 },
4388 "mode": {
4389 "description": "Mode defines the mode to run chaos action.\nSupported mode: one / all / fixed / fixed-percent / random-max-percent\n+kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent",
4390 "type": "string"
4391 },
4392 "selector": {
4393 "description": "Selector is used to select pods that are used to inject chaos action.",
4394 "type": "object",
4395 "$ref": "#/definitions/v1alpha1.PodSelectorSpec"
4396 },
4397 "timeOffset": {
4398 "description": "TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as\n\"300ms\", \"-1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".",
4399 "type": "string"
4400 },
4401 "value": {
4402 "description": "Value is required when the mode is set to ` + "`" + `FixedMode` + "`" + ` / ` + "`" + `FixedPercentMode` + "`" + ` / ` + "`" + `RandomMaxPercentMode` + "`" + `.\nIf ` + "`" + `FixedMode` + "`" + `, provide an integer of pods to do chaos action.\nIf ` + "`" + `FixedPercentMode` + "`" + `, provide a number from 0-100 to specify the percent of pods the server can do chaos action.\nIF ` + "`" + `RandomMaxPercentMode` + "`" + `, provide a number from 0-100 to specify the max percent of pods to do chaos action\n+optional",
4403 "type": "string"
4404 }
4405 }
4406 },
4407 "v1alpha1.Timespec": {
4408 "type": "object",
4409 "properties": {
4410 "nsec": {
4411 "type": "integer"
4412 },
4413 "sec": {
4414 "type": "integer"
4415 }
4416 }
4417 },
4418 "v1alpha1.Workflow": {
4419 "type": "object",
4420 "properties": {
4421 "spec": {
4422 "description": "Spec defines the behavior of a workflow",
4423 "type": "object",
4424 "$ref": "#/definitions/v1alpha1.WorkflowSpec"
4425 },
4426 "status": {
4427 "description": "+optional\nMost recently observed status of the workflow",
4428 "type": "object",
4429 "$ref": "#/definitions/v1alpha1.WorkflowStatus"
4430 }
4431 }
4432 },
4433 "v1alpha1.WorkflowCondition": {
4434 "type": "object",
4435 "properties": {
4436 "reason": {
4437 "type": "string"
4438 },
4439 "startTime": {
4440 "type": "string"
4441 },
4442 "status": {
4443 "type": "string"
4444 },
4445 "type": {
4446 "type": "string"
4447 }
4448 }
4449 },
4450 "v1alpha1.WorkflowSpec": {
4451 "type": "object",
4452 "properties": {
4453 "entry": {
4454 "type": "string"
4455 },
4456 "templates": {
4457 "type": "array",
4458 "items": {
4459 "$ref": "#/definitions/v1alpha1.Template"
4460 }
4461 }
4462 }
4463 },
4464 "v1alpha1.WorkflowStatus": {
4465 "type": "object",
4466 "properties": {
4467 "conditions": {
4468 "description": "Represents the latest available observations of a workflow's current state.\n+optional\n+patchMergeKey=type\n+patchStrategy=merge",
4469 "type": "array",
4470 "items": {
4471 "$ref": "#/definitions/v1alpha1.WorkflowCondition"
4472 }
4473 },
4474 "endTime": {
4475 "description": "+optional",
4476 "type": "string"
4477 },
4478 "entryNode": {
4479 "description": "+optional",
4480 "type": "string"
4481 },
4482 "startTime": {
4483 "description": "+optional",
4484 "type": "string"
4485 }
4486 }
4487 },
4488 "workflow.StatusResponse": {
4489 "type": "object",
4490 "properties": {
4491 "status": {
4492 "type": "string"
4493 }
4494 }
4495 }
4496 }
4497 }`
4498
4499 type swaggerInfo struct {
4500 Version string
4501 Host string
4502 BasePath string
4503 Schemes []string
4504 Title string
4505 Description string
4506 }
4507
4508
4509 var SwaggerInfo = swaggerInfo{
4510 Version: "2.0",
4511 Host: "",
4512 BasePath: "/api",
4513 Schemes: []string{},
4514 Title: "Chaos Mesh Dashboard API",
4515 Description: "Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report.",
4516 }
4517
4518 type s struct{}
4519
4520 func (s *s) ReadDoc() string {
4521 sInfo := SwaggerInfo
4522 sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
4523
4524 t, err := template.New("swagger_info").Funcs(template.FuncMap{
4525 "marshal": func(v interface{}) string {
4526 a, _ := json.Marshal(v)
4527 return string(a)
4528 },
4529 }).Parse(doc)
4530 if err != nil {
4531 return doc
4532 }
4533
4534 var tpl bytes.Buffer
4535 if err := t.Execute(&tpl, sInfo); err != nil {
4536 return doc
4537 }
4538
4539 return tpl.String()
4540 }
4541
4542 func init() {
4543 swag.Register(swag.Name, &s{})
4544 }
4545