1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/eclipse-che/che-operator/org.eclipse.che/v1/checlusters.yaml
// kopium version: 0.22.5
#[allow(unused_imports)]
mod prelude {
pub use kube::CustomResource;
pub use serde::{Serialize, Deserialize};
pub use std::collections::BTreeMap;
pub use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString;
}
use self::prelude::*;
/// Desired configuration of the Che installation.
/// Based on these settings, the Operator automatically creates and maintains
/// several ConfigMaps that will contain the appropriate environment variables
/// the various components of the Che installation.
/// These generated ConfigMaps must NOT be updated manually.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "org.eclipse.che", version = "v1", kind = "CheCluster", plural = "checlusters")]
#[kube(namespaced)]
#[kube(status = "CheClusterStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct CheClusterSpec {
/// Configuration settings related to the Authentication used by the Che installation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub auth: Option<CheClusterAuth>,
/// Configuration settings related to the User Dashboard used by the Che installation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub dashboard: Option<CheClusterDashboard>,
/// Configuration settings related to the database used by the Che installation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub database: Option<CheClusterDatabase>,
/// DevWorkspace operator configuration
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devWorkspace")]
pub dev_workspace: Option<CheClusterDevWorkspace>,
/// A configuration that allows users to work with remote Git repositories.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gitServices")]
pub git_services: Option<CheClusterGitServices>,
/// Kubernetes Image Puller configuration
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePuller")]
pub image_puller: Option<CheClusterImagePuller>,
/// Configuration settings specific to Che installations made on upstream Kubernetes.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub k8s: Option<CheClusterK8s>,
/// Configuration settings related to the metrics collection used by the Che installation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub metrics: Option<CheClusterMetrics>,
/// General configuration settings related to the Che server, the plugin and devfile registries
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server: Option<CheClusterServer>,
/// Configuration settings related to the persistent storage used by the Che installation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub storage: Option<CheClusterStorage>,
}
/// Configuration settings related to the Authentication used by the Che installation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuth {
/// Deprecated. The value of this flag is ignored.
/// Debug internal identity provider.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub debug: Option<bool>,
/// Deprecated. The value of this flag is ignored.
/// Instructs the Operator on whether or not to deploy a dedicated Identity Provider (Keycloak or RH SSO instance).
/// Instructs the Operator on whether to deploy a dedicated Identity Provider (Keycloak or RH-SSO instance).
/// By default, a dedicated Identity Provider server is deployed as part of the Che installation. When `externalIdentityProvider` is `true`,
/// no dedicated identity provider will be deployed by the Operator and you will need to provide details about the external identity provider you are about to use.
/// See also all the other fields starting with: `identityProvider`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "externalIdentityProvider")]
pub external_identity_provider: Option<bool>,
/// Gateway sidecar responsible for authentication when NativeUserMode is enabled.
/// See link:<https://github.com/oauth2-proxy/oauth2-proxy[oauth2-proxy]> or link:<https://github.com/openshift/oauth-proxy[openshift/oauth-proxy].>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayAuthenticationSidecarImage")]
pub gateway_authentication_sidecar_image: Option<String>,
/// Gateway sidecar responsible for authorization when NativeUserMode is enabled.
/// See link:<https://github.com/brancz/kube-rbac-proxy[kube-rbac-proxy]> or link:<https://github.com/openshift/kube-rbac-proxy[openshift/kube-rbac-proxy]>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayAuthorizationSidecarImage")]
pub gateway_authorization_sidecar_image: Option<String>,
/// List of environment variables to set in the Configbump container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayConfigBumpEnv")]
pub gateway_config_bump_env: Option<Vec<CheClusterAuthGatewayConfigBumpEnv>>,
/// List of environment variables to set in the Gateway container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayEnv")]
pub gateway_env: Option<Vec<CheClusterAuthGatewayEnv>>,
/// Deprecated. The value of this flag is ignored. Sidecar functionality is now implemented in Traefik plugin.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayHeaderRewriteSidecarImage")]
pub gateway_header_rewrite_sidecar_image: Option<String>,
/// List of environment variables to set in the Kube rbac proxy container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayKubeRbacProxyEnv")]
pub gateway_kube_rbac_proxy_env: Option<Vec<CheClusterAuthGatewayKubeRbacProxyEnv>>,
/// List of environment variables to set in the OAuth proxy container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayOAuthProxyEnv")]
pub gateway_o_auth_proxy_env: Option<Vec<CheClusterAuthGatewayOAuthProxyEnv>>,
/// Deprecated. The value of this flag is ignored.
/// Overrides the name of the Identity Provider administrator user. Defaults to `admin`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderAdminUserName")]
pub identity_provider_admin_user_name: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Name of a Identity provider, Keycloak or RH-SSO, `client-id` that is used for Che.
/// Override this when an external Identity Provider is in use. See the `externalIdentityProvider` field.
/// When omitted or left blank, it is set to the value of the `flavour` field suffixed with `-public`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderClientId")]
pub identity_provider_client_id: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Identity provider container custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderContainerResources")]
pub identity_provider_container_resources: Option<CheClusterAuthIdentityProviderContainerResources>,
/// Deprecated. The value of this flag is ignored.
/// Overrides the container image used in the Identity Provider, Keycloak or RH-SSO, deployment.
/// This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderImage")]
pub identity_provider_image: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Overrides the image pull policy used in the Identity Provider, Keycloak or RH-SSO, deployment.
/// Default value is `Always` for `nightly`, `next` or `latest` images, and `IfNotPresent` in other cases.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderImagePullPolicy")]
pub identity_provider_image_pull_policy: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Ingress custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderIngress")]
pub identity_provider_ingress: Option<CheClusterAuthIdentityProviderIngress>,
/// Deprecated. The value of this flag is ignored.
/// Overrides the password of Keycloak administrator user.
/// Override this when an external Identity Provider is in use. See the `externalIdentityProvider` field.
/// When omitted or left blank, it is set to an auto-generated password.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderPassword")]
pub identity_provider_password: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Password for a Identity Provider, Keycloak or RH-SSO, to connect to the database.
/// Override this when an external Identity Provider is in use. See the `externalIdentityProvider` field.
/// When omitted or left blank, it is set to an auto-generated password.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderPostgresPassword")]
pub identity_provider_postgres_password: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// The secret that contains `password` for the Identity Provider, Keycloak or RH-SSO, to connect to the database.
/// When the secret is defined, the `identityProviderPostgresPassword` is ignored. When the value is omitted or left blank, the one of following scenarios applies:
/// 1. `identityProviderPostgresPassword` is defined, then it will be used to connect to the database.
/// 2. `identityProviderPostgresPassword` is not defined, then a new secret with the name `che-identity-postgres-secret` will be created with an auto-generated value for `password`.
/// The secret must have `app.kubernetes.io/part-of=che.eclipse.org` label.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderPostgresSecret")]
pub identity_provider_postgres_secret: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Name of a Identity provider, Keycloak or RH-SSO, realm that is used for Che.
/// Override this when an external Identity Provider is in use. See the `externalIdentityProvider` field.
/// When omitted or left blank, it is set to the value of the `flavour` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderRealm")]
pub identity_provider_realm: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Route custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderRoute")]
pub identity_provider_route: Option<CheClusterAuthIdentityProviderRoute>,
/// Deprecated. The value of this flag is ignored.
/// The secret that contains `user` and `password` for Identity Provider.
/// When the secret is defined, the `identityProviderAdminUserName` and `identityProviderPassword` are ignored.
/// When the value is omitted or left blank, the one of following scenarios applies:
/// 1. `identityProviderAdminUserName` and `identityProviderPassword` are defined, then they will be used.
/// 2. `identityProviderAdminUserName` or `identityProviderPassword` are not defined, then a new secret with the name
/// `che-identity-secret` will be created with default value `admin` for `user` and with an auto-generated value for `password`.
/// The secret must have `app.kubernetes.io/part-of=che.eclipse.org` label.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderSecret")]
pub identity_provider_secret: Option<String>,
/// Public URL of the Identity Provider server (Keycloak / RH-SSO server).
/// Set this ONLY when a use of an external Identity Provider is needed.
/// See the `externalIdentityProvider` field. By default, this will be automatically calculated and set by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityProviderURL")]
pub identity_provider_url: Option<String>,
/// Identity token to be passed to upstream. There are two types of tokens supported: `id_token` and `access_token`.
/// Default value is `id_token`.
/// This field is specific to Che installations made for Kubernetes only and ignored for OpenShift.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "identityToken")]
pub identity_token: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// For operating with the OpenShift OAuth authentication, create a new user account since the kubeadmin can not be used.
/// If the value is true, then a new OpenShift OAuth user will be created for the HTPasswd identity provider.
/// If the value is false and the user has already been created, then it will be removed.
/// If value is an empty, then do nothing.
/// The user's credentials are stored in the `openshift-oauth-user-credentials` secret in 'openshift-config' namespace by Operator.
/// Note that this solution is Openshift 4 platform-specific.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "initialOpenShiftOAuthUser")]
pub initial_open_shift_o_auth_user: Option<bool>,
/// Deprecated. The value of this flag is ignored.
/// Enables native user mode. Currently works only on OpenShift and DevWorkspace engine.
/// Native User mode uses OpenShift OAuth directly as identity provider, without Keycloak.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nativeUserMode")]
pub native_user_mode: Option<bool>,
/// Name of the OpenShift `OAuthClient` resource used to setup identity federation on the OpenShift side. Auto-generated when left blank. See also the `OpenShiftoAuth` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "oAuthClientName")]
pub o_auth_client_name: Option<String>,
/// Access Token Scope.
/// This field is specific to Che installations made for Kubernetes only and ignored for OpenShift.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "oAuthScope")]
pub o_auth_scope: Option<String>,
/// Name of the secret set in the OpenShift `OAuthClient` resource used to setup identity federation on the OpenShift side. Auto-generated when left blank. See also the `OAuthClientName` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "oAuthSecret")]
pub o_auth_secret: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Enables the integration of the identity provider (Keycloak / RHSSO) with OpenShift OAuth.
/// Empty value on OpenShift by default. This will allow users to directly login with their OpenShift user through the OpenShift login,
/// and have their workspaces created under personal OpenShift namespaces.
/// WARNING: the `kubeadmin` user is NOT supported, and logging through it will NOT allow accessing the Che Dashboard.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "openShiftoAuth")]
pub open_shifto_auth: Option<bool>,
/// Deprecated. The value of this flag is ignored.
/// Forces the default `admin` Che user to update password on first login. Defaults to `false`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "updateAdminPassword")]
pub update_admin_password: Option<bool>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayConfigBumpEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterAuthGatewayConfigBumpEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayConfigBumpEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterAuthGatewayConfigBumpEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterAuthGatewayConfigBumpEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterAuthGatewayConfigBumpEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterAuthGatewayConfigBumpEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterAuthGatewayConfigBumpEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayConfigBumpEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayConfigBumpEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayConfigBumpEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayConfigBumpEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayConfigBumpEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterAuthGatewayEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterAuthGatewayEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterAuthGatewayEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterAuthGatewayEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterAuthGatewayEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterAuthGatewayEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayKubeRbacProxyEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterAuthGatewayKubeRbacProxyEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayKubeRbacProxyEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterAuthGatewayKubeRbacProxyEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterAuthGatewayKubeRbacProxyEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterAuthGatewayKubeRbacProxyEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterAuthGatewayKubeRbacProxyEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterAuthGatewayKubeRbacProxyEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayKubeRbacProxyEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayKubeRbacProxyEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayKubeRbacProxyEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayKubeRbacProxyEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayKubeRbacProxyEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayOAuthProxyEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterAuthGatewayOAuthProxyEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayOAuthProxyEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterAuthGatewayOAuthProxyEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterAuthGatewayOAuthProxyEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterAuthGatewayOAuthProxyEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterAuthGatewayOAuthProxyEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterAuthGatewayOAuthProxyEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayOAuthProxyEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayOAuthProxyEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayOAuthProxyEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayOAuthProxyEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthGatewayOAuthProxyEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Deprecated. The value of this flag is ignored.
/// Identity provider container custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthIdentityProviderContainerResources {
/// Limits describes the maximum amount of compute resources allowed.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limits: Option<CheClusterAuthIdentityProviderContainerResourcesLimits>,
/// Requests describes the minimum amount of compute resources required.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub request: Option<CheClusterAuthIdentityProviderContainerResourcesRequest>,
}
/// Limits describes the maximum amount of compute resources allowed.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthIdentityProviderContainerResourcesLimits {
/// CPU, in cores. (500m = .5 cores)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<String>,
/// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<String>,
}
/// Requests describes the minimum amount of compute resources required.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthIdentityProviderContainerResourcesRequest {
/// CPU, in cores. (500m = .5 cores)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<String>,
/// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<String>,
}
/// Deprecated. The value of this flag is ignored.
/// Ingress custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthIdentityProviderIngress {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// Deprecated. The value of this flag is ignored.
/// Route custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterAuthIdentityProviderRoute {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Operator uses the domain to generate a hostname for a route.
/// In a conjunction with labels it creates a route, which is served by a non-default Ingress controller.
/// The generated host name will follow this pattern: `<route-name>-<route-namespace>.<domain>`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// Configuration settings related to the User Dashboard used by the Che installation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDashboard {
/// Warning message that will be displayed on the User Dashboard
#[serde(default, skip_serializing_if = "Option::is_none")]
pub warning: Option<String>,
}
/// Configuration settings related to the database used by the Che installation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabase {
/// PostgreSQL container custom settings
#[serde(default, skip_serializing_if = "Option::is_none", rename = "chePostgresContainerResources")]
pub che_postgres_container_resources: Option<CheClusterDatabaseChePostgresContainerResources>,
/// PostgreSQL database name that the Che server uses to connect to the DB. Defaults to `dbche`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "chePostgresDb")]
pub che_postgres_db: Option<String>,
/// PostgreSQL Database host name that the Che server uses to connect to.
/// Defaults is `postgres`. Override this value ONLY when using an external database. See field `externalDb`.
/// In the default case it will be automatically set by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "chePostgresHostName")]
pub che_postgres_host_name: Option<String>,
/// PostgreSQL password that the Che server uses to connect to the DB. When omitted or left blank, it will be set to an automatically generated value.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "chePostgresPassword")]
pub che_postgres_password: Option<String>,
/// PostgreSQL Database port that the Che server uses to connect to. Defaults to 5432.
/// Override this value ONLY when using an external database. See field `externalDb`. In the default case it will be automatically set by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "chePostgresPort")]
pub che_postgres_port: Option<String>,
/// The secret that contains PostgreSQL`user` and `password` that the Che server uses to connect to the DB.
/// When the secret is defined, the `chePostgresUser` and `chePostgresPassword` are ignored.
/// When the value is omitted or left blank, the one of following scenarios applies:
/// 1. `chePostgresUser` and `chePostgresPassword` are defined, then they will be used to connect to the DB.
/// 2. `chePostgresUser` or `chePostgresPassword` are not defined, then a new secret with the name `postgres-credentials`
/// will be created with default value of `pgche` for `user` and with an auto-generated value for `password`.
/// The secret must have `app.kubernetes.io/part-of=che.eclipse.org` label.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "chePostgresSecret")]
pub che_postgres_secret: Option<String>,
/// PostgreSQL user that the Che server uses to connect to the DB. Defaults to `pgche`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "chePostgresUser")]
pub che_postgres_user: Option<String>,
/// Instructs the Operator on whether to deploy a dedicated database.
/// By default, a dedicated PostgreSQL database is deployed as part of the Che installation. When `externalDb` is `true`, no dedicated database will be deployed by the
/// Operator and you will need to provide connection details to the external DB you are about to use. See also all the fields starting with: `chePostgres`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "externalDb")]
pub external_db: Option<bool>,
/// List of environment variables to set in the PostgreSQL container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "postgresEnv")]
pub postgres_env: Option<Vec<CheClusterDatabasePostgresEnv>>,
/// Overrides the container image used in the PostgreSQL database deployment. This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "postgresImage")]
pub postgres_image: Option<String>,
/// Overrides the image pull policy used in the PostgreSQL database deployment. Default value is `Always` for `nightly`, `next` or `latest` images, and `IfNotPresent` in other cases.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "postgresImagePullPolicy")]
pub postgres_image_pull_policy: Option<String>,
/// Indicates a PostgreSQL version image to use. Allowed values are: `9.6` and `13.3`.
/// Migrate your PostgreSQL database to switch from one version to another.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "postgresVersion")]
pub postgres_version: Option<String>,
/// Size of the persistent volume claim for database. Defaults to `1Gi`.
/// To update pvc storageclass that provisions it must support resize when Eclipse Che has been already deployed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pvcClaimSize")]
pub pvc_claim_size: Option<String>,
}
/// PostgreSQL container custom settings
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabaseChePostgresContainerResources {
/// Limits describes the maximum amount of compute resources allowed.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limits: Option<CheClusterDatabaseChePostgresContainerResourcesLimits>,
/// Requests describes the minimum amount of compute resources required.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub request: Option<CheClusterDatabaseChePostgresContainerResourcesRequest>,
}
/// Limits describes the maximum amount of compute resources allowed.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabaseChePostgresContainerResourcesLimits {
/// CPU, in cores. (500m = .5 cores)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<String>,
/// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<String>,
}
/// Requests describes the minimum amount of compute resources required.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabaseChePostgresContainerResourcesRequest {
/// CPU, in cores. (500m = .5 cores)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<String>,
/// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<String>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabasePostgresEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterDatabasePostgresEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabasePostgresEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterDatabasePostgresEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterDatabasePostgresEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterDatabasePostgresEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterDatabasePostgresEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterDatabasePostgresEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabasePostgresEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabasePostgresEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabasePostgresEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabasePostgresEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDatabasePostgresEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// DevWorkspace operator configuration
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspace {
/// Overrides the container image used in the DevWorkspace controller deployment.
/// This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "controllerImage")]
pub controller_image: Option<String>,
/// Deploys the DevWorkspace Operator in the cluster.
/// Does nothing when a matching version of the Operator is already installed.
/// Fails when a non-matching version of the Operator is already installed.
pub enable: bool,
/// List of environment variables to set in the DevWorkspace container.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub env: Option<Vec<CheClusterDevWorkspaceEnv>>,
/// Maximum number of the running workspaces per user.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "runningLimit")]
pub running_limit: Option<String>,
/// Idle timeout for workspaces in seconds.
/// This timeout is the duration after which a workspace will be idled if there is no activity.
/// To disable workspace idling due to inactivity, set this value to -1.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secondsOfInactivityBeforeIdling")]
pub seconds_of_inactivity_before_idling: Option<i32>,
/// Run timeout for workspaces in seconds.
/// This timeout is the maximum duration a workspace runs.
/// To disable workspace run timeout, set this value to -1.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secondsOfRunBeforeIdling")]
pub seconds_of_run_before_idling: Option<i32>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspaceEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterDevWorkspaceEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspaceEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterDevWorkspaceEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterDevWorkspaceEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterDevWorkspaceEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterDevWorkspaceEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterDevWorkspaceEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspaceEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspaceEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspaceEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspaceEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterDevWorkspaceEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// A configuration that allows users to work with remote Git repositories.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterGitServices {
/// Enables users to work with repositories hosted on Bitbucket (bitbucket.org or self-hosted).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub bitbucket: Option<Vec<CheClusterGitServicesBitbucket>>,
/// Enables users to work with repositories hosted on GitHub (github.com or GitHub Enterprise).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub github: Option<Vec<CheClusterGitServicesGithub>>,
/// Enables users to work with repositories hosted on GitLab (gitlab.com or self-hosted).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub gitlab: Option<Vec<CheClusterGitServicesGitlab>>,
}
/// BitBucketService enables users to work with repositories hosted on Bitbucket (bitbucket.org or self-hosted).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterGitServicesBitbucket {
/// Bitbucket server endpoint URL.
/// Deprecated in favor of `che.eclipse.org/scm-server-endpoint` annotation.
/// See the following page: <https://www.eclipse.org/che/docs/stable/administration-guide/configuring-oauth-1-for-a-bitbucket-server/.>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
/// Kubernetes secret, that contains Base64-encoded Bitbucket OAuth 1.0 or OAuth 2.0 data.
/// See the following pages for details: <https://www.eclipse.org/che/docs/stable/administration-guide/configuring-oauth-1-for-a-bitbucket-server/>
/// and <https://www.eclipse.org/che/docs/stable/administration-guide/configuring-oauth-2-for-the-bitbucket-cloud/.>
#[serde(rename = "secretName")]
pub secret_name: String,
}
/// GitHubService enables users to work with repositories hosted on GitHub (GitHub.com or GitHub Enterprise).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterGitServicesGithub {
/// GitHub server endpoint URL.
/// Deprecated in favor of `che.eclipse.org/scm-server-endpoint` annotation.
/// See the following page for details: <https://www.eclipse.org/che/docs/stable/administration-guide/configuring-oauth-2-for-github/.>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
/// Kubernetes secret, that contains Base64-encoded GitHub OAuth Client id and GitHub OAuth Client secret.
/// See the following page for details: <https://www.eclipse.org/che/docs/stable/administration-guide/configuring-oauth-2-for-github/.>
#[serde(rename = "secretName")]
pub secret_name: String,
}
/// GitLabService enables users to work with repositories hosted on GitLab (gitlab.com or self-hosted).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterGitServicesGitlab {
/// GitLab server endpoint URL.
/// Deprecated in favor of `che.eclipse.org/scm-server-endpoint` annotation.
/// See the following page: <https://www.eclipse.org/che/docs/stable/administration-guide/configuring-oauth-2-for-gitlab/.>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
/// Kubernetes secret, that contains Base64-encoded GitHub Application id and GitLab Application Client secret.
/// See the following page: <https://www.eclipse.org/che/docs/stable/administration-guide/configuring-oauth-2-for-gitlab/.>
#[serde(rename = "secretName")]
pub secret_name: String,
}
/// Kubernetes Image Puller configuration
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterImagePuller {
/// Install and configure the Community Supported Kubernetes Image Puller Operator. When set to `true` and no spec is provided,
/// it will create a default KubernetesImagePuller object to be managed by the Operator.
/// When set to `false`, the KubernetesImagePuller object will be deleted, and the Operator will be uninstalled,
/// regardless of whether a spec is provided.
/// If the `spec.images` field is empty, a set of recommended workspace-related images will be automatically detected and
/// pre-pulled after installation.
/// Note that while this Operator and its behavior is community-supported, its payload may be commercially-supported
/// for pulling commercially-supported images.
pub enable: bool,
/// A KubernetesImagePullerSpec to configure the image puller in the CheCluster
#[serde(default, skip_serializing_if = "Option::is_none")]
pub spec: Option<CheClusterImagePullerSpec>,
}
/// A KubernetesImagePullerSpec to configure the image puller in the CheCluster
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterImagePullerSpec {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub affinity: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cachingCPULimit")]
pub caching_cpu_limit: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cachingCPURequest")]
pub caching_cpu_request: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cachingIntervalHours")]
pub caching_interval_hours: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cachingMemoryLimit")]
pub caching_memory_limit: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cachingMemoryRequest")]
pub caching_memory_request: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapName")]
pub config_map_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "daemonsetName")]
pub daemonset_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "deploymentName")]
pub deployment_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullSecrets")]
pub image_pull_secrets: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullerImage")]
pub image_puller_image: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub images: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
pub node_selector: Option<String>,
}
/// Configuration settings specific to Che installations made on upstream Kubernetes.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterK8s {
/// Ingress class that will define the which controller will manage ingresses. Defaults to `nginx`.
/// NB: This drives the `kubernetes.io/ingress.class` annotation on Che-related ingresses.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "ingressClass")]
pub ingress_class: Option<String>,
/// Global ingress domain for a Kubernetes cluster. This MUST be explicitly specified: there are no defaults.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "ingressDomain")]
pub ingress_domain: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Strategy for ingress creation. Options are: `multi-host` (host is explicitly provided in ingress),
/// `single-host` (host is provided, path-based rules) and `default-host` (no host is provided, path-based rules).
/// Defaults to `multi-host` Deprecated in favor of `serverExposureStrategy` in the `server` section,
/// which defines this regardless of the cluster type. When both are defined, the `serverExposureStrategy` option takes precedence.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "ingressStrategy")]
pub ingress_strategy: Option<String>,
/// The FSGroup in which the Che Pod and workspace Pods containers runs in. Default value is `1724`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "securityContextFsGroup")]
pub security_context_fs_group: Option<String>,
/// ID of the user the Che Pod and workspace Pods containers run as. Default value is `1724`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "securityContextRunAsUser")]
pub security_context_run_as_user: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// When the serverExposureStrategy is set to `single-host`, the way the server, registries and workspaces are exposed is further configured by this property.
/// The possible values are `native`, which means that the server and workspaces are exposed using ingresses on K8s
/// or `gateway` where the server and workspaces are exposed using a custom gateway based on link:<https://doc.traefik.io/traefik/[Traefik].>
/// All the endpoints whether backed by the ingress or gateway `route` always point to the subpaths on the same domain. Defaults to `native`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "singleHostExposureType")]
pub single_host_exposure_type: Option<String>,
/// Name of a secret that will be used to setup ingress TLS termination when TLS is enabled.
/// When the field is empty string, the default cluster certificate will be used. See also the `tlsSupport` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "tlsSecretName")]
pub tls_secret_name: Option<String>,
}
/// Configuration settings related to the metrics collection used by the Che installation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterMetrics {
/// Enables `metrics` the Che server endpoint. Default to `true`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub enable: Option<bool>,
}
/// General configuration settings related to the Che server, the plugin and devfile registries
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServer {
/// Optional host name, or URL, to an alternate container registry to pull images from.
/// This value overrides the container registry host name defined in all the default container images involved in a Che deployment.
/// This is particularly useful to install Che in a restricted environment.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "airGapContainerRegistryHostname")]
pub air_gap_container_registry_hostname: Option<String>,
/// Optional repository name of an alternate container registry to pull images from.
/// This value overrides the container registry organization defined in all the default container images involved in a Che deployment.
/// This is particularly useful to install Eclipse Che in a restricted environment.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "airGapContainerRegistryOrganization")]
pub air_gap_container_registry_organization: Option<String>,
/// Indicates if is allowed to automatically create a user namespace.
/// If it set to false, then user namespace must be pre-created by a cluster administrator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "allowAutoProvisionUserNamespace")]
pub allow_auto_provision_user_namespace: Option<bool>,
/// Deprecated. The value of this flag is ignored.
/// Defines that a user is allowed to specify a Kubernetes namespace, or an OpenShift project, which differs from the default.
/// It's NOT RECOMMENDED to set to `true` without OpenShift OAuth configured. The OpenShift infrastructure also uses this property.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "allowUserDefinedWorkspaceNamespaces")]
pub allow_user_defined_workspace_namespaces: Option<bool>,
/// A comma-separated list of ClusterRoles that will be assigned to Che ServiceAccount.
/// Each role must have `app.kubernetes.io/part-of=che.eclipse.org` label.
/// Be aware that the Che Operator has to already have all permissions in these ClusterRoles to grant them.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheClusterRoles")]
pub che_cluster_roles: Option<String>,
/// Enables the debug mode for Che server. Defaults to `false`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheDebug")]
pub che_debug: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Specifies a variation of the installation. The options are `che` for upstream Che installations or
/// `devspaces` for Red Hat OpenShift Dev Spaces (formerly Red Hat CodeReady Workspaces) installation
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheFlavor")]
pub che_flavor: Option<String>,
/// Public host name of the installed Che server. When value is omitted, the value it will be automatically set by the Operator.
/// See the `cheHostTLSSecret` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheHost")]
pub che_host: Option<String>,
/// Name of a secret containing certificates to secure ingress or route for the custom host name of the installed Che server.
/// The secret must have `app.kubernetes.io/part-of=che.eclipse.org` label.
/// See the `cheHost` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheHostTLSSecret")]
pub che_host_tls_secret: Option<String>,
/// Overrides the container image used in Che deployment. This does NOT include the container image tag.
/// Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheImage")]
pub che_image: Option<String>,
/// Overrides the image pull policy used in Che deployment.
/// Default value is `Always` for `nightly`, `next` or `latest` images, and `IfNotPresent` in other cases.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheImagePullPolicy")]
pub che_image_pull_policy: Option<String>,
/// Overrides the tag of the container image used in Che deployment.
/// Omit it or leave it empty to use the default image tag provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheImageTag")]
pub che_image_tag: Option<String>,
/// Log level for the Che server: `INFO` or `DEBUG`. Defaults to `INFO`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheLogLevel")]
pub che_log_level: Option<String>,
/// List of environment variables to set in the Che server container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheServerEnv")]
pub che_server_env: Option<Vec<CheClusterServerCheServerEnv>>,
/// The Che server ingress custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheServerIngress")]
pub che_server_ingress: Option<CheClusterServerCheServerIngress>,
/// The Che server route custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheServerRoute")]
pub che_server_route: Option<CheClusterServerCheServerRoute>,
/// Custom cluster role bound to the user for the Che workspaces.
/// The role must have `app.kubernetes.io/part-of=che.eclipse.org` label.
/// The default roles are used when omitted or left blank.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheWorkspaceClusterRole")]
pub che_workspace_cluster_role: Option<String>,
/// Map of additional environment variables that will be applied in the generated `che` ConfigMap to be used by the Che server,
/// in addition to the values already generated from other fields of the `CheCluster` custom resource (CR).
/// When `customCheProperties` contains a property that would be normally generated in `che` ConfigMap from other CR fields,
/// the value defined in the `customCheProperties` is used instead.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "customCheProperties")]
pub custom_che_properties: Option<BTreeMap<String, String>>,
/// Overrides the CPU limit used in the dashboard deployment.
/// In cores. (500m = .5 cores). Default to 500m.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardCpuLimit")]
pub dashboard_cpu_limit: Option<String>,
/// Overrides the CPU request used in the dashboard deployment.
/// In cores. (500m = .5 cores). Default to 100m.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardCpuRequest")]
pub dashboard_cpu_request: Option<String>,
/// List of environment variables to set in the dashboard container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardEnv")]
pub dashboard_env: Option<Vec<CheClusterServerDashboardEnv>>,
/// Overrides the container image used in the dashboard deployment.
/// This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardImage")]
pub dashboard_image: Option<String>,
/// Overrides the image pull policy used in the dashboard deployment.
/// Default value is `Always` for `nightly`, `next` or `latest` images, and `IfNotPresent` in other cases.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardImagePullPolicy")]
pub dashboard_image_pull_policy: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Dashboard ingress custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardIngress")]
pub dashboard_ingress: Option<CheClusterServerDashboardIngress>,
/// Overrides the memory limit used in the dashboard deployment. Defaults to 256Mi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardMemoryLimit")]
pub dashboard_memory_limit: Option<String>,
/// Overrides the memory request used in the dashboard deployment. Defaults to 16Mi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardMemoryRequest")]
pub dashboard_memory_request: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Dashboard route custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dashboardRoute")]
pub dashboard_route: Option<CheClusterServerDashboardRoute>,
/// Overrides the CPU limit used in the devfile registry deployment.
/// In cores. (500m = .5 cores). Default to 500m.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryCpuLimit")]
pub devfile_registry_cpu_limit: Option<String>,
/// Overrides the CPU request used in the devfile registry deployment.
/// In cores. (500m = .5 cores). Default to 100m.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryCpuRequest")]
pub devfile_registry_cpu_request: Option<String>,
/// List of environment variables to set in the plugin registry container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryEnv")]
pub devfile_registry_env: Option<Vec<CheClusterServerDevfileRegistryEnv>>,
/// Overrides the container image used in the devfile registry deployment.
/// This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryImage")]
pub devfile_registry_image: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// The devfile registry ingress custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryIngress")]
pub devfile_registry_ingress: Option<CheClusterServerDevfileRegistryIngress>,
/// Overrides the memory limit used in the devfile registry deployment. Defaults to 256Mi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryMemoryLimit")]
pub devfile_registry_memory_limit: Option<String>,
/// Overrides the memory request used in the devfile registry deployment. Defaults to 16Mi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryMemoryRequest")]
pub devfile_registry_memory_request: Option<String>,
/// Overrides the image pull policy used in the devfile registry deployment.
/// Default value is `Always` for `nightly`, `next` or `latest` images, and `IfNotPresent` in other cases.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryPullPolicy")]
pub devfile_registry_pull_policy: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// The devfile registry route custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryRoute")]
pub devfile_registry_route: Option<CheClusterServerDevfileRegistryRoute>,
/// Deprecated in favor of `externalDevfileRegistries` fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryUrl")]
pub devfile_registry_url: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Disable internal cluster SVC names usage to communicate between components to speed up the traffic and avoid proxy issues.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "disableInternalClusterSVCNames")]
pub disable_internal_cluster_svc_names: Option<bool>,
/// External devfile registries, that serves sample, ready-to-use devfiles.
/// Configure this in addition to a dedicated devfile registry (when `externalDevfileRegistry` is `false`)
/// or instead of it (when `externalDevfileRegistry` is `true`)
#[serde(default, skip_serializing_if = "Option::is_none", rename = "externalDevfileRegistries")]
pub external_devfile_registries: Option<Vec<CheClusterServerExternalDevfileRegistries>>,
/// Instructs the Operator on whether to deploy a dedicated devfile registry server.
/// By default, a dedicated devfile registry server is started. When `externalDevfileRegistry` is `true`,
/// no such dedicated server will be started by the Operator and configure at least one
/// devfile registry with `externalDevfileRegistries` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "externalDevfileRegistry")]
pub external_devfile_registry: Option<bool>,
/// Instructs the Operator on whether to deploy a dedicated plugin registry server.
/// By default, a dedicated plugin registry server is started. When `externalPluginRegistry` is `true`, no such dedicated server
/// will be started by the Operator and you will have to manually set the `pluginRegistryUrl` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "externalPluginRegistry")]
pub external_plugin_registry: Option<bool>,
/// When enabled, the certificate from `che-git-self-signed-cert` ConfigMap will be propagated to the Che components and provide particular configuration for Git.
/// Note, the `che-git-self-signed-cert` ConfigMap must have `app.kubernetes.io/part-of=che.eclipse.org` label.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gitSelfSignedCert")]
pub git_self_signed_cert: Option<bool>,
/// List of hosts that will be reached directly, bypassing the proxy.
/// Specify wild card domain use the following form `.<DOMAIN>` and `|` as delimiter, for example: `localhost|.my.host.com|123.42.12.32`
/// Only use when configuring a proxy is required. Operator respects OpenShift cluster wide proxy configuration and no additional configuration is required,
/// but defining `nonProxyHosts` in a custom resource leads to merging non proxy hosts lists from the cluster proxy configuration and ones defined in the custom resources.
/// See the doc <https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html.> See also the `proxyURL` fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nonProxyHosts")]
pub non_proxy_hosts: Option<String>,
/// Open VSX registry URL. If omitted an embedded instance will be used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "openVSXRegistryURL")]
pub open_vsx_registry_url: Option<String>,
/// Overrides the CPU limit used in the plugin registry deployment.
/// In cores. (500m = .5 cores). Default to 500m.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryCpuLimit")]
pub plugin_registry_cpu_limit: Option<String>,
/// Overrides the CPU request used in the plugin registry deployment.
/// In cores. (500m = .5 cores). Default to 100m.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryCpuRequest")]
pub plugin_registry_cpu_request: Option<String>,
/// List of environment variables to set in the devfile registry container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryEnv")]
pub plugin_registry_env: Option<Vec<CheClusterServerPluginRegistryEnv>>,
/// Overrides the container image used in the plugin registry deployment.
/// This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryImage")]
pub plugin_registry_image: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Plugin registry ingress custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryIngress")]
pub plugin_registry_ingress: Option<CheClusterServerPluginRegistryIngress>,
/// Overrides the memory limit used in the plugin registry deployment. Defaults to 1536Mi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryMemoryLimit")]
pub plugin_registry_memory_limit: Option<String>,
/// Overrides the memory request used in the plugin registry deployment. Defaults to 16Mi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryMemoryRequest")]
pub plugin_registry_memory_request: Option<String>,
/// Overrides the image pull policy used in the plugin registry deployment.
/// Default value is `Always` for `nightly`, `next` or `latest` images, and `IfNotPresent` in other cases.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryPullPolicy")]
pub plugin_registry_pull_policy: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Plugin registry route custom settings.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryRoute")]
pub plugin_registry_route: Option<CheClusterServerPluginRegistryRoute>,
/// Public URL of the plugin registry that serves sample ready-to-use devfiles.
/// Set this ONLY when a use of an external devfile registry is needed.
/// See the `externalPluginRegistry` field. By default, this will be automatically calculated by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryUrl")]
pub plugin_registry_url: Option<String>,
/// Password of the proxy server.
/// Only use when proxy configuration is required. See the `proxyURL`, `proxyUser` and `proxySecret` fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "proxyPassword")]
pub proxy_password: Option<String>,
/// Port of the proxy server. Only use when configuring a proxy is required. See also the `proxyURL` and `nonProxyHosts` fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "proxyPort")]
pub proxy_port: Option<String>,
/// The secret that contains `user` and `password` for a proxy server. When the secret is defined, the `proxyUser` and `proxyPassword` are ignored.
/// The secret must have `app.kubernetes.io/part-of=che.eclipse.org` label.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "proxySecret")]
pub proxy_secret: Option<String>,
/// URL (protocol+host name) of the proxy server. This drives the appropriate changes in the `JAVA_OPTS` and `https(s)_proxy` variables
/// in the Che server and workspaces containers.
/// Only use when configuring a proxy is required. Operator respects OpenShift cluster wide proxy configuration
/// and no additional configuration is required, but defining `proxyUrl` in a custom resource leads to overrides the cluster proxy configuration
/// with fields `proxyUrl`, `proxyPort`, `proxyUser` and `proxyPassword` from the custom resource.
/// See the doc <https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html.> See also the `proxyPort` and `nonProxyHosts` fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "proxyURL")]
pub proxy_url: Option<String>,
/// User name of the proxy server. Only use when configuring a proxy is required. See also the `proxyURL`, `proxyPassword` and `proxySecret` fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "proxyUser")]
pub proxy_user: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// The Che Operator will automatically detect whether the router certificate is self-signed and propagate it to other components, such as the Che server.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "selfSignedCert")]
pub self_signed_cert: Option<bool>,
/// Overrides the CPU limit used in the Che server deployment
/// In cores. (500m = .5 cores). Default to 1.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "serverCpuLimit")]
pub server_cpu_limit: Option<String>,
/// Overrides the CPU request used in the Che server deployment
/// In cores. (500m = .5 cores). Default to 100m.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "serverCpuRequest")]
pub server_cpu_request: Option<String>,
/// Deprecated. The value of this flag is ignored.
/// Sets the server and workspaces exposure type.
/// Possible values are `multi-host`, `single-host`, `default-host`. Defaults to `multi-host`, which creates a separate ingress, or OpenShift routes, for every required endpoint.
/// `single-host` makes Che exposed on a single host name with workspaces exposed on subpaths.
/// Read the docs to learn about the limitations of this approach.
/// Also consult the `singleHostExposureType` property to further configure how the Operator and the Che server make that happen on Kubernetes.
/// `default-host` exposes the Che server on the host of the cluster. Read the docs to learn about the limitations of this approach.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "serverExposureStrategy")]
pub server_exposure_strategy: Option<String>,
/// Overrides the memory limit used in the Che server deployment. Defaults to 1Gi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "serverMemoryLimit")]
pub server_memory_limit: Option<String>,
/// Overrides the memory request used in the Che server deployment. Defaults to 512Mi.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "serverMemoryRequest")]
pub server_memory_request: Option<String>,
/// Name of the ConfigMap with public certificates to add to Java trust store of the Che server.
/// This is often required when adding the OpenShift OAuth provider, which has HTTPS endpoint signed with self-signed cert.
/// The Che server must be aware of its CA cert to be able to request it. This is disabled by default.
/// The Config Map must have `app.kubernetes.io/part-of=che.eclipse.org` label.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "serverTrustStoreConfigMapName")]
pub server_trust_store_config_map_name: Option<String>,
/// The labels that need to be present in the ConfigMaps representing the gateway configuration.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "singleHostGatewayConfigMapLabels")]
pub single_host_gateway_config_map_labels: Option<BTreeMap<String, String>>,
/// The image used for the gateway sidecar that provides configuration to the gateway. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "singleHostGatewayConfigSidecarImage")]
pub single_host_gateway_config_sidecar_image: Option<String>,
/// The image used for the gateway in the single host mode. Omit it or leave it empty to use the default container image provided by the Operator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "singleHostGatewayImage")]
pub single_host_gateway_image: Option<String>,
/// Deprecated. Instructs the Operator to deploy Che in TLS mode. This is enabled by default. Disabling TLS sometimes cause malfunction of some Che components.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "tlsSupport")]
pub tls_support: Option<bool>,
/// Deprecated in favor of `disableInternalClusterSVCNames`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "useInternalClusterSVCNames")]
pub use_internal_cluster_svc_names: Option<bool>,
/// Default components applied to DevWorkspaces.
/// These default components are meant to be used when a Devfile does not contain any components.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspaceDefaultComponents")]
pub workspace_default_components: Option<Vec<CheClusterServerWorkspaceDefaultComponents>>,
/// The default editor to workspace create with. It could be a plugin ID or a URI.
/// The plugin ID must have `publisher/plugin/version`.
/// The URI must start from `http`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspaceDefaultEditor")]
pub workspace_default_editor: Option<String>,
/// Defines Kubernetes default namespace in which user's workspaces are created for a case when a user does not override it.
/// It's possible to use `<username>`, `<userid>` and `<workspaceid>` placeholders, such as che-workspace-<username>.
/// In that case, a new namespace will be created for each user or workspace.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspaceNamespaceDefault")]
pub workspace_namespace_default: Option<String>,
/// The node selector that limits the nodes that can run the workspace pods.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspacePodNodeSelector")]
pub workspace_pod_node_selector: Option<BTreeMap<String, String>>,
/// The pod tolerations put on the workspace pods to limit where the workspace pods can run.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspacePodTolerations")]
pub workspace_pod_tolerations: Option<Vec<CheClusterServerWorkspacePodTolerations>>,
/// Default plug-ins applied to Devworkspaces.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspacesDefaultPlugins")]
pub workspaces_default_plugins: Option<Vec<CheClusterServerWorkspacesDefaultPlugins>>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterServerCheServerEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterServerCheServerEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterServerCheServerEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterServerCheServerEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterServerCheServerEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterServerCheServerEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// The Che server ingress custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerIngress {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// The Che server route custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerCheServerRoute {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Operator uses the domain to generate a hostname for a route.
/// In a conjunction with labels it creates a route, which is served by a non-default Ingress controller.
/// The generated host name will follow this pattern: `<route-name>-<route-namespace>.<domain>`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterServerDashboardEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterServerDashboardEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterServerDashboardEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterServerDashboardEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterServerDashboardEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterServerDashboardEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Deprecated. The value of this flag is ignored.
/// Dashboard ingress custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardIngress {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// Deprecated. The value of this flag is ignored.
/// Dashboard route custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDashboardRoute {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Operator uses the domain to generate a hostname for a route.
/// In a conjunction with labels it creates a route, which is served by a non-default Ingress controller.
/// The generated host name will follow this pattern: `<route-name>-<route-namespace>.<domain>`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterServerDevfileRegistryEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterServerDevfileRegistryEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterServerDevfileRegistryEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterServerDevfileRegistryEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterServerDevfileRegistryEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterServerDevfileRegistryEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Deprecated. The value of this flag is ignored.
/// The devfile registry ingress custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryIngress {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// Deprecated. The value of this flag is ignored.
/// The devfile registry route custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerDevfileRegistryRoute {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Operator uses the domain to generate a hostname for a route.
/// In a conjunction with labels it creates a route, which is served by a non-default Ingress controller.
/// The generated host name will follow this pattern: `<route-name>-<route-namespace>.<domain>`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// Settings for a configuration of the external devfile registries.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerExternalDevfileRegistries {
/// Public URL of the devfile registry.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryEnv {
/// Name of the environment variable.
/// May consist of any printable ASCII characters except '='.
pub name: String,
/// Variable references $(VAR_NAME) are expanded
/// using the previously defined environment variables in the container and
/// any service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. Double $$ are reduced
/// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
/// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
/// Escaped references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
pub value_from: Option<CheClusterServerPluginRegistryEnvValueFrom>,
}
/// Source for the environment variable's value. Cannot be used if value is not empty.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryEnvValueFrom {
/// Selects a key of a ConfigMap.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
pub config_map_key_ref: Option<CheClusterServerPluginRegistryEnvValueFromConfigMapKeyRef>,
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
pub field_ref: Option<CheClusterServerPluginRegistryEnvValueFromFieldRef>,
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileKeyRef")]
pub file_key_ref: Option<CheClusterServerPluginRegistryEnvValueFromFileKeyRef>,
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
pub resource_field_ref: Option<CheClusterServerPluginRegistryEnvValueFromResourceFieldRef>,
/// Selects a key of a secret in the pod's namespace
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
pub secret_key_ref: Option<CheClusterServerPluginRegistryEnvValueFromSecretKeyRef>,
}
/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryEnvValueFromConfigMapKeyRef {
/// The key to select.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the ConfigMap or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryEnvValueFromFieldRef {
/// Version of the schema the FieldPath is written in terms of, defaults to "v1".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
pub api_version: Option<String>,
/// Path of the field to select in the specified API version.
#[serde(rename = "fieldPath")]
pub field_path: String,
}
/// FileKeyRef selects a key of the env file.
/// Requires the EnvFiles feature gate to be enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryEnvValueFromFileKeyRef {
/// The key within the env file. An invalid key will prevent the pod from starting.
/// The keys defined within a source may consist of any printable ASCII characters except '='.
/// During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
pub key: String,
/// Specify whether the file or its key must be defined. If the file or key
/// does not exist, then the env var is not published.
/// If optional is set to true and the specified key does not exist,
/// the environment variable will not be set in the Pod's containers.
///
/// If optional is set to false and the specified key does not exist,
/// an error will be returned during Pod creation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
/// The path within the volume from which to select the file.
/// Must be relative and may not contain the '..' path or start with '..'.
pub path: String,
/// The name of the volume mount containing the env file.
#[serde(rename = "volumeName")]
pub volume_name: String,
}
/// Selects a resource of the container: only resources limits and requests
/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryEnvValueFromResourceFieldRef {
/// Container name: required for volumes, optional for env vars
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
pub container_name: Option<String>,
/// Specifies the output format of the exposed resources, defaults to "1"
#[serde(default, skip_serializing_if = "Option::is_none")]
pub divisor: Option<IntOrString>,
/// Required: resource to select
pub resource: String,
}
/// Selects a key of a secret in the pod's namespace
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryEnvValueFromSecretKeyRef {
/// The key of the secret to select from. Must be a valid secret key.
pub key: String,
/// Name of the referent.
/// This field is effectively required, but due to backwards compatibility is
/// allowed to be empty. Instances of this type with an empty value here are
/// almost certainly wrong.
/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Specify whether the Secret or its key must be defined
#[serde(default, skip_serializing_if = "Option::is_none")]
pub optional: Option<bool>,
}
/// Deprecated. The value of this flag is ignored.
/// Plugin registry ingress custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryIngress {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
/// Deprecated. The value of this flag is ignored.
/// Plugin registry route custom settings.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerPluginRegistryRoute {
/// Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Operator uses the domain to generate a hostname for a route.
/// In a conjunction with labels it creates a route, which is served by a non-default Ingress controller.
/// The generated host name will follow this pattern: `<route-name>-<route-namespace>.<domain>`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Comma separated list of labels that can be used to organize and categorize objects by scoping and selecting.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponents {
/// Map of implementation-dependant free-form YAML attributes.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Type of component
#[serde(default, skip_serializing_if = "Option::is_none", rename = "componentType")]
pub component_type: Option<CheClusterServerWorkspaceDefaultComponentsComponentType>,
/// Allows adding and configuring devworkspace-related containers
#[serde(default, skip_serializing_if = "Option::is_none")]
pub container: Option<CheClusterServerWorkspaceDefaultComponentsContainer>,
/// Custom component whose logic is implementation-dependant
/// and should be provided by the user
/// possibly through some dedicated controller
#[serde(default, skip_serializing_if = "Option::is_none")]
pub custom: Option<CheClusterServerWorkspaceDefaultComponentsCustom>,
/// Allows specifying the definition of an image for outer loop builds
#[serde(default, skip_serializing_if = "Option::is_none")]
pub image: Option<CheClusterServerWorkspaceDefaultComponentsImage>,
/// Allows importing into the devworkspace the Kubernetes resources
/// defined in a given manifest. For example this allows reusing the Kubernetes
/// definitions used to deploy some runtime components in production.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kubernetes: Option<CheClusterServerWorkspaceDefaultComponentsKubernetes>,
/// Mandatory name that allows referencing the component
/// from other elements (such as commands) or from an external
/// devfile that may reference this component through a parent or a plugin.
pub name: String,
/// Allows importing into the devworkspace the OpenShift resources
/// defined in a given manifest. For example this allows reusing the OpenShift
/// definitions used to deploy some runtime components in production.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub openshift: Option<CheClusterServerWorkspaceDefaultComponentsOpenshift>,
/// Allows importing a plugin.
///
/// Plugins are mainly imported devfiles that contribute components, commands
/// and events as a consistent single unit. They are defined in either YAML files
/// following the devfile syntax,
/// or as `DevWorkspaceTemplate` Kubernetes Custom Resources
#[serde(default, skip_serializing_if = "Option::is_none")]
pub plugin: Option<CheClusterServerWorkspaceDefaultComponentsPlugin>,
/// Allows specifying the definition of a volume
/// shared by several other components
#[serde(default, skip_serializing_if = "Option::is_none")]
pub volume: Option<CheClusterServerWorkspaceDefaultComponentsVolume>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsComponentType {
Container,
Kubernetes,
Openshift,
Volume,
Image,
Plugin,
Custom,
}
/// Allows adding and configuring devworkspace-related containers
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsContainer {
/// Annotations that should be added to specific resources for this container
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<CheClusterServerWorkspaceDefaultComponentsContainerAnnotation>,
/// The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.
///
/// Defaults to an empty array, meaning use whatever is defined in the image.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub args: Option<Vec<String>>,
/// The command to run in the dockerimage component instead of the default one provided in the image.
///
/// Defaults to an empty array, meaning use whatever is defined in the image.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub command: Option<Vec<String>>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cpuLimit")]
pub cpu_limit: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cpuRequest")]
pub cpu_request: Option<String>,
/// Specify if a container should run in its own separated pod,
/// instead of running as part of the main development environment pod.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dedicatedPod")]
pub dedicated_pod: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoints: Option<Vec<CheClusterServerWorkspaceDefaultComponentsContainerEndpoints>>,
/// Environment variables used in this container.
///
/// The following variables are reserved and cannot be overridden via env:
///
/// - `$PROJECTS_ROOT`
///
/// - `$PROJECT_SOURCE`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub env: Option<Vec<CheClusterServerWorkspaceDefaultComponentsContainerEnv>>,
pub image: String,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "memoryLimit")]
pub memory_limit: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "memoryRequest")]
pub memory_request: Option<String>,
/// Toggles whether or not the project source code should
/// be mounted in the component.
///
/// Defaults to true for all component types except plugins and components that set `dedicatedPod` to true.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "mountSources")]
pub mount_sources: Option<bool>,
/// Optional specification of the path in the container where
/// project sources should be transferred/mounted when `mountSources` is `true`.
/// When omitted, the default value of /projects is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sourceMapping")]
pub source_mapping: Option<String>,
/// List of volumes mounts that should be mounted is this container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeMounts")]
pub volume_mounts: Option<Vec<CheClusterServerWorkspaceDefaultComponentsContainerVolumeMounts>>,
}
/// Annotations that should be added to specific resources for this container
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsContainerAnnotation {
/// Annotations to be added to deployment
#[serde(default, skip_serializing_if = "Option::is_none")]
pub deployment: Option<BTreeMap<String, String>>,
/// Annotations to be added to service
#[serde(default, skip_serializing_if = "Option::is_none")]
pub service: Option<BTreeMap<String, String>>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsContainerEndpoints {
/// Annotations to be added to Kubernetes Ingress or Openshift Route
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<BTreeMap<String, String>>,
/// Map of implementation-dependant string-based free-form attributes.
///
/// Examples of Che-specific attributes:
///
/// - cookiesAuthEnabled: "true" / "false",
///
/// - type: "terminal" / "ide" / "ide-dev",
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Describes how the endpoint should be exposed on the network.
///
/// - `public` means that the endpoint will be exposed on the public network, typically through
/// a K8S ingress or an OpenShift route.
///
/// - `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD,
/// typically by K8S services, to be consumed by other elements running
/// on the same cloud internal network.
///
/// - `none` means that the endpoint will not be exposed and will only be accessible
/// inside the main devworkspace POD, on a local address.
///
/// Default value is `public`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exposure: Option<CheClusterServerWorkspaceDefaultComponentsContainerEndpointsExposure>,
pub name: String,
/// Path of the endpoint URL
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Describes the application and transport protocols of the traffic that will go through this endpoint.
///
/// - `http`: Endpoint will have `http` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `https` when the `secure` field is set to `true`.
///
/// - `https`: Endpoint will have `https` traffic, typically on a TCP connection.
///
/// - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.
///
/// - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.
///
/// - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.
///
/// - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.
///
/// Default value is `http`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub protocol: Option<CheClusterServerWorkspaceDefaultComponentsContainerEndpointsProtocol>,
/// Describes whether the endpoint should be secured and protected by some
/// authentication process. This requires a protocol of `https` or `wss`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
/// Port number to be used within the container component. The same port cannot
/// be used by two different container components.
#[serde(rename = "targetPort")]
pub target_port: i64,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsContainerEndpointsExposure {
#[serde(rename = "public")]
Public,
#[serde(rename = "internal")]
Internal,
#[serde(rename = "none")]
None,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsContainerEndpointsProtocol {
#[serde(rename = "http")]
Http,
#[serde(rename = "https")]
Https,
#[serde(rename = "ws")]
Ws,
#[serde(rename = "wss")]
Wss,
#[serde(rename = "tcp")]
Tcp,
#[serde(rename = "udp")]
Udp,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsContainerEnv {
pub name: String,
pub value: String,
}
/// Volume that should be mounted to a component container
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsContainerVolumeMounts {
/// The volume mount name is the name of an existing `Volume` component.
/// If several containers mount the same volume name
/// then they will reuse the same volume and will be able to access to the same files.
pub name: String,
/// The path in the component container where the volume should be mounted.
/// If not path is mentioned, default path is the is `/<name>`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
/// Custom component whose logic is implementation-dependant
/// and should be provided by the user
/// possibly through some dedicated controller
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsCustom {
/// Class of component that the associated implementation controller
/// should use to process this command with the appropriate logic
#[serde(rename = "componentClass")]
pub component_class: String,
/// Additional free-form configuration for this custom component
/// that the implementation controller will know how to use
#[serde(rename = "embeddedResource")]
pub embedded_resource: BTreeMap<String, serde_json::Value>,
}
/// Allows specifying the definition of an image for outer loop builds
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsImage {
/// Defines if the image should be built during startup.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "autoBuild")]
pub auto_build: Option<bool>,
/// Allows specifying dockerfile type build
#[serde(default, skip_serializing_if = "Option::is_none")]
pub dockerfile: Option<CheClusterServerWorkspaceDefaultComponentsImageDockerfile>,
/// Name of the image for the resulting outerloop build
#[serde(rename = "imageName")]
pub image_name: String,
/// Type of image
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imageType")]
pub image_type: Option<CheClusterServerWorkspaceDefaultComponentsImageImageType>,
}
/// Allows specifying dockerfile type build
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsImageDockerfile {
/// The arguments to supply to the dockerfile build.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub args: Option<Vec<String>>,
/// Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container
#[serde(default, skip_serializing_if = "Option::is_none", rename = "buildContext")]
pub build_context: Option<String>,
/// Dockerfile's Devfile Registry source
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistry")]
pub devfile_registry: Option<CheClusterServerWorkspaceDefaultComponentsImageDockerfileDevfileRegistry>,
/// Dockerfile's Git source
#[serde(default, skip_serializing_if = "Option::is_none")]
pub git: Option<CheClusterServerWorkspaceDefaultComponentsImageDockerfileGit>,
/// Specify if a privileged builder pod is required.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "rootRequired")]
pub root_required: Option<bool>,
/// Type of Dockerfile src
#[serde(default, skip_serializing_if = "Option::is_none", rename = "srcType")]
pub src_type: Option<CheClusterServerWorkspaceDefaultComponentsImageDockerfileSrcType>,
/// URI Reference of a Dockerfile.
/// It can be a full URL or a relative URI from the current devfile as the base URI.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
/// Dockerfile's Devfile Registry source
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsImageDockerfileDevfileRegistry {
/// Id in a devfile registry that contains a Dockerfile. The src in the OCI registry
/// required for the Dockerfile build will be downloaded for building the image.
pub id: String,
/// Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src.
/// To ensure the Dockerfile gets resolved consistently in different environments,
/// it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "registryUrl")]
pub registry_url: Option<String>,
}
/// Dockerfile's Git source
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsImageDockerfileGit {
/// Defines from what the project should be checked out. Required if there are more than one remote configured
#[serde(default, skip_serializing_if = "Option::is_none", rename = "checkoutFrom")]
pub checkout_from: Option<CheClusterServerWorkspaceDefaultComponentsImageDockerfileGitCheckoutFrom>,
/// Location of the Dockerfile in the Git repository when using git as Dockerfile src.
/// Defaults to Dockerfile.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileLocation")]
pub file_location: Option<String>,
/// The remotes map which should be initialized in the git project.
/// Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.
pub remotes: BTreeMap<String, String>,
}
/// Defines from what the project should be checked out. Required if there are more than one remote configured
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsImageDockerfileGitCheckoutFrom {
/// The remote name should be used as init. Required if there are more than one remote configured
#[serde(default, skip_serializing_if = "Option::is_none")]
pub remote: Option<String>,
/// The revision to checkout from. Should be branch name, tag or commit id.
/// Default branch is used if missing or specified revision is not found.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub revision: Option<String>,
}
/// Allows specifying dockerfile type build
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsImageDockerfileSrcType {
Uri,
DevfileRegistry,
Git,
}
/// Allows specifying the definition of an image for outer loop builds
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsImageImageType {
Dockerfile,
}
/// Allows importing into the devworkspace the Kubernetes resources
/// defined in a given manifest. For example this allows reusing the Kubernetes
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsKubernetes {
/// Defines if the component should be deployed during startup.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "deployByDefault")]
pub deploy_by_default: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoints: Option<Vec<CheClusterServerWorkspaceDefaultComponentsKubernetesEndpoints>>,
/// Inlined manifest
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inlined: Option<String>,
/// Type of Kubernetes-like location
#[serde(default, skip_serializing_if = "Option::is_none", rename = "locationType")]
pub location_type: Option<CheClusterServerWorkspaceDefaultComponentsKubernetesLocationType>,
/// Location in a file fetched from a uri.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsKubernetesEndpoints {
/// Annotations to be added to Kubernetes Ingress or Openshift Route
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<BTreeMap<String, String>>,
/// Map of implementation-dependant string-based free-form attributes.
///
/// Examples of Che-specific attributes:
///
/// - cookiesAuthEnabled: "true" / "false",
///
/// - type: "terminal" / "ide" / "ide-dev",
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Describes how the endpoint should be exposed on the network.
///
/// - `public` means that the endpoint will be exposed on the public network, typically through
/// a K8S ingress or an OpenShift route.
///
/// - `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD,
/// typically by K8S services, to be consumed by other elements running
/// on the same cloud internal network.
///
/// - `none` means that the endpoint will not be exposed and will only be accessible
/// inside the main devworkspace POD, on a local address.
///
/// Default value is `public`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exposure: Option<CheClusterServerWorkspaceDefaultComponentsKubernetesEndpointsExposure>,
pub name: String,
/// Path of the endpoint URL
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Describes the application and transport protocols of the traffic that will go through this endpoint.
///
/// - `http`: Endpoint will have `http` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `https` when the `secure` field is set to `true`.
///
/// - `https`: Endpoint will have `https` traffic, typically on a TCP connection.
///
/// - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.
///
/// - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.
///
/// - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.
///
/// - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.
///
/// Default value is `http`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub protocol: Option<CheClusterServerWorkspaceDefaultComponentsKubernetesEndpointsProtocol>,
/// Describes whether the endpoint should be secured and protected by some
/// authentication process. This requires a protocol of `https` or `wss`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
/// Port number to be used within the container component. The same port cannot
/// be used by two different container components.
#[serde(rename = "targetPort")]
pub target_port: i64,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsKubernetesEndpointsExposure {
#[serde(rename = "public")]
Public,
#[serde(rename = "internal")]
Internal,
#[serde(rename = "none")]
None,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsKubernetesEndpointsProtocol {
#[serde(rename = "http")]
Http,
#[serde(rename = "https")]
Https,
#[serde(rename = "ws")]
Ws,
#[serde(rename = "wss")]
Wss,
#[serde(rename = "tcp")]
Tcp,
#[serde(rename = "udp")]
Udp,
}
/// Allows importing into the devworkspace the Kubernetes resources
/// defined in a given manifest. For example this allows reusing the Kubernetes
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsKubernetesLocationType {
Uri,
Inlined,
}
/// Allows importing into the devworkspace the OpenShift resources
/// defined in a given manifest. For example this allows reusing the OpenShift
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsOpenshift {
/// Defines if the component should be deployed during startup.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "deployByDefault")]
pub deploy_by_default: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoints: Option<Vec<CheClusterServerWorkspaceDefaultComponentsOpenshiftEndpoints>>,
/// Inlined manifest
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inlined: Option<String>,
/// Type of Kubernetes-like location
#[serde(default, skip_serializing_if = "Option::is_none", rename = "locationType")]
pub location_type: Option<CheClusterServerWorkspaceDefaultComponentsOpenshiftLocationType>,
/// Location in a file fetched from a uri.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsOpenshiftEndpoints {
/// Annotations to be added to Kubernetes Ingress or Openshift Route
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<BTreeMap<String, String>>,
/// Map of implementation-dependant string-based free-form attributes.
///
/// Examples of Che-specific attributes:
///
/// - cookiesAuthEnabled: "true" / "false",
///
/// - type: "terminal" / "ide" / "ide-dev",
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Describes how the endpoint should be exposed on the network.
///
/// - `public` means that the endpoint will be exposed on the public network, typically through
/// a K8S ingress or an OpenShift route.
///
/// - `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD,
/// typically by K8S services, to be consumed by other elements running
/// on the same cloud internal network.
///
/// - `none` means that the endpoint will not be exposed and will only be accessible
/// inside the main devworkspace POD, on a local address.
///
/// Default value is `public`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exposure: Option<CheClusterServerWorkspaceDefaultComponentsOpenshiftEndpointsExposure>,
pub name: String,
/// Path of the endpoint URL
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Describes the application and transport protocols of the traffic that will go through this endpoint.
///
/// - `http`: Endpoint will have `http` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `https` when the `secure` field is set to `true`.
///
/// - `https`: Endpoint will have `https` traffic, typically on a TCP connection.
///
/// - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.
///
/// - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.
///
/// - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.
///
/// - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.
///
/// Default value is `http`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub protocol: Option<CheClusterServerWorkspaceDefaultComponentsOpenshiftEndpointsProtocol>,
/// Describes whether the endpoint should be secured and protected by some
/// authentication process. This requires a protocol of `https` or `wss`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
/// Port number to be used within the container component. The same port cannot
/// be used by two different container components.
#[serde(rename = "targetPort")]
pub target_port: i64,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsOpenshiftEndpointsExposure {
#[serde(rename = "public")]
Public,
#[serde(rename = "internal")]
Internal,
#[serde(rename = "none")]
None,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsOpenshiftEndpointsProtocol {
#[serde(rename = "http")]
Http,
#[serde(rename = "https")]
Https,
#[serde(rename = "ws")]
Ws,
#[serde(rename = "wss")]
Wss,
#[serde(rename = "tcp")]
Tcp,
#[serde(rename = "udp")]
Udp,
}
/// Allows importing into the devworkspace the OpenShift resources
/// defined in a given manifest. For example this allows reusing the OpenShift
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsOpenshiftLocationType {
Uri,
Inlined,
}
/// Allows importing a plugin.
///
/// Plugins are mainly imported devfiles that contribute components, commands
/// and events as a consistent single unit. They are defined in either YAML files
/// following the devfile syntax,
/// or as `DevWorkspaceTemplate` Kubernetes Custom Resources
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPlugin {
/// Overrides of commands encapsulated in a parent devfile or a plugin.
/// Overriding is done according to K8S strategic merge patch standard rules.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub commands: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginCommands>>,
/// Overrides of components encapsulated in a parent devfile or a plugin.
/// Overriding is done according to K8S strategic merge patch standard rules.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub components: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginComponents>>,
/// Id in a registry that contains a Devfile yaml file
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// type of location from where the referenced template structure should be retrieved
#[serde(default, skip_serializing_if = "Option::is_none", rename = "importReferenceType")]
pub import_reference_type: Option<CheClusterServerWorkspaceDefaultComponentsPluginImportReferenceType>,
/// Reference to a Kubernetes CRD of type DevWorkspaceTemplate
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kubernetes: Option<CheClusterServerWorkspaceDefaultComponentsPluginKubernetes>,
/// Registry URL to pull the parent devfile from when using id in the parent reference.
/// To ensure the parent devfile gets resolved consistently in different environments,
/// it is recommended to always specify the `registryUrl` when `id` is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "registryUrl")]
pub registry_url: Option<String>,
/// URI Reference of a parent devfile YAML file.
/// It can be a full URL or a relative URI with the current devfile as the base URI.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
/// Specific stack/sample version to pull the parent devfile from, when using id in the parent reference.
/// To specify `version`, `id` must be defined and used as the import reference source.
/// `version` can be either a specific stack version, or `latest`.
/// If no `version` specified, default version will be used.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommands {
/// Command that consists in applying a given component definition,
/// typically bound to a devworkspace event.
///
/// For example, when an `apply` command is bound to a `preStart` event,
/// and references a `container` component, it will start the container as a
/// K8S initContainer in the devworkspace POD, unless the component has its
/// `dedicatedPod` field set to `true`.
///
/// When no `apply` command exist for a given component,
/// it is assumed the component will be applied at devworkspace start
/// by default, unless `deployByDefault` for that component is set to false.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub apply: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsApply>,
/// Map of implementation-dependant free-form YAML attributes.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Type of devworkspace command
#[serde(default, skip_serializing_if = "Option::is_none", rename = "commandType")]
pub command_type: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsCommandType>,
/// Composite command that allows executing several sub-commands
/// either sequentially or concurrently
#[serde(default, skip_serializing_if = "Option::is_none")]
pub composite: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsComposite>,
/// CLI Command executed in an existing component container
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exec: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsExec>,
/// Mandatory identifier that allows referencing
/// this command in composite commands, from
/// a parent, or in events.
pub id: String,
}
/// Command that consists in applying a given component definition,
/// typically bound to a devworkspace event.
///
/// For example, when an `apply` command is bound to a `preStart` event,
/// and references a `container` component, it will start the container as a
/// K8S initContainer in the devworkspace POD, unless the component has its
/// `dedicatedPod` field set to `true`.
///
/// When no `apply` command exist for a given component,
/// it is assumed the component will be applied at devworkspace start
/// by default, unless `deployByDefault` for that component is set to false.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommandsApply {
/// Describes component that will be applied
#[serde(default, skip_serializing_if = "Option::is_none")]
pub component: Option<String>,
/// Defines the group this command is part of
#[serde(default, skip_serializing_if = "Option::is_none")]
pub group: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsApplyGroup>,
/// Optional label that provides a label for this command
/// to be used in Editor UI menus for example
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
}
/// Defines the group this command is part of
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommandsApplyGroup {
/// Identifies the default command for a given group kind
#[serde(default, skip_serializing_if = "Option::is_none", rename = "isDefault")]
pub is_default: Option<bool>,
/// Kind of group the command is part of
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kind: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsApplyGroupKind>,
}
/// Defines the group this command is part of
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginCommandsApplyGroupKind {
#[serde(rename = "build")]
Build,
#[serde(rename = "run")]
Run,
#[serde(rename = "test")]
Test,
#[serde(rename = "debug")]
Debug,
#[serde(rename = "deploy")]
Deploy,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginCommandsCommandType {
Exec,
Apply,
Composite,
}
/// Composite command that allows executing several sub-commands
/// either sequentially or concurrently
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommandsComposite {
/// The commands that comprise this composite command
#[serde(default, skip_serializing_if = "Option::is_none")]
pub commands: Option<Vec<String>>,
/// Defines the group this command is part of
#[serde(default, skip_serializing_if = "Option::is_none")]
pub group: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsCompositeGroup>,
/// Optional label that provides a label for this command
/// to be used in Editor UI menus for example
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
/// Indicates if the sub-commands should be executed concurrently
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parallel: Option<bool>,
}
/// Defines the group this command is part of
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommandsCompositeGroup {
/// Identifies the default command for a given group kind
#[serde(default, skip_serializing_if = "Option::is_none", rename = "isDefault")]
pub is_default: Option<bool>,
/// Kind of group the command is part of
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kind: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsCompositeGroupKind>,
}
/// Defines the group this command is part of
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginCommandsCompositeGroupKind {
#[serde(rename = "build")]
Build,
#[serde(rename = "run")]
Run,
#[serde(rename = "test")]
Test,
#[serde(rename = "debug")]
Debug,
#[serde(rename = "deploy")]
Deploy,
}
/// CLI Command executed in an existing component container
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommandsExec {
/// The actual command-line string
///
/// Special variables that can be used:
///
/// - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.
///
/// - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/<project-name>). If there are multiple projects, this will point to the directory of the first one.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "commandLine")]
pub command_line: Option<String>,
/// Describes component to which given action relates
#[serde(default, skip_serializing_if = "Option::is_none")]
pub component: Option<String>,
/// Optional list of environment variables that have to be set
/// before running the command
#[serde(default, skip_serializing_if = "Option::is_none")]
pub env: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginCommandsExecEnv>>,
/// Defines the group this command is part of
#[serde(default, skip_serializing_if = "Option::is_none")]
pub group: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsExecGroup>,
/// Specify whether the command is restarted or not when the source code changes.
/// If set to `true` the command won't be restarted.
/// A *hotReloadCapable* `run` or `debug` command is expected to handle file changes on its own and won't be restarted.
/// A *hotReloadCapable* `build` command is expected to be executed only once and won't be executed again.
/// This field is taken into account only for commands `build`, `run` and `debug` with `isDefault` set to `true`.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "hotReloadCapable")]
pub hot_reload_capable: Option<bool>,
/// Optional label that provides a label for this command
/// to be used in Editor UI menus for example
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
/// Working directory where the command should be executed
///
/// Special variables that can be used:
///
/// - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.
///
/// - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/<project-name>). If there are multiple projects, this will point to the directory of the first one.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workingDir")]
pub working_dir: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommandsExecEnv {
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
/// Defines the group this command is part of
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginCommandsExecGroup {
/// Identifies the default command for a given group kind
#[serde(default, skip_serializing_if = "Option::is_none", rename = "isDefault")]
pub is_default: Option<bool>,
/// Kind of group the command is part of
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kind: Option<CheClusterServerWorkspaceDefaultComponentsPluginCommandsExecGroupKind>,
}
/// Defines the group this command is part of
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginCommandsExecGroupKind {
#[serde(rename = "build")]
Build,
#[serde(rename = "run")]
Run,
#[serde(rename = "test")]
Test,
#[serde(rename = "debug")]
Debug,
#[serde(rename = "deploy")]
Deploy,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponents {
/// Map of implementation-dependant free-form YAML attributes.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Type of component
#[serde(default, skip_serializing_if = "Option::is_none", rename = "componentType")]
pub component_type: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsComponentType>,
/// Allows adding and configuring devworkspace-related containers
#[serde(default, skip_serializing_if = "Option::is_none")]
pub container: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainer>,
/// Allows specifying the definition of an image for outer loop builds
#[serde(default, skip_serializing_if = "Option::is_none")]
pub image: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsImage>,
/// Allows importing into the devworkspace the Kubernetes resources
/// defined in a given manifest. For example this allows reusing the Kubernetes
/// definitions used to deploy some runtime components in production.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kubernetes: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetes>,
/// Mandatory name that allows referencing the component
/// from other elements (such as commands) or from an external
/// devfile that may reference this component through a parent or a plugin.
pub name: String,
/// Allows importing into the devworkspace the OpenShift resources
/// defined in a given manifest. For example this allows reusing the OpenShift
/// definitions used to deploy some runtime components in production.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub openshift: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshift>,
/// Allows specifying the definition of a volume
/// shared by several other components
#[serde(default, skip_serializing_if = "Option::is_none")]
pub volume: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsVolume>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsComponentType {
Container,
Kubernetes,
Openshift,
Volume,
Image,
}
/// Allows adding and configuring devworkspace-related containers
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainer {
/// Annotations that should be added to specific resources for this container
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerAnnotation>,
/// The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.
///
/// Defaults to an empty array, meaning use whatever is defined in the image.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub args: Option<Vec<String>>,
/// The command to run in the dockerimage component instead of the default one provided in the image.
///
/// Defaults to an empty array, meaning use whatever is defined in the image.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub command: Option<Vec<String>>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cpuLimit")]
pub cpu_limit: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cpuRequest")]
pub cpu_request: Option<String>,
/// Specify if a container should run in its own separated pod,
/// instead of running as part of the main development environment pod.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dedicatedPod")]
pub dedicated_pod: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoints: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEndpoints>>,
/// Environment variables used in this container.
///
/// The following variables are reserved and cannot be overridden via env:
///
/// - `$PROJECTS_ROOT`
///
/// - `$PROJECT_SOURCE`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub env: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEnv>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub image: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "memoryLimit")]
pub memory_limit: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "memoryRequest")]
pub memory_request: Option<String>,
/// Toggles whether or not the project source code should
/// be mounted in the component.
///
/// Defaults to true for all component types except plugins and components that set `dedicatedPod` to true.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "mountSources")]
pub mount_sources: Option<bool>,
/// Optional specification of the path in the container where
/// project sources should be transferred/mounted when `mountSources` is `true`.
/// When omitted, the default value of /projects is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sourceMapping")]
pub source_mapping: Option<String>,
/// List of volumes mounts that should be mounted is this container.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeMounts")]
pub volume_mounts: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerVolumeMounts>>,
}
/// Annotations that should be added to specific resources for this container
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerAnnotation {
/// Annotations to be added to deployment
#[serde(default, skip_serializing_if = "Option::is_none")]
pub deployment: Option<BTreeMap<String, String>>,
/// Annotations to be added to service
#[serde(default, skip_serializing_if = "Option::is_none")]
pub service: Option<BTreeMap<String, String>>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEndpoints {
/// Annotations to be added to Kubernetes Ingress or Openshift Route
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<BTreeMap<String, String>>,
/// Map of implementation-dependant string-based free-form attributes.
///
/// Examples of Che-specific attributes:
///
/// - cookiesAuthEnabled: "true" / "false",
///
/// - type: "terminal" / "ide" / "ide-dev",
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Describes how the endpoint should be exposed on the network.
///
/// - `public` means that the endpoint will be exposed on the public network, typically through
/// a K8S ingress or an OpenShift route.
///
/// - `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD,
/// typically by K8S services, to be consumed by other elements running
/// on the same cloud internal network.
///
/// - `none` means that the endpoint will not be exposed and will only be accessible
/// inside the main devworkspace POD, on a local address.
///
/// Default value is `public`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exposure: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEndpointsExposure>,
pub name: String,
/// Path of the endpoint URL
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Describes the application and transport protocols of the traffic that will go through this endpoint.
///
/// - `http`: Endpoint will have `http` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `https` when the `secure` field is set to `true`.
///
/// - `https`: Endpoint will have `https` traffic, typically on a TCP connection.
///
/// - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.
///
/// - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.
///
/// - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.
///
/// - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.
///
/// Default value is `http`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub protocol: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEndpointsProtocol>,
/// Describes whether the endpoint should be secured and protected by some
/// authentication process. This requires a protocol of `https` or `wss`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
/// Port number to be used within the container component. The same port cannot
/// be used by two different container components.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "targetPort")]
pub target_port: Option<i64>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEndpointsExposure {
#[serde(rename = "public")]
Public,
#[serde(rename = "internal")]
Internal,
#[serde(rename = "none")]
None,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEndpointsProtocol {
#[serde(rename = "http")]
Http,
#[serde(rename = "https")]
Https,
#[serde(rename = "ws")]
Ws,
#[serde(rename = "wss")]
Wss,
#[serde(rename = "tcp")]
Tcp,
#[serde(rename = "udp")]
Udp,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerEnv {
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
/// Volume that should be mounted to a component container
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsContainerVolumeMounts {
/// The volume mount name is the name of an existing `Volume` component.
/// If several containers mount the same volume name
/// then they will reuse the same volume and will be able to access to the same files.
pub name: String,
/// The path in the component container where the volume should be mounted.
/// If not path is mentioned, default path is the is `/<name>`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
/// Allows specifying the definition of an image for outer loop builds
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsImage {
/// Defines if the image should be built during startup.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "autoBuild")]
pub auto_build: Option<bool>,
/// Allows specifying dockerfile type build
#[serde(default, skip_serializing_if = "Option::is_none")]
pub dockerfile: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfile>,
/// Name of the image for the resulting outerloop build
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imageName")]
pub image_name: Option<String>,
/// Type of image
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imageType")]
pub image_type: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageImageType>,
}
/// Allows specifying dockerfile type build
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfile {
/// The arguments to supply to the dockerfile build.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub args: Option<Vec<String>>,
/// Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container
#[serde(default, skip_serializing_if = "Option::is_none", rename = "buildContext")]
pub build_context: Option<String>,
/// Dockerfile's Devfile Registry source
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistry")]
pub devfile_registry: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileDevfileRegistry>,
/// Dockerfile's Git source
#[serde(default, skip_serializing_if = "Option::is_none")]
pub git: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileGit>,
/// Specify if a privileged builder pod is required.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "rootRequired")]
pub root_required: Option<bool>,
/// Type of Dockerfile src
#[serde(default, skip_serializing_if = "Option::is_none", rename = "srcType")]
pub src_type: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileSrcType>,
/// URI Reference of a Dockerfile.
/// It can be a full URL or a relative URI from the current devfile as the base URI.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
/// Dockerfile's Devfile Registry source
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileDevfileRegistry {
/// Id in a devfile registry that contains a Dockerfile. The src in the OCI registry
/// required for the Dockerfile build will be downloaded for building the image.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src.
/// To ensure the Dockerfile gets resolved consistently in different environments,
/// it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "registryUrl")]
pub registry_url: Option<String>,
}
/// Dockerfile's Git source
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileGit {
/// Defines from what the project should be checked out. Required if there are more than one remote configured
#[serde(default, skip_serializing_if = "Option::is_none", rename = "checkoutFrom")]
pub checkout_from: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileGitCheckoutFrom>,
/// Location of the Dockerfile in the Git repository when using git as Dockerfile src.
/// Defaults to Dockerfile.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fileLocation")]
pub file_location: Option<String>,
/// The remotes map which should be initialized in the git project.
/// Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub remotes: Option<BTreeMap<String, String>>,
}
/// Defines from what the project should be checked out. Required if there are more than one remote configured
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileGitCheckoutFrom {
/// The remote name should be used as init. Required if there are more than one remote configured
#[serde(default, skip_serializing_if = "Option::is_none")]
pub remote: Option<String>,
/// The revision to checkout from. Should be branch name, tag or commit id.
/// Default branch is used if missing or specified revision is not found.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub revision: Option<String>,
}
/// Allows specifying dockerfile type build
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageDockerfileSrcType {
Uri,
DevfileRegistry,
Git,
}
/// Allows specifying the definition of an image for outer loop builds
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsImageImageType {
Dockerfile,
AutoBuild,
}
/// Allows importing into the devworkspace the Kubernetes resources
/// defined in a given manifest. For example this allows reusing the Kubernetes
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetes {
/// Defines if the component should be deployed during startup.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "deployByDefault")]
pub deploy_by_default: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoints: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesEndpoints>>,
/// Inlined manifest
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inlined: Option<String>,
/// Type of Kubernetes-like location
#[serde(default, skip_serializing_if = "Option::is_none", rename = "locationType")]
pub location_type: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesLocationType>,
/// Location in a file fetched from a uri.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesEndpoints {
/// Annotations to be added to Kubernetes Ingress or Openshift Route
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<BTreeMap<String, String>>,
/// Map of implementation-dependant string-based free-form attributes.
///
/// Examples of Che-specific attributes:
///
/// - cookiesAuthEnabled: "true" / "false",
///
/// - type: "terminal" / "ide" / "ide-dev",
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Describes how the endpoint should be exposed on the network.
///
/// - `public` means that the endpoint will be exposed on the public network, typically through
/// a K8S ingress or an OpenShift route.
///
/// - `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD,
/// typically by K8S services, to be consumed by other elements running
/// on the same cloud internal network.
///
/// - `none` means that the endpoint will not be exposed and will only be accessible
/// inside the main devworkspace POD, on a local address.
///
/// Default value is `public`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exposure: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesEndpointsExposure>,
pub name: String,
/// Path of the endpoint URL
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Describes the application and transport protocols of the traffic that will go through this endpoint.
///
/// - `http`: Endpoint will have `http` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `https` when the `secure` field is set to `true`.
///
/// - `https`: Endpoint will have `https` traffic, typically on a TCP connection.
///
/// - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.
///
/// - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.
///
/// - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.
///
/// - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.
///
/// Default value is `http`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub protocol: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesEndpointsProtocol>,
/// Describes whether the endpoint should be secured and protected by some
/// authentication process. This requires a protocol of `https` or `wss`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
/// Port number to be used within the container component. The same port cannot
/// be used by two different container components.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "targetPort")]
pub target_port: Option<i64>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesEndpointsExposure {
#[serde(rename = "public")]
Public,
#[serde(rename = "internal")]
Internal,
#[serde(rename = "none")]
None,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesEndpointsProtocol {
#[serde(rename = "http")]
Http,
#[serde(rename = "https")]
Https,
#[serde(rename = "ws")]
Ws,
#[serde(rename = "wss")]
Wss,
#[serde(rename = "tcp")]
Tcp,
#[serde(rename = "udp")]
Udp,
}
/// Allows importing into the devworkspace the Kubernetes resources
/// defined in a given manifest. For example this allows reusing the Kubernetes
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsKubernetesLocationType {
Uri,
Inlined,
}
/// Allows importing into the devworkspace the OpenShift resources
/// defined in a given manifest. For example this allows reusing the OpenShift
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshift {
/// Defines if the component should be deployed during startup.
///
/// Default value is `false`
#[serde(default, skip_serializing_if = "Option::is_none", rename = "deployByDefault")]
pub deploy_by_default: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoints: Option<Vec<CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftEndpoints>>,
/// Inlined manifest
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inlined: Option<String>,
/// Type of Kubernetes-like location
#[serde(default, skip_serializing_if = "Option::is_none", rename = "locationType")]
pub location_type: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftLocationType>,
/// Location in a file fetched from a uri.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftEndpoints {
/// Annotations to be added to Kubernetes Ingress or Openshift Route
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotation: Option<BTreeMap<String, String>>,
/// Map of implementation-dependant string-based free-form attributes.
///
/// Examples of Che-specific attributes:
///
/// - cookiesAuthEnabled: "true" / "false",
///
/// - type: "terminal" / "ide" / "ide-dev",
#[serde(default, skip_serializing_if = "Option::is_none")]
pub attributes: Option<BTreeMap<String, serde_json::Value>>,
/// Describes how the endpoint should be exposed on the network.
///
/// - `public` means that the endpoint will be exposed on the public network, typically through
/// a K8S ingress or an OpenShift route.
///
/// - `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD,
/// typically by K8S services, to be consumed by other elements running
/// on the same cloud internal network.
///
/// - `none` means that the endpoint will not be exposed and will only be accessible
/// inside the main devworkspace POD, on a local address.
///
/// Default value is `public`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exposure: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftEndpointsExposure>,
pub name: String,
/// Path of the endpoint URL
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Describes the application and transport protocols of the traffic that will go through this endpoint.
///
/// - `http`: Endpoint will have `http` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `https` when the `secure` field is set to `true`.
///
/// - `https`: Endpoint will have `https` traffic, typically on a TCP connection.
///
/// - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection.
/// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.
///
/// - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.
///
/// - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.
///
/// - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.
///
/// Default value is `http`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub protocol: Option<CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftEndpointsProtocol>,
/// Describes whether the endpoint should be secured and protected by some
/// authentication process. This requires a protocol of `https` or `wss`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
/// Port number to be used within the container component. The same port cannot
/// be used by two different container components.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "targetPort")]
pub target_port: Option<i64>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftEndpointsExposure {
#[serde(rename = "public")]
Public,
#[serde(rename = "internal")]
Internal,
#[serde(rename = "none")]
None,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftEndpointsProtocol {
#[serde(rename = "http")]
Http,
#[serde(rename = "https")]
Https,
#[serde(rename = "ws")]
Ws,
#[serde(rename = "wss")]
Wss,
#[serde(rename = "tcp")]
Tcp,
#[serde(rename = "udp")]
Udp,
}
/// Allows importing into the devworkspace the OpenShift resources
/// defined in a given manifest. For example this allows reusing the OpenShift
/// definitions used to deploy some runtime components in production.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginComponentsOpenshiftLocationType {
Uri,
Inlined,
}
/// Allows specifying the definition of a volume
/// shared by several other components
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginComponentsVolume {
/// Ephemeral volumes are not stored persistently across restarts. Defaults
/// to false
#[serde(default, skip_serializing_if = "Option::is_none")]
pub ephemeral: Option<bool>,
/// Size of the volume
#[serde(default, skip_serializing_if = "Option::is_none")]
pub size: Option<String>,
}
/// Allows importing a plugin.
///
/// Plugins are mainly imported devfiles that contribute components, commands
/// and events as a consistent single unit. They are defined in either YAML files
/// following the devfile syntax,
/// or as `DevWorkspaceTemplate` Kubernetes Custom Resources
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum CheClusterServerWorkspaceDefaultComponentsPluginImportReferenceType {
Uri,
Id,
Kubernetes,
}
/// Reference to a Kubernetes CRD of type DevWorkspaceTemplate
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsPluginKubernetes {
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
}
/// Allows specifying the definition of a volume
/// shared by several other components
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspaceDefaultComponentsVolume {
/// Ephemeral volumes are not stored persistently across restarts. Defaults
/// to false
#[serde(default, skip_serializing_if = "Option::is_none")]
pub ephemeral: Option<bool>,
/// Size of the volume
#[serde(default, skip_serializing_if = "Option::is_none")]
pub size: Option<String>,
}
/// The pod this Toleration is attached to tolerates any taint that matches
/// the triple <key,value,effect> using the matching operator <operator>.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspacePodTolerations {
/// Effect indicates the taint effect to match. Empty means match all taint effects.
/// When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub effect: Option<String>,
/// Key is the taint key that the toleration applies to. Empty means match all taint keys.
/// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// Operator represents a key's relationship to the value.
/// Valid operators are Exists and Equal. Defaults to Equal.
/// Exists is equivalent to wildcard for value, so that a pod can
/// tolerate all taints of a particular category.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub operator: Option<String>,
/// TolerationSeconds represents the period of time the toleration (which must be
/// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
/// it is not set, which means tolerate the taint forever (do not evict). Zero and
/// negative values will be treated as 0 (evict immediately) by the system.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "tolerationSeconds")]
pub toleration_seconds: Option<i64>,
/// Value is the taint value the toleration matches to.
/// If the operator is Exists, the value should be empty, otherwise just a regular string.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterServerWorkspacesDefaultPlugins {
/// The editor id to specify default plug-ins for.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub editor: Option<String>,
/// Default plug-in uris for the specified editor.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub plugins: Option<Vec<String>>,
}
/// Configuration settings related to the persistent storage used by the Che installation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterStorage {
/// Storage class for the Persistent Volume Claims dedicated to the Che workspaces. When omitted or left blank, a default storage class is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "perWorkspaceStrategyPVCStorageClassName")]
pub per_workspace_strategy_pvc_storage_class_name: Option<String>,
/// Size of the persistent volume claim for workspaces.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "perWorkspaceStrategyPvcClaimSize")]
pub per_workspace_strategy_pvc_claim_size: Option<String>,
/// Storage class for the Persistent Volume Claim dedicated to the PostgreSQL database. When omitted or left blank, a default storage class is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "postgresPVCStorageClassName")]
pub postgres_pvc_storage_class_name: Option<String>,
/// Instructs the Che server to start a special Pod to pre-create a sub-path in the Persistent Volumes.
/// Defaults to `false`, however it will need to enable it according to the configuration of your Kubernetes cluster.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "preCreateSubPaths")]
pub pre_create_sub_paths: Option<bool>,
/// Size of the persistent volume claim for workspaces. Defaults to `10Gi`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pvcClaimSize")]
pub pvc_claim_size: Option<String>,
/// Overrides the container image used to create sub-paths in the Persistent Volumes.
/// This includes the image tag. Omit it or leave it empty to use the default container image provided by the Operator. See also the `preCreateSubPaths` field.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pvcJobsImage")]
pub pvc_jobs_image: Option<String>,
/// Persistent volume claim strategy for the Che server. This Can be:`common` (all workspaces PVCs in one volume),
/// `per-workspace` (one PVC per workspace for all declared volumes) and `unique` (one PVC per declared volume). Defaults to `common`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pvcStrategy")]
pub pvc_strategy: Option<String>,
/// Storage class for the Persistent Volume Claims dedicated to the Che workspaces. When omitted or left blank, a default storage class is used.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspacePVCStorageClassName")]
pub workspace_pvc_storage_class_name: Option<String>,
}
/// CheClusterStatus defines the observed state of Che installation
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterStatus {
/// Status of a Che installation. Can be `Available`, `Unavailable`, or `Available, Rolling Update in Progress`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheClusterRunning")]
pub che_cluster_running: Option<String>,
/// Public URL to the Che server.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheURL")]
pub che_url: Option<String>,
/// Current installed Che version.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cheVersion")]
pub che_version: Option<String>,
/// Indicates that a PostgreSQL instance has been correctly provisioned or not.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "dbProvisioned")]
pub db_provisioned: Option<bool>,
/// Public URL to the devfile registry.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devfileRegistryURL")]
pub devfile_registry_url: Option<String>,
/// The status of the Devworkspace subsystem
#[serde(default, skip_serializing_if = "Option::is_none", rename = "devworkspaceStatus")]
pub devworkspace_status: Option<CheClusterStatusDevworkspaceStatus>,
/// Indicates whether an Identity Provider instance, Keycloak or RH-SSO, has been configured to integrate with the GitHub OAuth.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gitHubOAuthProvisioned")]
pub git_hub_o_auth_provisioned: Option<bool>,
/// The ConfigMap containing certificates to propagate to the Che components and to provide particular configuration for Git.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gitServerTLSCertificateConfigMapName")]
pub git_server_tls_certificate_config_map_name: Option<String>,
/// A URL that points to some URL where to find help related to the current Operator status.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "helpLink")]
pub help_link: Option<String>,
/// Indicates whether an Identity Provider instance, Keycloak or RH-SSO, has been provisioned with realm, client and user.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "keycloakProvisioned")]
pub keycloak_provisioned: Option<bool>,
/// Public URL to the Identity Provider server, Keycloak or RH-SSO,.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "keycloakURL")]
pub keycloak_url: Option<String>,
/// A human readable message indicating details about why the Pod is in this condition.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// OpenShift OAuth secret in `openshift-config` namespace that contains user credentials for HTPasswd identity provider.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "openShiftOAuthUserCredentialsSecret")]
pub open_shift_o_auth_user_credentials_secret: Option<String>,
/// Indicates whether an Identity Provider instance, Keycloak or RH-SSO, has been configured to integrate with the OpenShift OAuth.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "openShiftoAuthProvisioned")]
pub open_shifto_auth_provisioned: Option<bool>,
/// Public URL to the plugin registry.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pluginRegistryURL")]
pub plugin_registry_url: Option<String>,
/// A brief CamelCase message indicating details about why the Pod is in this state.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
}
/// The status of the Devworkspace subsystem
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct CheClusterStatusDevworkspaceStatus {
/// GatewayHost is the resolved host of the ingress/route. This is equal to the Host in the spec
/// on Kubernetes but contains the actual host name of the route if Host is unspecified on OpenShift.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayHost")]
pub gateway_host: Option<String>,
/// GatewayPhase specifies the phase in which the gateway deployment currently is.
/// If the gateway is disabled, the phase is "Inactive".
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayPhase")]
pub gateway_phase: Option<String>,
/// Message contains further human-readable info for why the Che cluster is in the phase it currently is.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// Phase is the phase in which the Che cluster as a whole finds itself in.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub phase: Option<String>,
/// A brief CamelCase message indicating details about why the Che cluster is in this state.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
/// The resolved workspace base domain. This is either the copy of the explicitly defined property of the
/// same name in the spec or, if it is undefined in the spec and we're running on OpenShift, the automatically
/// resolved basedomain for routes.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "workspaceBaseDomain")]
pub workspace_base_domain: Option<String>,
}