mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 18:10:21 +00:00
Compare commits
1038 Commits
v1.1.4
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f35596872 | ||
|
|
18c2fa15a2 | ||
|
|
18d93039c9 | ||
|
|
8ffd80e4a7 | ||
|
|
735075f5a6 | ||
|
|
52d1a4364b | ||
|
|
1b7f9aae65 | ||
|
|
e94519b788 | ||
|
|
18d755ed72 | ||
|
|
c15d0e4e0f | ||
|
|
82ce9daf38 | ||
|
|
6eef47c5e0 | ||
|
|
7728de933b | ||
|
|
5ceb193ebe | ||
|
|
186ab37547 | ||
|
|
5a98541e8e | ||
|
|
d599e63ec9 | ||
|
|
055a50fad8 | ||
|
|
7921475af2 | ||
|
|
caf09b81b0 | ||
|
|
4c525f8e5d | ||
|
|
bdf71bb290 | ||
|
|
5873ba4c47 | ||
|
|
9ded3c9d3e | ||
|
|
56c2827669 | ||
|
|
b6a7d8621f | ||
|
|
b80f673f69 | ||
|
|
e14dd09872 | ||
|
|
e31bacbb05 | ||
|
|
e602c0420b | ||
|
|
68e3c7cfc7 | ||
|
|
a5b8cfc9fb | ||
|
|
fce308d234 | ||
|
|
3c9f359e60 | ||
|
|
e5b0149ce5 | ||
|
|
83fd9edcfe | ||
|
|
f986073273 | ||
|
|
17872f9705 | ||
|
|
e463dbf1fb | ||
|
|
44142c4c70 | ||
|
|
e460638799 | ||
|
|
58ca3a820d | ||
|
|
63b31be38e | ||
|
|
06f10d4026 | ||
|
|
7a2b18b78a | ||
|
|
52ee87df16 | ||
|
|
3177d26fc4 | ||
|
|
3df1776b37 | ||
|
|
a6434c3efa | ||
|
|
766594d625 | ||
|
|
f7bd17edd7 | ||
|
|
5213e54466 | ||
|
|
939556a698 | ||
|
|
c8d89a1856 | ||
|
|
891429c5f5 | ||
|
|
8b6dbd781f | ||
|
|
7916e874c5 | ||
|
|
8f78189a79 | ||
|
|
6d979cfcab | ||
|
|
491127daec | ||
|
|
1829cf4e40 | ||
|
|
b0facbeaab | ||
|
|
e29b1af202 | ||
|
|
a3ee8eb01d | ||
|
|
84b4d0f685 | ||
|
|
4e370b940c | ||
|
|
110156aff0 | ||
|
|
62df98818e | ||
|
|
992e636211 | ||
|
|
3a7a8ac59f | ||
|
|
75fd38f1de | ||
|
|
8abd78e5f1 | ||
|
|
2d82e74c5b | ||
|
|
66dfcec0ad | ||
|
|
37dd176dd3 | ||
|
|
da9bd8ca63 | ||
|
|
bc1d24e034 | ||
|
|
bcce87c073 | ||
|
|
3a9e5ccd5d | ||
|
|
1b21db979f | ||
|
|
618596b98e | ||
|
|
db21d74a52 | ||
|
|
fafa18e8db | ||
|
|
acf923dd10 | ||
|
|
8fc94f057f | ||
|
|
6a6dfba79b | ||
|
|
3b7a997b3e | ||
|
|
e13a259bca | ||
|
|
58af7103e7 | ||
|
|
b329923f81 | ||
|
|
6f8cc0f5b4 | ||
|
|
8c9d0ae314 | ||
|
|
b6c024c205 | ||
|
|
3ab0b503c5 | ||
|
|
85e168fea7 | ||
|
|
189d74e87b | ||
|
|
8ec0209026 | ||
|
|
c3a7209fa7 | ||
|
|
564cba9aac | ||
|
|
f7c21df915 | ||
|
|
0b9c7f66c0 | ||
|
|
54867c50d8 | ||
|
|
16d7a4b4f4 | ||
|
|
35ae4e5ef5 | ||
|
|
853f44cf61 | ||
|
|
ca2a90a097 | ||
|
|
d110e97d68 | ||
|
|
741559c8e0 | ||
|
|
25b0cb8ee1 | ||
|
|
96ece000dc | ||
|
|
67f3f2747a | ||
|
|
5890b58aea | ||
|
|
68967f7af8 | ||
|
|
68a9565a1f | ||
|
|
8aaf526877 | ||
|
|
957302cb9d | ||
|
|
285a5cce18 | ||
|
|
d386b64ea2 | ||
|
|
181bc926f6 | ||
|
|
ab6c1a57eb | ||
|
|
e37b0276c8 | ||
|
|
fd784e291c | ||
|
|
16dfc1bf8a | ||
|
|
f876a0b8f8 | ||
|
|
60129e0f94 | ||
|
|
e747eae779 | ||
|
|
b24e7523d8 | ||
|
|
a519a6c89d | ||
|
|
ace23f1c6f | ||
|
|
557f7197b5 | ||
|
|
01737d62b0 | ||
|
|
945852284f | ||
|
|
eed081fd6f | ||
|
|
203a7dfbda | ||
|
|
cba8cb4c94 | ||
|
|
1fc65f56bf | ||
|
|
c29e980e8a | ||
|
|
e52ae78bd7 | ||
|
|
930d866e09 | ||
|
|
3159da0bb3 | ||
|
|
8571aa76ef | ||
|
|
072b80f6c6 | ||
|
|
cde76989a0 | ||
|
|
3b3898bf71 | ||
|
|
c43575a63c | ||
|
|
b0020b0600 | ||
|
|
a8d5403fee | ||
|
|
649aaa29a4 | ||
|
|
40c76071a8 | ||
|
|
4bd4e9014f | ||
|
|
0cb85d897a | ||
|
|
2cfedf7439 | ||
|
|
b9b6c5f8bf | ||
|
|
ec094f2e36 | ||
|
|
b7bf9df55f | ||
|
|
201f68c6cd | ||
|
|
cae7b327f8 | ||
|
|
fd70aa96e9 | ||
|
|
3a6d947f07 | ||
|
|
5de790413f | ||
|
|
09acc8a989 | ||
|
|
37605a1a8d | ||
|
|
e0ab16851e | ||
|
|
4ed3171b8e | ||
|
|
a3ab08741e | ||
|
|
c97124a30f | ||
|
|
da5282a15d | ||
|
|
be317c412a | ||
|
|
a422ae8ab4 | ||
|
|
4509b974ad | ||
|
|
d85f95fa19 | ||
|
|
0e71a9d044 | ||
|
|
eea8570e10 | ||
|
|
2af8ab13d6 | ||
|
|
9042bb29d5 | ||
|
|
c6d170fef6 | ||
|
|
8f11b5b1a4 | ||
|
|
7df0f20f70 | ||
|
|
51a60593cf | ||
|
|
b2dfee134b | ||
|
|
68d2d84880 | ||
|
|
de37545a12 | ||
|
|
7a87e6e632 | ||
|
|
0469ba494e | ||
|
|
cdafc03e7d | ||
|
|
0ece1d4400 | ||
|
|
ffb0d2fa87 | ||
|
|
71df27a8c3 | ||
|
|
370940070b | ||
|
|
d3454ec9d5 | ||
|
|
4ecb26e8a2 | ||
|
|
0e98959d61 | ||
|
|
8b441b6579 | ||
|
|
82fc74840d | ||
|
|
5b9fb49a91 | ||
|
|
15a56408fc | ||
|
|
92fa67cd69 | ||
|
|
c4e1f39d28 | ||
|
|
dc660fc97d | ||
|
|
f8833e34bc | ||
|
|
198fcfcc73 | ||
|
|
22fe52b19c | ||
|
|
9c7d3f408d | ||
|
|
4c90e90fff | ||
|
|
e10928d96f | ||
|
|
72ac218982 | ||
|
|
85173a7597 | ||
|
|
f7be1cd2fc | ||
|
|
cf296b757c | ||
|
|
2ec18bd52e | ||
|
|
73be281273 | ||
|
|
71a02b434b | ||
|
|
2ac3a7562d | ||
|
|
e81d8ddacb | ||
|
|
e572235434 | ||
|
|
f157515251 | ||
|
|
6ed041c590 | ||
|
|
195c4267c6 | ||
|
|
d2fca08acb | ||
|
|
dc0c194833 | ||
|
|
27ec48b617 | ||
|
|
9d414ce123 | ||
|
|
a9210487fa | ||
|
|
0c190ef329 | ||
|
|
87673093e9 | ||
|
|
75156d5e75 | ||
|
|
2411399683 | ||
|
|
f978519e69 | ||
|
|
6eca997ddd | ||
|
|
f8272d822b | ||
|
|
cbf9776fea | ||
|
|
ca0faa1f46 | ||
|
|
146bcbd9a8 | ||
|
|
b77cdaf5f5 | ||
|
|
deaf309f9b | ||
|
|
910cb50ac3 | ||
|
|
c1ccfb1d83 | ||
|
|
05b45fa52c | ||
|
|
373abf4fe7 | ||
|
|
a00fee91fc | ||
|
|
7f3b55efa0 | ||
|
|
e012bbd1e4 | ||
|
|
c82bcf146a | ||
|
|
f550e89331 | ||
|
|
f47dc5f598 | ||
|
|
985d49d9e6 | ||
|
|
f04f29dff0 | ||
|
|
ffbd53e3e1 | ||
|
|
c691649256 | ||
|
|
3484e8102d | ||
|
|
f8c24ba912 | ||
|
|
efb6475f2a | ||
|
|
f8f0730ed8 | ||
|
|
a5cd007311 | ||
|
|
b13eb4adb5 | ||
|
|
48236f69bd | ||
|
|
7508794798 | ||
|
|
65f17bf37f | ||
|
|
f5267f7654 | ||
|
|
c8eb0b4dbd | ||
|
|
8fb38672f5 | ||
|
|
383a2bd695 | ||
|
|
fcfb1012d6 | ||
|
|
fd024bc3e2 | ||
|
|
c8264b8c34 | ||
|
|
6eb7af9aea | ||
|
|
39d5ce48dc | ||
|
|
3538007fc4 | ||
|
|
83704058af | ||
|
|
1226a14cbd | ||
|
|
d0a725b51e | ||
|
|
57309884fc | ||
|
|
260c831df2 | ||
|
|
3a887ecdf9 | ||
|
|
adc99bf390 | ||
|
|
1ada3fb467 | ||
|
|
f3d4db686d | ||
|
|
1815dd4962 | ||
|
|
5cfc2878b7 | ||
|
|
c80b8c0502 | ||
|
|
dc8f558d8a | ||
|
|
46bdc8025e | ||
|
|
9244efe813 | ||
|
|
4288b216e2 | ||
|
|
dae0358bc0 | ||
|
|
dfb33e0ea7 | ||
|
|
1d82378053 | ||
|
|
5daec5b017 | ||
|
|
cb5630af48 | ||
|
|
cdfdc7febd | ||
|
|
3f725cab01 | ||
|
|
897f07fbec | ||
|
|
a855eddedc | ||
|
|
7976b32ba4 | ||
|
|
ec0b12861b | ||
|
|
2818f2ac4c | ||
|
|
09ce919b2b | ||
|
|
02903cd1c4 | ||
|
|
75700e7dc8 | ||
|
|
c5b28cb4b3 | ||
|
|
7d9c647b1a | ||
|
|
493a609864 | ||
|
|
564cbaf5d4 | ||
|
|
250f395109 | ||
|
|
55f82781ce | ||
|
|
ba7c22a37e | ||
|
|
fecdc23fd3 | ||
|
|
334446c264 | ||
|
|
6bef810dc3 | ||
|
|
8ab311f2ff | ||
|
|
0cd1ae155c | ||
|
|
1657326c38 | ||
|
|
9436e7ffa0 | ||
|
|
eb5f416e4e | ||
|
|
1cc5c54d32 | ||
|
|
12ec62dd65 | ||
|
|
1822e03505 | ||
|
|
d9aa541f12 | ||
|
|
9d6706d48e | ||
|
|
fc078bbd93 | ||
|
|
f7687e3506 | ||
|
|
4d73715422 | ||
|
|
30308fa8a1 | ||
|
|
0442baf932 | ||
|
|
987b369bee | ||
|
|
3aa16bb5d1 | ||
|
|
3fdf39c8e1 | ||
|
|
a19e90ea2c | ||
|
|
f447e6c642 | ||
|
|
0d3d75f29a | ||
|
|
a8ad79b1f2 | ||
|
|
967bc7786d | ||
|
|
fc5bcc6c33 | ||
|
|
02f5a96a72 | ||
|
|
1989b2f4a8 | ||
|
|
0529ad8581 | ||
|
|
f808827882 | ||
|
|
20f1d54bf3 | ||
|
|
e6d47d3758 | ||
|
|
a598272491 | ||
|
|
b260348f30 | ||
|
|
938fde9bba | ||
|
|
7bfcd6acc5 | ||
|
|
8d99a35f01 | ||
|
|
d593b7ad9c | ||
|
|
88fb854a26 | ||
|
|
d2cb1bfd4a | ||
|
|
eefccfb565 | ||
|
|
d25676a68e | ||
|
|
877ab3909d | ||
|
|
93841b479a | ||
|
|
94a82ce18d | ||
|
|
6f927d326b | ||
|
|
6c151ebcf1 | ||
|
|
331a25186e | ||
|
|
7f23165ee5 | ||
|
|
ba0c226925 | ||
|
|
3cde2337c6 | ||
|
|
c8ae44c7e1 | ||
|
|
99bb76a3fd | ||
|
|
b74d5011da | ||
|
|
755ccad654 | ||
|
|
0e4a480a4e | ||
|
|
57dcab5f18 | ||
|
|
9642ed9d9e | ||
|
|
2cc32e6c62 | ||
|
|
7f5b8ef957 | ||
|
|
1bd9a0eca3 | ||
|
|
512664b9b3 | ||
|
|
7935447d44 | ||
|
|
9238fc3edf | ||
|
|
6761b18229 | ||
|
|
7b2f4af610 | ||
|
|
a257c18e73 | ||
|
|
a1ada2609e | ||
|
|
8f127ce715 | ||
|
|
af53a58b8e | ||
|
|
b4894cc284 | ||
|
|
75def656fb | ||
|
|
fa75c1f4a5 | ||
|
|
cdc1550e17 | ||
|
|
b8b254e582 | ||
|
|
2d28fb35eb | ||
|
|
d7c6f6cc73 | ||
|
|
4162c413b3 | ||
|
|
172d41583f | ||
|
|
58edb344f6 | ||
|
|
1125f87fd7 | ||
|
|
520e67f63b | ||
|
|
7eb0002692 | ||
|
|
1237f7350e | ||
|
|
7907618a6a | ||
|
|
54e333148f | ||
|
|
c126a5b272 | ||
|
|
3eb1f53606 | ||
|
|
426b22d2e5 | ||
|
|
007f13d2ee | ||
|
|
81d479aedf | ||
|
|
25e33cdd6d | ||
|
|
900653a2da | ||
|
|
e3612ac352 | ||
|
|
62fb10625d | ||
|
|
571e154af3 | ||
|
|
2ac4ddad03 | ||
|
|
c5e1855a55 | ||
|
|
cb4a9ea1a8 | ||
|
|
21216055fb | ||
|
|
eb60d94a06 | ||
|
|
8998537dc8 | ||
|
|
4ddfe32fc4 | ||
|
|
28e2284284 | ||
|
|
62ecc70ade | ||
|
|
5857aa8790 | ||
|
|
49646ddc8e | ||
|
|
707905d877 | ||
|
|
7d3ef0595a | ||
|
|
af6dc4bda3 | ||
|
|
f44bd7c6dd | ||
|
|
eaec8348d9 | ||
|
|
2849dfc1fb | ||
|
|
d657ea4daf | ||
|
|
68500b3f17 | ||
|
|
c33eaa0609 | ||
|
|
7a0d2b552b | ||
|
|
385b2462e9 | ||
|
|
0c35753530 | ||
|
|
0e97aa2291 | ||
|
|
7fcb89906c | ||
|
|
86ef2d68e0 | ||
|
|
2e57be1022 | ||
|
|
ad01f3062a | ||
|
|
b6fac3f4d5 | ||
|
|
2eb7826070 | ||
|
|
5f7371815c | ||
|
|
d6b96fee5a | ||
|
|
85c673a574 | ||
|
|
7e6d9ccc73 | ||
|
|
e65dcf12db | ||
|
|
fd5faed71a | ||
|
|
b1823084af | ||
|
|
83fe4a160e | ||
|
|
8af3dec0df | ||
|
|
edebcc6c59 | ||
|
|
32382ba6be | ||
|
|
46ef6f9df4 | ||
|
|
aea98ff5bf | ||
|
|
c093676575 | ||
|
|
ed05b4b035 | ||
|
|
3aa4412a0f | ||
|
|
ef4b9816e1 | ||
|
|
1c5aab1852 | ||
|
|
966dbc1c74 | ||
|
|
4eafb46c87 | ||
|
|
a97a4d0ed7 | ||
|
|
77c02f9eec | ||
|
|
3157efd421 | ||
|
|
8ff93b33e2 | ||
|
|
c6b9abe4c4 | ||
|
|
150ef6e99e | ||
|
|
0ada407fbe | ||
|
|
c4af1ba643 | ||
|
|
de84421487 | ||
|
|
38a8a7f88a | ||
|
|
b4ddf0e4c3 | ||
|
|
47050c90b6 | ||
|
|
685d73a20c | ||
|
|
dde8a8e4c0 | ||
|
|
943af3ddf6 | ||
|
|
a5c2edf777 | ||
|
|
83d8022ce9 | ||
|
|
6d63014c6f | ||
|
|
d3fbd5fd45 | ||
|
|
b0202ebf14 | ||
|
|
295164229d | ||
|
|
ba09cf5c2e | ||
|
|
099e25a552 | ||
|
|
b2f5b69380 | ||
|
|
5d61cee3f6 | ||
|
|
2af198bda7 | ||
|
|
161d2646cb | ||
|
|
4f8e7506f9 | ||
|
|
160ef64855 | ||
|
|
905c49eb81 | ||
|
|
c4a8fcf29c | ||
|
|
e72690bade | ||
|
|
044c4bf73c | ||
|
|
795231ceb5 | ||
|
|
3f621e57b2 | ||
|
|
9fc992ea3e | ||
|
|
c2f5175fd1 | ||
|
|
a7d3cd5d1a | ||
|
|
ccfab6ce7f | ||
|
|
03cd0d144a | ||
|
|
741544c00c | ||
|
|
723a5d83ca | ||
|
|
8af5afa5dc | ||
|
|
aaa1db8760 | ||
|
|
c5baa1cae9 | ||
|
|
eda7e6c5a0 | ||
|
|
e5fd150cd5 | ||
|
|
d041d8c35d | ||
|
|
345e4c8144 | ||
|
|
9a8ec5d797 | ||
|
|
d9a676a688 | ||
|
|
9a3ad7ef84 | ||
|
|
9671e3b232 | ||
|
|
0c97f8311c | ||
|
|
a6460d67b6 | ||
|
|
3ea2ac6d0f | ||
|
|
13c420dada | ||
|
|
6354912bba | ||
|
|
5209be6da9 | ||
|
|
8f9908e723 | ||
|
|
296c82344b | ||
|
|
2d19454a35 | ||
|
|
f67d2db0d1 | ||
|
|
3634ad6f18 | ||
|
|
6c5a40d768 | ||
|
|
c91a7ac273 | ||
|
|
b437cf4310 | ||
|
|
040d5e1776 | ||
|
|
7bec3506f5 | ||
|
|
efc1597317 | ||
|
|
38665e319d | ||
|
|
1e0f329304 | ||
|
|
1300a980f0 | ||
|
|
b6b81c336e | ||
|
|
e2275efe56 | ||
|
|
c054ee32b1 | ||
|
|
19424cfaa4 | ||
|
|
a5fb09814e | ||
|
|
c1b116b360 | ||
|
|
3af893950e | ||
|
|
20583e089a | ||
|
|
96f8e4dc4c | ||
|
|
68e2634911 | ||
|
|
c06dbf3142 | ||
|
|
598de21f67 | ||
|
|
b13132ceba | ||
|
|
70408e4712 | ||
|
|
b975c313c3 | ||
|
|
a8dfc99ec9 | ||
|
|
ca8d66471a | ||
|
|
d5e8b68ad2 | ||
|
|
d8f95c9cf8 | ||
|
|
52f3636a2d | ||
|
|
04db938ffa | ||
|
|
f9635de027 | ||
|
|
d5ad037173 | ||
|
|
600b3a7044 | ||
|
|
7bc34b8dd9 | ||
|
|
bef24bdf22 | ||
|
|
bed1fb373e | ||
|
|
b5ce5df9c5 | ||
|
|
6e73c52116 | ||
|
|
0b0ed60b42 | ||
|
|
aeaa199982 | ||
|
|
751aed0098 | ||
|
|
17ee4268e2 | ||
|
|
7a30ec61d6 | ||
|
|
de81c24f42 | ||
|
|
93425889ef | ||
|
|
91c6458f35 | ||
|
|
1cb4426e4b | ||
|
|
3399742709 | ||
|
|
4ec919e009 | ||
|
|
dfd316ef7b | ||
|
|
7f20b7c5be | ||
|
|
12f63dcae5 | ||
|
|
342b853315 | ||
|
|
d6cf2cdd2f | ||
|
|
b8fd610523 | ||
|
|
4a58af76cf | ||
|
|
b54ddf4c1c | ||
|
|
ca486be4eb | ||
|
|
13b1e85442 | ||
|
|
16414a0d9f | ||
|
|
7059c8df79 | ||
|
|
fb831345f0 | ||
|
|
170debf3ae | ||
|
|
015f3cf72b | ||
|
|
67e88ffbaf | ||
|
|
37a523cbf7 | ||
|
|
42837ef162 | ||
|
|
1e022999a8 | ||
|
|
8a1d0107b9 | ||
|
|
d3500b6d7c | ||
|
|
debd9f2b40 | ||
|
|
8eaa438631 | ||
|
|
7102d7ad20 | ||
|
|
7b42515818 | ||
|
|
7ee4b14a88 | ||
|
|
3d0b9b7c71 | ||
|
|
4bae08c2e2 | ||
|
|
46fce3262e | ||
|
|
46967daf11 | ||
|
|
2fd8b7bc52 | ||
|
|
a9e511d3a8 | ||
|
|
37fb45bab8 | ||
|
|
4a29776e8e | ||
|
|
65522cabdb | ||
|
|
d145487b96 | ||
|
|
7523576905 | ||
|
|
5b356af7dc | ||
|
|
72a434134a | ||
|
|
5ab9f0986e | ||
|
|
9fe9f98e30 | ||
|
|
fee4a3f2b8 | ||
|
|
f0cbe816a6 | ||
|
|
d7261cd965 | ||
|
|
17794e4ce1 | ||
|
|
15418a6523 | ||
|
|
fa1409f974 | ||
|
|
3157e65d8a | ||
|
|
f6eea78ec8 | ||
|
|
24f147a72c | ||
|
|
7395994bdd | ||
|
|
91125c6fec | ||
|
|
0d8a9fc0de | ||
|
|
68ada429f0 | ||
|
|
2c41ee9c3c | ||
|
|
53198a9d9d | ||
|
|
7e102d70e0 | ||
|
|
ce25bd9985 | ||
|
|
225b59156f | ||
|
|
a73a4c64c2 | ||
|
|
614472b95a | ||
|
|
8b350a7258 | ||
|
|
8d13c3c7bc | ||
|
|
2da60419fc | ||
|
|
7895560675 | ||
|
|
75dc45ced6 | ||
|
|
665e2b6340 | ||
|
|
cb7bc0e7f4 | ||
|
|
4ad8913bbd | ||
|
|
947455adb9 | ||
|
|
354e92cfbd | ||
|
|
7bdd3dd6e8 | ||
|
|
408c893cff | ||
|
|
dd9ec2325a | ||
|
|
951506b79b | ||
|
|
14b1354a68 | ||
|
|
bd2e574007 | ||
|
|
438a9fe7a5 | ||
|
|
12f392cd92 | ||
|
|
af27e6a776 | ||
|
|
f57815a5bf | ||
|
|
69527b257c | ||
|
|
d88d4d8eca | ||
|
|
4e881b44af | ||
|
|
800b50cf0b | ||
|
|
3d9e1c7d80 | ||
|
|
fccc5df25e | ||
|
|
6cee468743 | ||
|
|
102a155194 | ||
|
|
f39a3fb792 | ||
|
|
8b5d7ed395 | ||
|
|
5b1c47c918 | ||
|
|
c298c98f25 | ||
|
|
7f7a9dcac0 | ||
|
|
b4732ed275 | ||
|
|
bfbdb85503 | ||
|
|
f41e0a3bb5 | ||
|
|
19a542ff11 | ||
|
|
d64c78db47 | ||
|
|
ceb95229cd | ||
|
|
ece47b5961 | ||
|
|
8be11a7e7e | ||
|
|
b354d2faa9 | ||
|
|
3af323365b | ||
|
|
6a512c02a6 | ||
|
|
b30ca0c8a2 | ||
|
|
1a50dd76b5 | ||
|
|
b17abe0081 | ||
|
|
12a106fcfe | ||
|
|
53d3ff6915 | ||
|
|
d4762e09cd | ||
|
|
578aae6482 | ||
|
|
96485ea0db | ||
|
|
251c440453 | ||
|
|
770894412a | ||
|
|
4d6c0eb9d5 | ||
|
|
53081d043b | ||
|
|
8495465087 | ||
|
|
5f31b9aad0 | ||
|
|
9f2e43756e | ||
|
|
8033279751 | ||
|
|
070b313897 | ||
|
|
c170cecd34 | ||
|
|
acac0554f3 | ||
|
|
1bceea29be | ||
|
|
3066cde46b | ||
|
|
15be6bc388 | ||
|
|
ac6b125b7f | ||
|
|
24c00fc99b | ||
|
|
f468814371 | ||
|
|
a1b1d4a6f8 | ||
|
|
82453b45f5 | ||
|
|
72a00b57e6 | ||
|
|
ff4b10f0ee | ||
|
|
746eb0dbe4 | ||
|
|
a33d1e488a | ||
|
|
0d6173c1ca | ||
|
|
00a80b9ecb | ||
|
|
8284581e0c | ||
|
|
8a5759949a | ||
|
|
820db96eae | ||
|
|
4d69027300 | ||
|
|
5210800cac | ||
|
|
66881c13d3 | ||
|
|
5648c56cf5 | ||
|
|
27252f32de | ||
|
|
775faee96f | ||
|
|
e818921a87 | ||
|
|
551992e8f2 | ||
|
|
e519c6142a | ||
|
|
3198693ad7 | ||
|
|
88aa6c0e83 | ||
|
|
8b82a79d1d | ||
|
|
14a57fc656 | ||
|
|
d7ee46134d | ||
|
|
6e5e26c19d | ||
|
|
8750fc8fab | ||
|
|
7ed293e27e | ||
|
|
36ad77493c | ||
|
|
9317bb1cab | ||
|
|
2543b7b510 | ||
|
|
7ef8cea7ce | ||
|
|
ae06ddacac | ||
|
|
db189f7527 | ||
|
|
9599e2da9d | ||
|
|
6c4b7699b9 | ||
|
|
add5d40bfc | ||
|
|
2f7b20d8b8 | ||
|
|
b85be11324 | ||
|
|
d11d171be8 | ||
|
|
cb0e88d590 | ||
|
|
f0d95c566f | ||
|
|
0a2a41046c | ||
|
|
b57db36dd3 | ||
|
|
f5e04a5575 | ||
|
|
4e91e3ab8d | ||
|
|
478d134778 | ||
|
|
5f2085b470 | ||
|
|
416fc45999 | ||
|
|
133a89be3f | ||
|
|
3b1f097807 | ||
|
|
e49dec5a3a | ||
|
|
f15d748251 | ||
|
|
e17f6b931a | ||
|
|
a3bf61fa4f | ||
|
|
655c2615e1 | ||
|
|
4dc213469a | ||
|
|
03d79db919 | ||
|
|
0fc65eb787 | ||
|
|
6d536a84d7 | ||
|
|
f5f5ff514f | ||
|
|
a67b7e90d0 | ||
|
|
a89bb69a62 | ||
|
|
c5c664f316 | ||
|
|
53006b4137 | ||
|
|
f47ae0e498 | ||
|
|
b622cbdb7f | ||
|
|
94f32a317d | ||
|
|
b483840987 | ||
|
|
3e81fdf008 | ||
|
|
ad4b44696a | ||
|
|
1563c582bc | ||
|
|
3f2e76c75a | ||
|
|
f7ebbf4fa0 | ||
|
|
330c3e269c | ||
|
|
41e6a895a1 | ||
|
|
e8f2b79721 | ||
|
|
2947da2611 | ||
|
|
4b07f1d000 | ||
|
|
99757814ab | ||
|
|
ecd7f62f89 | ||
|
|
a62724fbd7 | ||
|
|
33ffc00c2e | ||
|
|
bf03c82bc7 | ||
|
|
a528431d63 | ||
|
|
fb5716cc13 | ||
|
|
589480af62 | ||
|
|
b8640222c8 | ||
|
|
56f300846c | ||
|
|
95c2b8ce04 | ||
|
|
9b7286d6f5 | ||
|
|
27e1dd4a1b | ||
|
|
7d341c4bd3 | ||
|
|
59b458404e | ||
|
|
a6ef0644ff | ||
|
|
d56a1e534b | ||
|
|
374c3cd3e0 | ||
|
|
163415479b | ||
|
|
4294cc8a98 | ||
|
|
5630c02d7f | ||
|
|
8dad1eadb4 | ||
|
|
c588f85438 | ||
|
|
13c0b08081 | ||
|
|
52ac570faa | ||
|
|
ec105cbb02 | ||
|
|
f8e1ddc52c | ||
|
|
2abd98301f | ||
|
|
13b07674f1 | ||
|
|
f9ecc02417 | ||
|
|
d1f56743cc | ||
|
|
6184b6e0e6 | ||
|
|
ac2169e2fa | ||
|
|
96a9fb7d9e | ||
|
|
92335eca17 | ||
|
|
23bceb9f9c | ||
|
|
b05deeca55 | ||
|
|
7bdf4c176b | ||
|
|
334ef864da | ||
|
|
f5fc822a3e | ||
|
|
dd84700657 | ||
|
|
782025507c | ||
|
|
bab241e969 | ||
|
|
27c4dd1bc5 | ||
|
|
41f384e36b | ||
|
|
2be261e3f7 | ||
|
|
b279df0451 | ||
|
|
bbb1c1767e | ||
|
|
40f100ec27 | ||
|
|
6f90155ccd | ||
|
|
216a95a2dd | ||
|
|
d1f70def0e | ||
|
|
65f8614fd8 | ||
|
|
66e8398ab8 | ||
|
|
f1eef83809 | ||
|
|
99d473df2a | ||
|
|
da251f1cb6 | ||
|
|
14770dff0d | ||
|
|
4b72954c86 | ||
|
|
3d2fcacb5a | ||
|
|
e5a86ef537 | ||
|
|
ec5e2b4660 | ||
|
|
8c276e226b | ||
|
|
8bcffb92bf | ||
|
|
2e417641cd | ||
|
|
3bf365322b | ||
|
|
6dff9ab679 | ||
|
|
395b594b84 | ||
|
|
cee66fd03f | ||
|
|
5c46aa2f7f | ||
|
|
cf4aaf51c8 | ||
|
|
5e9d51997f | ||
|
|
367ed23eea | ||
|
|
4f2bf29a65 | ||
|
|
eece41c03c | ||
|
|
8699346401 | ||
|
|
e5aba94cd1 | ||
|
|
2b8a89d9fa | ||
|
|
58293dcf20 | ||
|
|
5b7b7138e2 | ||
|
|
47a565d00d | ||
|
|
a67bd24967 | ||
|
|
4ad27e9bcd | ||
|
|
1ea26865aa | ||
|
|
51b6e8b459 | ||
|
|
4799cbf6cc | ||
|
|
99ffe80eb4 | ||
|
|
32103f53fc | ||
|
|
8181b4d266 | ||
|
|
adcb7bd65e | ||
|
|
34aa74ff48 | ||
|
|
ff405cd62a | ||
|
|
54eb662959 | ||
|
|
b38aa1cdf0 | ||
|
|
36f5bbc973 | ||
|
|
1a2c964dac | ||
|
|
aa2a0e94bf | ||
|
|
ffd25a4cbf | ||
|
|
d954bbac00 | ||
|
|
b6a14e435b | ||
|
|
575ecc3136 | ||
|
|
bade23cecf | ||
|
|
530f158795 | ||
|
|
2fc0f1cd2b | ||
|
|
ba4a28fa0d | ||
|
|
0555623b3e | ||
|
|
55070033eb | ||
|
|
b3423116bf | ||
|
|
0673bc9cd5 | ||
|
|
1465aba177 | ||
|
|
061c061867 | ||
|
|
7a0670113f | ||
|
|
c42ea7c948 | ||
|
|
ba1f8e4793 | ||
|
|
15795fbe25 | ||
|
|
43aa05673e | ||
|
|
1c7e0c054d | ||
|
|
3df47d74f1 | ||
|
|
27490c4bce | ||
|
|
4eb9cc114e | ||
|
|
b3014c2f62 | ||
|
|
b10e4a05a0 | ||
|
|
e1c64540f4 | ||
|
|
722ed480e9 | ||
|
|
3e68f8a83b | ||
|
|
0803b45faf | ||
|
|
b0577a979a | ||
|
|
4e9e88e4a5 | ||
|
|
cee3630ead | ||
|
|
6f641caadc | ||
|
|
53d380ff41 | ||
|
|
8a3b7b6a05 | ||
|
|
4291e7c7ba | ||
|
|
49ba77c0d3 | ||
|
|
fd66e6a228 | ||
|
|
f3899e38ef | ||
|
|
d945eb35df | ||
|
|
7103f8ff52 | ||
|
|
3505c379d2 | ||
|
|
629cc67c6a | ||
|
|
84315ff0e6 | ||
|
|
738b416ec2 | ||
|
|
39e8bc0b98 | ||
|
|
64ab932c6d | ||
|
|
976da6f35a | ||
|
|
b98cec127e | ||
|
|
eb258fae66 | ||
|
|
fede2235a9 | ||
|
|
4ca68f2030 | ||
|
|
e5745bb3f3 | ||
|
|
3e9b702328 | ||
|
|
f7dc9934b1 | ||
|
|
c448ba0956 | ||
|
|
5590c3d7b5 | ||
|
|
c821f2a929 | ||
|
|
bf3a1cddf9 | ||
|
|
50cfe0c68f | ||
|
|
9e73f5dee6 | ||
|
|
df5bc2727e | ||
|
|
cd686fbb24 | ||
|
|
d2672cea48 | ||
|
|
d8007d823d | ||
|
|
f5b06f855a | ||
|
|
2337c82c3d | ||
|
|
e8969e4d17 | ||
|
|
844479c7b5 | ||
|
|
1438247aaf | ||
|
|
356c6240bf | ||
|
|
8e874bc3a9 | ||
|
|
117b9937f3 | ||
|
|
a5361b2deb | ||
|
|
df3061f4c1 | ||
|
|
637ec6273f | ||
|
|
7ba10d6864 | ||
|
|
aa0190c03d | ||
|
|
5f09faeff0 | ||
|
|
90e5fd9ed6 | ||
|
|
5d9e3437a3 | ||
|
|
9519d2443a | ||
|
|
b904f4fc0e | ||
|
|
6666c3a2bb | ||
|
|
68af605e75 | ||
|
|
1dc7647788 | ||
|
|
f7e2123707 | ||
|
|
a8494d1bee | ||
|
|
7647ef9662 | ||
|
|
3edb71891b | ||
|
|
0fedad7cd2 | ||
|
|
edf42074b9 | ||
|
|
828acd95fa | ||
|
|
7e5dac7c98 | ||
|
|
9563391952 | ||
|
|
b3f60b4b73 | ||
|
|
f48da214e3 | ||
|
|
4dd18d1fc3 | ||
|
|
3ebc94394c | ||
|
|
964a12bb44 | ||
|
|
605fb58a3c | ||
|
|
7482388c84 | ||
|
|
e9ac4bb62f | ||
|
|
17dbf6de7e | ||
|
|
b2fb9fc618 | ||
|
|
cf039e27e5 | ||
|
|
dfbe65c9c0 | ||
|
|
accf0138f8 | ||
|
|
f0b91ef8d6 | ||
|
|
b85dda35f3 | ||
|
|
c7f9cdcbbf | ||
|
|
d2dc9a8da7 | ||
|
|
952af10a4b | ||
|
|
e56a67acf5 | ||
|
|
cc292fe666 | ||
|
|
99f1743d25 | ||
|
|
f62deca440 | ||
|
|
9d33b74278 | ||
|
|
cf055a8331 | ||
|
|
9fea82fd7b | ||
|
|
dcb677f976 | ||
|
|
d1e814e7af | ||
|
|
d82f8e3cc6 | ||
|
|
d8c9105a3a | ||
|
|
5b7b74c072 | ||
|
|
efea09db49 | ||
|
|
8336f5ae9c | ||
|
|
e2ce40a551 | ||
|
|
13c24e5697 | ||
|
|
17b840f402 | ||
|
|
49bfeee53d | ||
|
|
1801471099 | ||
|
|
9d1ffd4c4b | ||
|
|
89eaf502fa | ||
|
|
56a8b0c002 | ||
|
|
8c4af1d69c | ||
|
|
7ef800573a | ||
|
|
4956d0e4e1 | ||
|
|
85c887d3e4 | ||
|
|
a4a1c39bbb | ||
|
|
f9ffb9e240 | ||
|
|
c3eaa74ee7 | ||
|
|
75ba05f738 | ||
|
|
8935a87c59 | ||
|
|
287c895daf | ||
|
|
96c52ab2fc | ||
|
|
0d036e7449 | ||
|
|
2e20f4862f | ||
|
|
5865a69576 | ||
|
|
9c76b2f3ac | ||
|
|
472ed3a146 | ||
|
|
f06980c5f4 | ||
|
|
f70133e5e6 | ||
|
|
bcd7f3e340 | ||
|
|
c049f497fb | ||
|
|
8b98caaa40 | ||
|
|
46e22cc203 | ||
|
|
426fe5cc11 | ||
|
|
a3f48425be | ||
|
|
a574fc0fbf | ||
|
|
0396d8d8bf | ||
|
|
b8894b7a44 | ||
|
|
5767d16169 | ||
|
|
83eec87da6 | ||
|
|
5704c3b83c | ||
|
|
6647a11c86 |
24
.github/CODEOWNERS
vendored
24
.github/CODEOWNERS
vendored
@@ -1,14 +1,14 @@
|
||||
# This file is a github code protect rule follow the codeowners https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
|
||||
|
||||
* @hongchaodeng @wonderflow @leejanee
|
||||
design/ @hongchaodeng @resouer @wonderflow
|
||||
* @barnettZQG @wonderflow @leejanee @Somefive
|
||||
design/ @barnettZQG @leejanee @wonderflow @Somefive
|
||||
|
||||
# Owner of CUE
|
||||
pkg/cue @leejanee @FogDong
|
||||
pkg/stdlib @leejanee @FogDong
|
||||
pkg/cue @leejanee @FogDong @Somefive
|
||||
pkg/stdlib @leejanee @FogDong @Somefive
|
||||
|
||||
# Owner of Workflow
|
||||
pkg/workflow @leejanee @FogDong
|
||||
pkg/workflow @leejanee @FogDong @Somefive
|
||||
|
||||
# Owner of rollout
|
||||
pkg/controller/common/rollout/ @wangyikewxgm @wonderflow
|
||||
@@ -17,20 +17,20 @@ pkg/controller/standard.oam.dev/v1alpha1/rollout @wangyikewxgm @wonde
|
||||
runtime/rollout @wangyikewxgm @wonderflow
|
||||
|
||||
# Owner of definition controller
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/workflow/workflowstepdefinition @yangsoon @Somefive
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/policies/policydefinition @yangsoon @Somefive
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/components/componentdefinition @yangsoon @zzxwill
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/traits/traitdefinition @yangsoon @zzxwill
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/workflow/workflowstepdefinition @yangsoon @Somefive @FogDong
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/policies/policydefinition @yangsoon @Somefive @FogDong
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/components/componentdefinition @yangsoon @zzxwill @Somefive
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/traits/traitdefinition @yangsoon @zzxwill @Somefive
|
||||
|
||||
# Owner of health scope controller
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/scopes/healthscope @captainroy-hy @zzxwill
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/scopes/healthscope @captainroy-hy @zzxwill @yangsoon
|
||||
|
||||
# Owner of vela templates
|
||||
vela-templates/ @Somefive @barnettZQG @wonderflow
|
||||
|
||||
# Owner of vela CLI
|
||||
references/cli/ @Somefive @zzxwill
|
||||
references/cli/ @Somefive @zzxwill @StevenLeiZhang
|
||||
|
||||
# Owner of vela APIServer
|
||||
pkg/apiserver/ @barnettZQG @yangsoon
|
||||
pkg/apiserver/ @barnettZQG @yangsoon @FogDong
|
||||
|
||||
|
||||
53
.github/PULL_REQUEST_TEMPLATE.md
vendored
53
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,36 +1,37 @@
|
||||
<!--
|
||||
|
||||
Thank you for sending a pull request! Here are some tips:
|
||||
|
||||
1. If this is your first time, please read our contribution guide at https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md
|
||||
|
||||
2. Ensure you include and run the appropriate tests as part of your Pull Request.
|
||||
|
||||
3. In a new feature or configuration option, an update to the documentation is necessary. Everything related to the documentation is under the docs folder in the root of the repository.
|
||||
|
||||
4. If the Pull Request is a work in progress, make use of GitHub's "Draft PR" feature and mark it as such.
|
||||
|
||||
5. If you can not merge your Pull Request due to a merge conflict, Rebase it. This gets it in sync with the master branch.
|
||||
|
||||
6. Name your PR as "<FeatureArea>: Describe your change", e.g. Application: Add health check for application.
|
||||
If it's a fix or feature relevant for the changelog describe the user impact in the title.
|
||||
The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label.
|
||||
|
||||
-->
|
||||
|
||||
**What this PR does / why we need it**:
|
||||
|
||||
**Which issue(s) this PR fixes**:
|
||||
### Description of your changes
|
||||
|
||||
<!--
|
||||
|
||||
- Automatically closes linked issue when the Pull Request is merged.
|
||||
|
||||
Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
|
||||
Briefly describe what this pull request does. We love pull requests that resolve an open KubeVela issue. If yours does, you
|
||||
can uncomment the below line to indicate which issue your PR fixes, for example
|
||||
"Fixes #500":
|
||||
|
||||
-->
|
||||
|
||||
Fixes #
|
||||
|
||||
**Special notes for your reviewer**:
|
||||
I have:
|
||||
|
||||
- [ ] Read and followed KubeVela's [contribution process](https://github.com/kubevela/kubevela/blob/master/contribute/create-pull-request.md).
|
||||
- [ ] [Related Docs](https://github.com/kubevela/kubevela.io) updated properly. In a new feature or configuration option, an update to the documentation is necessary.
|
||||
- [ ] Run `make reviewable` to ensure this PR is ready for review.
|
||||
- [ ] Added `backport release-x.y` labels to auto-backport this PR if necessary.
|
||||
|
||||
### How has this code been tested
|
||||
|
||||
<!--
|
||||
Before reviewers can be confident in the correctness of this pull request, it
|
||||
needs to tested and shown to be correct. Briefly describe the testing that has
|
||||
already been done or which is planned for this change.
|
||||
-->
|
||||
|
||||
|
||||
### Special notes for your reviewer
|
||||
|
||||
<!--
|
||||
|
||||
Be sure to direct your reviewers'
|
||||
attention to anything that needs special consideration.
|
||||
|
||||
-->
|
||||
8
.github/bot.md
vendored
8
.github/bot.md
vendored
@@ -1,9 +1,9 @@
|
||||
### GitHub & kubevela automation
|
||||
|
||||
The bot is configured via [issue-commands.json](https://github.com/oam-dev/kubevela/blob/master/.github/workflows/issue-commands.json)
|
||||
and some other GitHub [workflows](https://github.com/oam-dev/kubevela/blob/master/.github/workflows).
|
||||
The bot is configured via [issue-commands.json](https://github.com/kubevela/kubevela/blob/master/.github/workflows/issue-commands.json)
|
||||
and some other GitHub [workflows](https://github.com/kubevela/kubevela/blob/master/.github/workflows).
|
||||
By default, users with write access to the repo is allowed to use the comments,
|
||||
the [userlist](https://github.com/oam-dev/kubevela/blob/master/.github/comment.userlist)
|
||||
the [userlist](https://github.com/kubevela/kubevela/blob/master/.github/comment.userlist)
|
||||
file is for adding additional members who do not have access and want to contribute to the issue triage.
|
||||
|
||||
Comment commands:
|
||||
@@ -14,7 +14,7 @@ Comment commands:
|
||||
* Write the word `/area/*` in a comment, and the bot will add the corresponding label `/area/*`.
|
||||
* Write the word `/priority/*` in a comment, and the bot will add the corresponding label `/priority/*`.
|
||||
|
||||
The `*` mention above represent a specific word. Please read the details about label category in [ISSUE_TRIAGE.md](https://github.com/oam-dev/kubevela/blob/master/ISSUE_TRIAGE.md)
|
||||
The `*` mention above represent a specific word. Please read the details about label category in [ISSUE_TRIAGE.md](https://github.com/kubevela/kubevela/blob/master/ISSUE_TRIAGE.md)
|
||||
|
||||
Label commands:
|
||||
|
||||
|
||||
10
.github/pr-title-checker-config.json
vendored
Normal file
10
.github/pr-title-checker-config.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"LABEL": {
|
||||
"name": "title-needs-formatting",
|
||||
"color": "EEEEEE"
|
||||
},
|
||||
"CHECKS": {
|
||||
"prefixes": ["Fix: ", "Feat: ", "Docs: ", "Test: ", "Chore: ", "CI: ", "Perf: ", "Refactor: ", "Revert: ", "Style: ", "Test: ",
|
||||
"Fix(", "Feat(", "Docs(", "Test(", "Chore(", "CI(", "Perf(", "Refactor(", "Revert(", "Style(", "Test(", "[Backport"]
|
||||
}
|
||||
}
|
||||
207
.github/workflows/apiserver-test.yaml
vendored
Normal file
207
.github/workflows/apiserver-test.yaml
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
name: VelaUX APIServer Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
- apiserver
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch: { }
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
- apiserver
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.17'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
|
||||
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
|
||||
|
||||
jobs:
|
||||
|
||||
detect-noop:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
noop: ${{ steps.noop.outputs.should_skip }}
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
|
||||
concurrent_skipping: false
|
||||
|
||||
set-k8s-matrix:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-k8s-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- id: set-k8s-matrix
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
||||
echo "pushing tag: ${{ github.ref_name }}"
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
|
||||
else
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
|
||||
fi
|
||||
|
||||
apiserver-unit-tests:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: detect-noop
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .work/pkg
|
||||
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-pkg-
|
||||
|
||||
- name: Install ginkgo
|
||||
run: |
|
||||
sudo apt-get install -y golang-ginkgo-dev
|
||||
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@1.7.0
|
||||
with:
|
||||
mongodb-version: '5.0'
|
||||
|
||||
- name: install Kubebuilder
|
||||
uses: RyanSiu1995/kubebuilder-action@v1.2
|
||||
with:
|
||||
version: 3.1.0
|
||||
kubebuilderOnly: false
|
||||
kubernetesVersion: v1.21.2
|
||||
|
||||
- name: Run api server unit test
|
||||
run: make unit-test-apiserver
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
file: ./coverage.txt
|
||||
flags: apiserver-unittests
|
||||
name: codecov-umbrella
|
||||
|
||||
apiserver-e2e-tests:
|
||||
runs-on: aliyun-legacy
|
||||
needs: [ detect-noop,set-k8s-matrix ]
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
|
||||
- name: Tear down K3d if exist
|
||||
run: |
|
||||
k3d cluster delete || true
|
||||
k3d cluster delete worker || true
|
||||
|
||||
- name: Calculate K3d args
|
||||
run: |
|
||||
EGRESS_ARG=""
|
||||
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
|
||||
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
|
||||
fi
|
||||
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup K3d (Hub)
|
||||
uses: nolar/setup-k3d-k3s@v1.0.8
|
||||
with:
|
||||
version: ${{ matrix.k8s-version }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
k3d-args: ${{ env.EGRESS_ARG }}
|
||||
|
||||
|
||||
- name: Setup K3d (Worker)
|
||||
uses: nolar/setup-k3d-k3s@v1.0.8
|
||||
with:
|
||||
version: ${{ matrix.k8s-version }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
k3d-name: worker
|
||||
k3d-args: --kubeconfig-update-default=false --network=k3d-k3s-default ${{ env.EGRESS_ARG }}
|
||||
|
||||
|
||||
- name: Kind Cluster (Worker)
|
||||
run: |
|
||||
internal_ip=$(docker network inspect k3d-k3s-default|jq ".[0].Containers"| jq -r '.[]| select(.Name=="k3d-worker-server-0")|.IPv4Address' | cut -d/ -f1)
|
||||
k3d kubeconfig get worker > /tmp/worker.client.kubeconfig
|
||||
cp /tmp/worker.client.kubeconfig /tmp/worker.kubeconfig
|
||||
sed -i "s/0.0.0.0:[0-9]\+/$internal_ip:6443/" /tmp/worker.kubeconfig
|
||||
|
||||
- name: Load image to k3d cluster
|
||||
run: make image-load
|
||||
|
||||
- name: Cleanup for e2e tests
|
||||
run: |
|
||||
make vela-cli
|
||||
make e2e-cleanup
|
||||
make e2e-setup-core
|
||||
bin/vela addon enable fluxcd
|
||||
timeout 600s bash -c -- 'while true; do kubectl get ns flux-system; if [ $? -eq 0 ] ; then break; else sleep 5; fi;done'
|
||||
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela -n vela-system --timeout=600s
|
||||
kubectl wait --for=condition=Ready pod -l app=source-controller -n flux-system --timeout=600s
|
||||
kubectl wait --for=condition=Ready pod -l app=helm-controller -n flux-system --timeout=600s
|
||||
|
||||
- name: Run api server e2e test
|
||||
run: |
|
||||
export ALIYUN_ACCESS_KEY_ID=${{ secrets.ALIYUN_ACCESS_KEY_ID }}
|
||||
export ALIYUN_ACCESS_KEY_SECRET=${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
make e2e-apiserver-test
|
||||
|
||||
- name: Stop kubevela, get profile
|
||||
run: make end-e2e-core
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: /tmp/e2e_apiserver_test.out
|
||||
flags: apiserver-e2etests
|
||||
name: codecov-umbrella
|
||||
|
||||
- name: Clean e2e profile
|
||||
run: rm /tmp/e2e-profile.out
|
||||
|
||||
- name: Cleanup image
|
||||
if: ${{ always() }}
|
||||
run: make image-cleanup
|
||||
22
.github/workflows/back-port.yaml
vendored
Normal file
22
.github/workflows/back-port.yaml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Backport
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
# align with crossplane's choice https://github.com/crossplane/crossplane/blob/master/.github/workflows/backport.yml
|
||||
open-pr:
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.event.pull_request.merged
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Open Backport PR
|
||||
uses: zeebe-io/backport-action@v0.0.6
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
100
.github/workflows/chart.yaml
vendored
Normal file
100
.github/workflows/chart.yaml
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
name: Publish Chart
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch: { }
|
||||
|
||||
env:
|
||||
BUCKET: ${{ secrets.OSS_BUCKET }}
|
||||
ENDPOINT: ${{ secrets.OSS_ENDPOINT }}
|
||||
ACCESS_KEY: ${{ secrets.OSS_ACCESS_KEY }}
|
||||
ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
|
||||
ARTIFACT_HUB_REPOSITORY_ID: ${{ secrets.ARTIFACT_HUB_REPOSITORY_ID }}
|
||||
|
||||
jobs:
|
||||
publish-charts:
|
||||
env:
|
||||
HELM_CHARTS_DIR: charts
|
||||
HELM_CHART: charts/vela-core
|
||||
MINIMAL_HELM_CHART: charts/vela-minimal
|
||||
LEGACY_HELM_CHART: legacy/charts/vela-core-legacy
|
||||
VELA_ROLLOUT_HELM_CHART: runtime/rollout/charts
|
||||
LOCAL_OSS_DIRECTORY: .oss
|
||||
HELM_CHART_NAME: vela-core
|
||||
MINIMAL_HELM_CHART_NAME: vela-minimal
|
||||
LEGACY_HELM_CHART_NAME: vela-core-legacy
|
||||
VELA_ROLLOUT_HELM_CHART_NAME: vela-rollout
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Get git revision
|
||||
id: vars
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::set-output name=git_revision::$(git rev-parse --short HEAD)"
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.4.0
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
- name: Generate helm doc
|
||||
run: |
|
||||
make helm-doc-gen
|
||||
- name: Prepare legacy chart
|
||||
run: |
|
||||
rsync -r $LEGACY_HELM_CHART $HELM_CHARTS_DIR
|
||||
rsync -r $HELM_CHART/* $LEGACY_HELM_CHART --exclude=Chart.yaml --exclude=crds
|
||||
- name: Prepare vela chart
|
||||
run: |
|
||||
rsync -r $VELA_ROLLOUT_HELM_CHART $HELM_CHARTS_DIR
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
echo ::set-output name=VERSION::${VERSION}
|
||||
- name: Tag helm chart image
|
||||
run: |
|
||||
image_tag=${{ steps.get_version.outputs.VERSION }}
|
||||
chart_version=${{ steps.get_version.outputs.VERSION }}
|
||||
sed -i "s/latest/${image_tag}/g" $HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $MINIMAL_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $LEGACY_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $VELA_ROLLOUT_HELM_CHART/values.yaml
|
||||
chart_smever=${chart_version#"v"}
|
||||
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $MINIMAL_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $LEGACY_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $VELA_ROLLOUT_HELM_CHART/Chart.yaml
|
||||
- name: Install ossutil
|
||||
run: wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 && chmod +x ossutil64 && mv ossutil64 ossutil
|
||||
- name: Configure Alibaba Cloud OSSUTIL
|
||||
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT} -c .ossutilconfig
|
||||
- name: sync cloud to local
|
||||
run: ./ossutil --config-file .ossutilconfig sync oss://$BUCKET/core $LOCAL_OSS_DIRECTORY
|
||||
- name: add artifacthub stuff to the repo
|
||||
run: |
|
||||
rsync $HELM_CHART/README.md $LEGACY_HELM_CHART/README.md
|
||||
rsync $HELM_CHART/README.md $VELA_ROLLOUT_HELM_CHART/README.md
|
||||
sed -i "s/ARTIFACT_HUB_REPOSITORY_ID/$ARTIFACT_HUB_REPOSITORY_ID/g" hack/artifacthub/artifacthub-repo.yml
|
||||
rsync hack/artifacthub/artifacthub-repo.yml $LOCAL_OSS_DIRECTORY
|
||||
- name: Package helm charts
|
||||
run: |
|
||||
helm package $HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $MINIMAL_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $LEGACY_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $VELA_ROLLOUT_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm repo index --url https://$BUCKET.$ENDPOINT/core $LOCAL_OSS_DIRECTORY
|
||||
- name: sync local to cloud
|
||||
run: |
|
||||
image_tag=${{ steps.get_version.outputs.VERSION }}
|
||||
chart_semver=${image_tag#"v"}
|
||||
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/index.yaml oss://$BUCKET/core/index.yaml
|
||||
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$HELM_CHART_NAME-${chart_semver}.tgz
|
||||
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$MINIMAL_HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$MINIMAL_HELM_CHART_NAME-${chart_semver}.tgz
|
||||
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$LEGACY_HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$LEGACY_HELM_CHART_NAME-${chart_semver}.tgz
|
||||
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$VELA_ROLLOUT_HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$VELA_ROLLOUT_HELM_CHART_NAME-${chart_semver}.tgz
|
||||
22
.github/workflows/commit-lint.yml
vendored
22
.github/workflows/commit-lint.yml
vendored
@@ -1,13 +1,19 @@
|
||||
name: Lint Commit Messages
|
||||
on: [push, pull_request]
|
||||
name: PR Title Checker
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- synchronize
|
||||
- labeled
|
||||
- unlabeled
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: thehanimo/pr-title-checker@v1.3.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: wagoid/commitlint-github-action@v4
|
||||
with:
|
||||
helpURL: https://github.com/oam-dev/kubevela/blob/master/contribute/create-pull-request.md#commit-message-format
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
pass_on_octokit_error: true
|
||||
configuration_path: ".github/pr-title-checker-config.json"
|
||||
|
||||
96
.github/workflows/e2e-multicluster-test.yml
vendored
96
.github/workflows/e2e-multicluster-test.yml
vendored
@@ -5,6 +5,8 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch: {}
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -13,9 +15,10 @@ on:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.16'
|
||||
GO_VERSION: '1.17'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
KIND_VERSION: 'v0.7.0'
|
||||
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
|
||||
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -26,17 +29,39 @@ jobs:
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v3.3.0
|
||||
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
|
||||
concurrent_skipping: false
|
||||
|
||||
set-k8s-matrix:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-k8s-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- id: set-k8s-matrix
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
||||
echo "pushing tag: ${{ github.ref_name }}"
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
|
||||
else
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
|
||||
fi
|
||||
|
||||
|
||||
e2e-multi-cluster-tests:
|
||||
runs-on: aliyun
|
||||
needs: detect-noop
|
||||
runs-on: aliyun-legacy
|
||||
needs: [ detect-noop,set-k8s-matrix ]
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -51,38 +76,55 @@ jobs:
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
|
||||
- name: Setup Kind
|
||||
uses: engineerd/setup-kind@v0.5.0
|
||||
- name: Tear down K3d if exist
|
||||
run: |
|
||||
k3d cluster delete || true
|
||||
k3d cluster delete worker || true
|
||||
|
||||
- name: Calculate K3d args
|
||||
run: |
|
||||
EGRESS_ARG=""
|
||||
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
|
||||
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
|
||||
fi
|
||||
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup K3d (Hub)
|
||||
uses: nolar/setup-k3d-k3s@v1.0.8
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
skipClusterCreation: true
|
||||
version: ${{ matrix.k8s-version }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
k3d-args: ${{ env.EGRESS_ARG }}
|
||||
|
||||
- name: Setup Kind Cluster (Worker)
|
||||
- name: Setup K3d (Worker)
|
||||
uses: nolar/setup-k3d-k3s@v1.0.8
|
||||
with:
|
||||
version: ${{ matrix.k8s-version }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
k3d-name: worker
|
||||
k3d-args: --kubeconfig-update-default=false --network=k3d-k3s-default ${{ env.EGRESS_ARG }}
|
||||
|
||||
- name: Generating internal worker kubeconfig
|
||||
run: |
|
||||
kind delete cluster --name worker
|
||||
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4 --name worker
|
||||
kubectl version
|
||||
kubectl cluster-info
|
||||
kind get kubeconfig --name worker --internal > /tmp/worker.kubeconfig
|
||||
kind get kubeconfig --name worker > /tmp/worker.client.kubeconfig
|
||||
internal_ip=$(docker network inspect k3d-k3s-default|jq ".[0].Containers"| jq -r '.[]| select(.Name=="k3d-worker-server-0")|.IPv4Address' | cut -d/ -f1)
|
||||
k3d kubeconfig get worker > /tmp/worker.client.kubeconfig
|
||||
cp /tmp/worker.client.kubeconfig /tmp/worker.kubeconfig
|
||||
sed -i "s/0.0.0.0:[0-9]\+/$internal_ip:6443/" /tmp/worker.kubeconfig
|
||||
|
||||
- name: Setup Kind Cluster (Hub)
|
||||
run: |
|
||||
kind delete cluster
|
||||
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4
|
||||
kubectl version
|
||||
kubectl cluster-info
|
||||
|
||||
- name: Load Image to kind cluster (Hub)
|
||||
run: make kind-load
|
||||
- name: Load image to k3d cluster (hub and worker)
|
||||
run: make image-load image-load-runtime-cluster
|
||||
|
||||
- name: Cleanup for e2e tests
|
||||
run: |
|
||||
make vela-cli
|
||||
make e2e-cleanup
|
||||
make e2e-setup-core
|
||||
make e2e-setup-core-auth
|
||||
make setup-runtime-e2e-cluster
|
||||
|
||||
- name: Run e2e multicluster tests
|
||||
run: make e2e-multicluster-test
|
||||
run: |
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
make e2e-multicluster-test
|
||||
|
||||
- name: Stop kubevela, get profile
|
||||
run: make end-e2e-core
|
||||
|
||||
78
.github/workflows/e2e-rollout-test.yml
vendored
78
.github/workflows/e2e-rollout-test.yml
vendored
@@ -5,6 +5,8 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch: {}
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -13,9 +15,10 @@ on:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.16'
|
||||
GO_VERSION: '1.17'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
KIND_VERSION: 'v0.7.0'
|
||||
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
|
||||
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -26,17 +29,38 @@ jobs:
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v3.3.0
|
||||
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
|
||||
concurrent_skipping: false
|
||||
|
||||
set-k8s-matrix:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-k8s-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- id: set-k8s-matrix
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
||||
echo "pushing tag: ${{ github.ref_name }}"
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
|
||||
else
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
|
||||
fi
|
||||
|
||||
e2e-rollout-tests:
|
||||
runs-on: aliyun
|
||||
needs: detect-noop
|
||||
runs-on: aliyun-legacy
|
||||
needs: [ detect-noop,set-k8s-matrix ]
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -51,33 +75,35 @@ jobs:
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
|
||||
- name: Setup Kind
|
||||
uses: engineerd/setup-kind@v0.5.0
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
skipClusterCreation: true
|
||||
|
||||
- name: Setup Kind Cluster
|
||||
- name: Tear down K3d if exist
|
||||
run: |
|
||||
kind delete cluster
|
||||
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4
|
||||
kubectl version
|
||||
kubectl cluster-info
|
||||
k3d cluster delete || true
|
||||
k3d cluster delete worker || true
|
||||
|
||||
- name: Load Image to kind cluster
|
||||
run: make kind-load
|
||||
- name: Calculate K3d args
|
||||
run: |
|
||||
EGRESS_ARG=""
|
||||
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
|
||||
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
|
||||
fi
|
||||
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
|
||||
|
||||
- name: Run Make
|
||||
run: make
|
||||
- name: Setup K3d
|
||||
uses: nolar/setup-k3d-k3s@v1.0.8
|
||||
with:
|
||||
version: ${{ matrix.k8s-version }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
k3d-args: ${{ env.EGRESS_ARG }}
|
||||
|
||||
- name: Run Make Manager
|
||||
run: make manager
|
||||
- name: Load image to k3d cluster
|
||||
run: make image-load image-load-runtime-cluster
|
||||
|
||||
- name: Prepare for e2e tests
|
||||
run: |
|
||||
make vela-cli
|
||||
make e2e-cleanup
|
||||
make e2e-setup
|
||||
helm lint ./charts/vela-core
|
||||
make e2e-setup-core
|
||||
make setup-runtime-e2e-cluster
|
||||
helm test -n vela-system kubevela --timeout 5m
|
||||
|
||||
- name: Run e2e tests
|
||||
@@ -90,12 +116,12 @@ jobs:
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: /tmp/e2e-profile.out,/tmp/oam-e2e-profile.out
|
||||
files: /tmp/e2e-profile.out
|
||||
flags: e2e-rollout-tests
|
||||
name: codecov-umbrella
|
||||
|
||||
- name: Clean e2e profile
|
||||
run: rm /tmp/e2e-profile.out /tmp/oam-e2e-profile.out
|
||||
run: rm /tmp/e2e-profile.out
|
||||
|
||||
- name: Cleanup image
|
||||
if: ${{ always() }}
|
||||
|
||||
80
.github/workflows/e2e-test.yml
vendored
80
.github/workflows/e2e-test.yml
vendored
@@ -5,6 +5,8 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch: {}
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -13,9 +15,10 @@ on:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.16'
|
||||
GO_VERSION: '1.17'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
KIND_VERSION: 'v0.7.0'
|
||||
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
|
||||
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -26,17 +29,38 @@ jobs:
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v3.3.0
|
||||
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
|
||||
concurrent_skipping: false
|
||||
|
||||
set-k8s-matrix:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-k8s-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- id: set-k8s-matrix
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
||||
echo "pushing tag: ${{ github.ref_name }}"
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
|
||||
else
|
||||
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
|
||||
fi
|
||||
|
||||
e2e-tests:
|
||||
runs-on: aliyun
|
||||
needs: detect-noop
|
||||
runs-on: aliyun-legacy
|
||||
needs: [ detect-noop,set-k8s-matrix ]
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -51,38 +75,44 @@ jobs:
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
|
||||
- name: Setup Kind
|
||||
uses: engineerd/setup-kind@v0.5.0
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
skipClusterCreation: true
|
||||
|
||||
- name: Setup Kind Cluster
|
||||
- name: Tear down K3d if exist
|
||||
run: |
|
||||
kind delete cluster
|
||||
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4
|
||||
kubectl version
|
||||
kubectl cluster-info
|
||||
k3d cluster delete || true
|
||||
k3d cluster delete worker || true
|
||||
|
||||
- name: Load Image to kind cluster
|
||||
run: make kind-load
|
||||
- name: Calculate K3d args
|
||||
run: |
|
||||
EGRESS_ARG=""
|
||||
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
|
||||
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
|
||||
fi
|
||||
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup K3d
|
||||
uses: nolar/setup-k3d-k3s@v1.0.8
|
||||
with:
|
||||
version: ${{ matrix.k8s-version }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
k3d-args: ${{ env.EGRESS_ARG }}
|
||||
|
||||
- name: Load image to k3d cluster
|
||||
run: make image-load
|
||||
|
||||
- name: Run Make
|
||||
run: make
|
||||
|
||||
- name: Run Make Manager
|
||||
run: make manager
|
||||
|
||||
- name: Prepare for e2e tests
|
||||
run: |
|
||||
make e2e-cleanup
|
||||
make e2e-setup
|
||||
helm lint ./charts/vela-core
|
||||
make e2e-setup-core
|
||||
helm test -n vela-system kubevela --timeout 5m
|
||||
|
||||
- name: Run api e2e tests
|
||||
run: make e2e-api-test
|
||||
|
||||
- name: Run addons e2e tests
|
||||
run: make e2e-addon-test
|
||||
|
||||
- name: Run e2e tests
|
||||
run: make e2e-test
|
||||
|
||||
@@ -93,12 +123,12 @@ jobs:
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: /tmp/e2e-profile.out,/tmp/oam-e2e-profile.out
|
||||
files: /tmp/e2e-profile.out
|
||||
flags: e2etests
|
||||
name: codecov-umbrella
|
||||
|
||||
- name: Clean e2e profile
|
||||
run: rm /tmp/e2e-profile.out /tmp/oam-e2e-profile.out
|
||||
run: rm /tmp/e2e-profile.out
|
||||
|
||||
- name: Cleanup image
|
||||
if: ${{ always() }}
|
||||
|
||||
67
.github/workflows/go.yml
vendored
67
.github/workflows/go.yml
vendored
@@ -13,9 +13,8 @@ on:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.16'
|
||||
GO_VERSION: '1.17'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
KIND_VERSION: 'v0.7.0'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -26,59 +25,13 @@ jobs:
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v3.3.0
|
||||
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
|
||||
concurrent_skipping: false
|
||||
|
||||
compatibility-test:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: detect-noop
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .work/pkg
|
||||
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-pkg-
|
||||
|
||||
- name: Install ginkgo
|
||||
run: |
|
||||
sudo apt-get install -y golang-ginkgo-dev
|
||||
|
||||
- name: Setup Kind Cluster
|
||||
uses: engineerd/setup-kind@v0.5.0
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
|
||||
- name: install Kubebuilder
|
||||
uses: RyanSiu1995/kubebuilder-action@v1.2
|
||||
with:
|
||||
version: 3.1.0
|
||||
kubebuilderOnly: false
|
||||
kubernetesVersion: v1.21.2
|
||||
|
||||
- name: Run Make compatibility-test
|
||||
run: make compatibility-test
|
||||
|
||||
- name: Clean up testdata
|
||||
run: make compatibility-testdata-cleanup
|
||||
|
||||
staticcheck:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: detect-noop
|
||||
@@ -103,7 +56,7 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-pkg-
|
||||
|
||||
- name: Install StaticCheck
|
||||
run: GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck
|
||||
run: GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@v0.3.0
|
||||
|
||||
- name: Static Check
|
||||
run: staticcheck ./...
|
||||
@@ -117,6 +70,11 @@ jobs:
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
|
||||
steps:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
@@ -134,12 +92,12 @@ jobs:
|
||||
# version, but we prefer this action because it leaves 'annotations' (i.e.
|
||||
# it comments on PRs to point out linter violations).
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: ${{ env.GOLANGCI_VERSION }}
|
||||
|
||||
check-diff:
|
||||
runs-on: aliyun
|
||||
runs-on: aliyun-legacy
|
||||
needs: detect-noop
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
|
||||
@@ -154,6 +112,11 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
||||
61
.github/workflows/issue-commands.yml
vendored
61
.github/workflows/issue-commands.yml
vendored
@@ -6,19 +6,70 @@ on:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
bot:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "oam-dev/kubevela-github-actions"
|
||||
path: ./actions
|
||||
ref: v0.4.1
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
ref: v0.4.2
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: ./actions/package-lock.json
|
||||
- name: Install Dependencies
|
||||
run: npm ci --production --prefix ./actions
|
||||
- name: Run Commands
|
||||
uses: ./actions/commands
|
||||
with:
|
||||
token: ${{secrets.VELA_BOT_TOKEN}}
|
||||
configPath: issue-commands
|
||||
|
||||
backport:
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.event.issue.pull_request && contains(github.event.comment.body, '/backport')
|
||||
steps:
|
||||
- name: Extract Command
|
||||
id: command
|
||||
uses: xt0rted/slash-command-action@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.VELA_BOT_TOKEN }}
|
||||
command: backport
|
||||
reaction: "true"
|
||||
reaction-type: "eyes"
|
||||
allow-edits: "false"
|
||||
permission-level: read
|
||||
- name: Handle Command
|
||||
uses: actions/github-script@v4
|
||||
env:
|
||||
VERSION: ${{ steps.command.outputs.command-arguments }}
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const version = process.env.VERSION
|
||||
let label = "backport release-" + version
|
||||
if (version.includes("release")) {
|
||||
label = "backport " + version
|
||||
}
|
||||
// Add our backport label.
|
||||
github.issues.addLabels({
|
||||
// Every pull request is an issue, but not every issue is a pull request.
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: [label]
|
||||
})
|
||||
console.log("Added '" + label + "' label.")
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Open Backport PR
|
||||
uses: zeebe-io/backport-action@v0.0.6
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
|
||||
188
.github/workflows/registry.yml
vendored
188
.github/workflows/registry.yml
vendored
@@ -8,14 +8,11 @@ on:
|
||||
workflow_dispatch: {}
|
||||
|
||||
env:
|
||||
BUCKET: ${{ secrets.OSS_BUCKET }}
|
||||
ENDPOINT: ${{ secrets.OSS_ENDPOINT }}
|
||||
ACCESS_KEY: ${{ secrets.OSS_ACCESS_KEY }}
|
||||
ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
|
||||
ARTIFACT_HUB_REPOSITORY_ID: ${{ secrets.ARTIFACT_HUB_REPOSITORY_ID }}
|
||||
|
||||
jobs:
|
||||
publish-images:
|
||||
publish-core-images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
@@ -44,12 +41,19 @@ jobs:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Login Alibaba Cloud ACR
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ secrets.ACR_DOMAIN }}
|
||||
username: ${{ secrets.ACR_USERNAME }}
|
||||
password: ${{ secrets.ACR_PASSWORD }}
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
driver-opts: image=moby/buildkit:master
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Pushing
|
||||
name: Build & Pushing vela-core for Dockerhub, GHCR and ACR
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
@@ -61,11 +65,92 @@ jobs:
|
||||
build-args: |
|
||||
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
|
||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||
GOPROXY=https://proxy.golang.org
|
||||
tags: |-
|
||||
ghcr.io/${{ github.repository }}/vela-core:${{ steps.get_version.outputs.VERSION }}
|
||||
docker.io/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
|
||||
ghcr.io/${{ github.repository_owner }}/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
|
||||
${{ secrets.ACR_DOMAIN }}/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Pushing runtime rollout
|
||||
name: Build & Pushing CLI for Dockerhub, GHCR and ACR
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.cli
|
||||
labels: |-
|
||||
org.opencontainers.image.source=https://github.com/${{ github.repository }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
build-args: |
|
||||
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
|
||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||
GOPROXY=https://proxy.golang.org
|
||||
tags: |-
|
||||
docker.io/oamdev/vela-cli:${{ steps.get_version.outputs.VERSION }}
|
||||
ghcr.io/${{ github.repository_owner }}/oamdev/vela-cli:${{ steps.get_version.outputs.VERSION }}
|
||||
${{ secrets.ACR_DOMAIN }}/oamdev/vela-cli:${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
publish-addon-images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
if [[ ${GITHUB_REF} == "refs/heads/master" ]]; then
|
||||
VERSION=latest
|
||||
fi
|
||||
echo ::set-output name=VERSION::${VERSION}
|
||||
- name: Get git revision
|
||||
id: vars
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::set-output name=git_revision::$(git rev-parse --short HEAD)"
|
||||
- name: Login ghcr.io
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Login docker.io
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Login Alibaba Cloud ACR
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ secrets.ACR_DOMAIN }}
|
||||
username: ${{ secrets.ACR_USERNAME }}
|
||||
password: ${{ secrets.ACR_PASSWORD }}
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
driver-opts: image=moby/buildkit:master
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Pushing vela-apiserver for Dockerhub, GHCR and ACR
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.apiserver
|
||||
labels: |-
|
||||
org.opencontainers.image.source=https://github.com/${{ github.repository }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
build-args: |
|
||||
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
|
||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||
GOPROXY=https://proxy.golang.org
|
||||
tags: |-
|
||||
docker.io/oamdev/vela-apiserver:${{ steps.get_version.outputs.VERSION }}
|
||||
ghcr.io/${{ github.repository_owner }}/oamdev/vela-apiserver:${{ steps.get_version.outputs.VERSION }}
|
||||
${{ secrets.ACR_DOMAIN }}/oamdev/vela-apiserver:${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Pushing runtime rollout Dockerhub, GHCR and ACR
|
||||
with:
|
||||
context: .
|
||||
file: runtime/rollout/Dockerfile
|
||||
@@ -77,92 +162,11 @@ jobs:
|
||||
build-args: |
|
||||
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
|
||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||
GOPROXY=https://proxy.golang.org
|
||||
tags: |-
|
||||
ghcr.io/${{ github.repository }}/vela-rollout:${{ steps.get_version.outputs.VERSION }}
|
||||
docker.io/oamdev/vela-rollout:${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
publish-charts:
|
||||
env:
|
||||
HELM_CHARTS_DIR: charts
|
||||
HELM_CHART: charts/vela-core
|
||||
MINIMAL_HELM_CHART: charts/vela-minimal
|
||||
LEGACY_HELM_CHART: legacy/charts/vela-core-legacy
|
||||
OAM_RUNTIME_HELM_CHART: charts/oam-runtime
|
||||
VELA_ROLLOUT_HELM_CHART: runtime/rollout/charts
|
||||
LOCAL_OSS_DIRECTORY: .oss/
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Get git revision
|
||||
id: vars
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::set-output name=git_revision::$(git rev-parse --short HEAD)"
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.4.0
|
||||
- name: Prepare legacy chart
|
||||
run: |
|
||||
rsync -r $LEGACY_HELM_CHART $HELM_CHARTS_DIR
|
||||
rsync -r $HELM_CHART/* $LEGACY_HELM_CHART --exclude=Chart.yaml --exclude=crds
|
||||
- name: Prepare vela chart
|
||||
run: |
|
||||
rsync -r $VELA_ROLLOUT_HELM_CHART $HELM_CHARTS_DIR
|
||||
- uses: oprypin/find-latest-tag@v1
|
||||
with:
|
||||
repository: oam-dev/kubevela
|
||||
releases-only: true
|
||||
id: latest_tag
|
||||
- name: Tag helm chart image
|
||||
run: |
|
||||
latest_repo_tag=${{ steps.latest_tag.outputs.tag }}
|
||||
sub="."
|
||||
major="$(cut -d"$sub" -f1 <<<"$latest_repo_tag")"
|
||||
minor="$(cut -d"$sub" -f2 <<<"$latest_repo_tag")"
|
||||
patch="0"
|
||||
current_repo_tag="$major.$minor.$patch"
|
||||
image_tag=${GITHUB_REF#refs/tags/}
|
||||
chart_version=$latest_repo_tag
|
||||
if [[ ${GITHUB_REF} == "refs/heads/master" ]]; then
|
||||
image_tag=latest
|
||||
chart_version=${current_repo_tag}-nightly-build
|
||||
fi
|
||||
sed -i "s/latest/${image_tag}/g" $HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $MINIMAL_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $LEGACY_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $OAM_RUNTIME_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $VELA_ROLLOUT_HELM_CHART/values.yaml
|
||||
chart_smever=${chart_version#"v"}
|
||||
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $MINIMAL_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $LEGACY_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $OAM_RUNTIME_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $VELA_ROLLOUT_HELM_CHART/Chart.yaml
|
||||
- name: Install ossutil
|
||||
run: wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 && chmod +x ossutil64 && mv ossutil64 ossutil
|
||||
- name: Configure Alibaba Cloud OSSUTIL
|
||||
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT} -c .ossutilconfig
|
||||
- name: sync cloud to local
|
||||
run: ./ossutil --config-file .ossutilconfig sync oss://$BUCKET/core $LOCAL_OSS_DIRECTORY
|
||||
- name: add artifacthub stuff to the repo
|
||||
run: |
|
||||
rsync README.md $HELM_CHART/README.md
|
||||
rsync README.md $LEGACY_HELM_CHART/README.md
|
||||
rsync README.md $OAM_RUNTIME_HELM_CHART/README.md
|
||||
rsync README.md $VELA_ROLLOUT_HELM_CHART/README.md
|
||||
sed -i "s/ARTIFACT_HUB_REPOSITORY_ID/$ARTIFACT_HUB_REPOSITORY_ID/g" hack/artifacthub/artifacthub-repo.yml
|
||||
rsync hack/artifacthub/artifacthub-repo.yml $LOCAL_OSS_DIRECTORY
|
||||
- name: Package helm charts
|
||||
run: |
|
||||
helm package $HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $MINIMAL_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $LEGACY_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $OAM_RUNTIME_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $VELA_ROLLOUT_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm repo index --url https://$BUCKET.$ENDPOINT/core $LOCAL_OSS_DIRECTORY
|
||||
- name: sync local to cloud
|
||||
run: ./ossutil --config-file .ossutilconfig sync $LOCAL_OSS_DIRECTORY oss://$BUCKET/core -f
|
||||
ghcr.io/${{ github.repository_owner }}/oamdev/vela-rollout:${{ steps.get_version.outputs.VERSION }}
|
||||
${{ secrets.ACR_DOMAIN }}/oamdev/vela-rollout:${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
publish-capabilities:
|
||||
env:
|
||||
@@ -179,6 +183,6 @@ jobs:
|
||||
- name: sync capabilities bucket to local
|
||||
run: ./ossutil --config-file .ossutilconfig sync oss://$CAPABILITY_BUCKET $CAPABILITY_DIR
|
||||
- name: rsync all capabilites
|
||||
run: rsync vela-templates/registry/auto-gen/* $CAPABILITY_DIR
|
||||
run: rsync vela-templates/registry/auto-gen/* $CAPABILITY_DIR
|
||||
- name: sync local to cloud
|
||||
run: ./ossutil --config-file .ossutilconfig sync $CAPABILITY_DIR oss://$CAPABILITY_BUCKET -f
|
||||
227
.github/workflows/release.yml
vendored
227
.github/workflows/release.yml
vendored
@@ -4,126 +4,177 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch: {}
|
||||
workflow_dispatch: { }
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BUCKET: ${{ secrets.CLI_OSS_BUCKET }}
|
||||
ENDPOINT: ${{ secrets.CLI_OSS_ENDPOINT }}
|
||||
ACCESS_KEY: ${{ secrets.CLI_OSS_ACCESS_KEY }}
|
||||
ACCESS_KEY_SECRET: ${{ secrets.CLI_OSS_ACCESS_KEY_SECRET }}
|
||||
|
||||
jobs:
|
||||
publish-cli:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: build
|
||||
strategy:
|
||||
matrix:
|
||||
TARGETS: [ linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64 ]
|
||||
env:
|
||||
VELA_VERSION: ${{ github.ref }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VELA_VERSION_KEY: github.com/oam-dev/kubevela/version.VelaVersion
|
||||
VELA_GITVERSION_KEY: github.com/oam-dev/kubevela/version.GitRevision
|
||||
GO_BUILD_ENV: GO111MODULE=on CGO_ENABLED=0
|
||||
DIST_DIRS: find * -type d -exec
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.16
|
||||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
||||
- name: Tag helm chart image
|
||||
run: |
|
||||
sed -i 's/latest/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/values.yaml
|
||||
sed -i 's/0.1.0/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/Chart.yaml
|
||||
- name: Run cross-build
|
||||
run: make cross-build
|
||||
- name: Run compress binary
|
||||
run: make compress
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
- name: Get release
|
||||
id: get_release
|
||||
uses: bruceadams/get-release@v1.2.2
|
||||
- name: Upload Vela Linux amd64 tar.gz
|
||||
- name: Get version
|
||||
run: echo "VELA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
- name: Get matrix
|
||||
id: get_matrix
|
||||
run: |
|
||||
TARGETS=${{matrix.TARGETS}}
|
||||
echo ::set-output name=OS::${TARGETS%/*}
|
||||
echo ::set-output name=ARCH::${TARGETS#*/}
|
||||
- name: Get ldflags
|
||||
id: get_ldflags
|
||||
run: |
|
||||
LDFLAGS="-s -w -X ${{ env.VELA_VERSION_KEY }}=${{ env.VELA_VERSION }} -X ${{ env.VELA_GITVERSION_KEY }}=git-$(git rev-parse --short HEAD)"
|
||||
echo "LDFLAGS=${LDFLAGS}" >> $GITHUB_ENV
|
||||
- name: Build
|
||||
run: |
|
||||
${{ env.GO_BUILD_ENV }} GOOS=${{ steps.get_matrix.outputs.OS }} GOARCH=${{ steps.get_matrix.outputs.ARCH }} \
|
||||
go build -ldflags "${{ env.LDFLAGS }}" \
|
||||
-o _bin/vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}/vela -v \
|
||||
./references/cmd/cli/main.go
|
||||
${{ env.GO_BUILD_ENV }} GOOS=${{ steps.get_matrix.outputs.OS }} GOARCH=${{ steps.get_matrix.outputs.ARCH }} \
|
||||
go build -ldflags "${{ env.LDFLAGS }}" \
|
||||
-o _bin/kubectl-vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}/kubectl-vela -v \
|
||||
./cmd/plugin/main.go
|
||||
- name: Compress
|
||||
run: |
|
||||
echo "\n## Release Info\nVERSION: ${{ env.VELA_VERSION }}" >> README.md && \
|
||||
echo "GIT_COMMIT: ${GITHUB_SHA}\n" >> README.md && \
|
||||
cd _bin/vela && \
|
||||
${{ env.DIST_DIRS }} cp ../../LICENSE {} \; && \
|
||||
${{ env.DIST_DIRS }} cp ../../README.md {} \; && \
|
||||
${{ env.DIST_DIRS }} tar -zcf vela-{}.tar.gz {} \; && \
|
||||
${{ env.DIST_DIRS }} zip -r vela-{}.zip {} \; && \
|
||||
cd ../kubectl-vela && \
|
||||
${{ env.DIST_DIRS }} cp ../../LICENSE {} \; && \
|
||||
${{ env.DIST_DIRS }} cp ../../README.md {} \; && \
|
||||
${{ env.DIST_DIRS }} tar -zcf kubectl-vela-{}.tar.gz {} \; && \
|
||||
${{ env.DIST_DIRS }} zip -r kubectl-vela-{}.zip {} \; && \
|
||||
cd .. && \
|
||||
sha256sum vela/vela-* kubectl-vela/kubectl-vela-* >> sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt \
|
||||
- name: Upload Vela tar.gz
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/vela/vela-linux-amd64.tar.gz
|
||||
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
|
||||
asset_path: ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
||||
asset_name: vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Vela Linux amd64 zip
|
||||
- name: Upload Vela zip
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/vela/vela-linux-amd64.zip
|
||||
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
|
||||
asset_path: ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
||||
asset_name: vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Vela MacOS tar.gz
|
||||
- name: Upload Kubectl-Vela tar.gz
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/vela/vela-darwin-amd64.tar.gz
|
||||
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
||||
asset_name: kubectl-vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Vela MacOS zip
|
||||
- name: Upload Kubectl-Vela zip
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/vela/vela-darwin-amd64.zip
|
||||
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
||||
asset_name: kubectl-vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Vela Windows tar.gz
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
- name: Post sha256
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/vela/vela-windows-amd64.tar.gz
|
||||
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.tar.gz
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Vela Windows zip
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
name: sha256sums
|
||||
path: ./_bin/sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt
|
||||
retention-days: 1
|
||||
- name: clear the asset
|
||||
run: |
|
||||
rm -rf ./_bin/vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}
|
||||
mv ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz ./_bin/vela/vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
||||
mv ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip ./_bin/vela/vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
||||
- name: Install ossutil
|
||||
run: wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 && chmod +x ossutil64 && mv ossutil64 ossutil
|
||||
- name: Configure Alibaba Cloud OSSUTIL
|
||||
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT} -c .ossutilconfig
|
||||
- name: sync local to cloud
|
||||
run: ./ossutil --config-file .ossutilconfig sync ./_bin/vela oss://$BUCKET/binary/vela/${{ env.VELA_VERSION }}
|
||||
|
||||
- name: sync the latest version file
|
||||
if: ${{ !contains(env.VELA_VERSION,'alpha') && !contains(env.VELA_VERSION,'beta') }}
|
||||
run: |
|
||||
LATEST_VERSION=$(curl -fsSl https://static.kubevela.net/binary/vela/latest_version)
|
||||
verlte() {
|
||||
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
|
||||
}
|
||||
verlte ${{ env.VELA_VERSION }} $LATEST_VERSION && echo "${{ env.VELA_VERSION }} <= $LATEST_VERSION, skip update" && exit 0
|
||||
echo ${{ env.VELA_VERSION }} > ./latest_version
|
||||
./ossutil --config-file .ossutilconfig cp -u ./latest_version oss://$BUCKET/binary/vela/latest_version
|
||||
|
||||
|
||||
upload-plugin-homebrew:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
name: upload-sha256sums
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Get release
|
||||
id: get_release
|
||||
uses: bruceadams/get-release@v1.2.2
|
||||
- name: Download sha256sums
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/vela/vela-windows-amd64.zip
|
||||
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Kubectl-Vela Linux amd64 tar.gz
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-linux-amd64.tar.gz
|
||||
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Kubectl-Vela Linux amd64 zip
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-linux-amd64.zip
|
||||
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Kubectl-Vela MacOS tar.gz
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-darwin-amd64.tar.gz
|
||||
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Kubectl-Vela MacOS zip
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-darwin-amd64.zip
|
||||
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Kubectl-Vela Windows tar.gz
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-windows-amd64.tar.gz
|
||||
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.tar.gz
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Upload Kubectl-Vela Windows zip
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/kubectl-vela/kubectl-vela-windows-amd64.zip
|
||||
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
|
||||
asset_content_type: binary/octet-stream
|
||||
name: sha256sums
|
||||
path: cli-artifacts
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
working-directory: cli-artifacts
|
||||
- name: Get version
|
||||
run: echo "VELA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
- shell: bash
|
||||
working-directory: cli-artifacts
|
||||
run: |
|
||||
for file in *
|
||||
do
|
||||
sed -i "s/\/vela/-${{ env.VELA_VERSION }}/g" ${file}
|
||||
sed -i "s/\/kubectl-vela/-${{ env.VELA_VERSION }}/g" ${file}
|
||||
cat ${file} >> sha256sums.txt
|
||||
done
|
||||
- name: Upload Checksums
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/sha256sums.txt
|
||||
asset_path: cli-artifacts/sha256sums.txt
|
||||
asset_name: sha256sums.txt
|
||||
asset_content_type: text/plain
|
||||
- name: Update kubectl plugin version in krew-index
|
||||
uses: rajatjindal/krew-release-bot@v0.0.38
|
||||
- name: Update Homebrew formula
|
||||
uses: dawidd6/action-homebrew-bump-formula@v3
|
||||
with:
|
||||
token: ${{ secrets.HOMEBREW_TOKEN }}
|
||||
formula: kubevela
|
||||
tag: ${{ github.ref }}
|
||||
revision: ${{ github.sha }}
|
||||
force: false
|
||||
|
||||
4
.github/workflows/sync-api.yml
vendored
4
.github/workflows/sync-api.yml
vendored
@@ -11,10 +11,10 @@ jobs:
|
||||
sync-core-api:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Set up Go 1.16
|
||||
- name: Set up Go 1.17
|
||||
uses: actions/setup-go@v1
|
||||
env:
|
||||
GO_VERSION: '1.16'
|
||||
GO_VERSION: '1.17'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
4
.github/workflows/timed-task.yml
vendored
4
.github/workflows/timed-task.yml
vendored
@@ -1,10 +1,10 @@
|
||||
name: Timed Task
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
- cron: '* * * * *'
|
||||
jobs:
|
||||
clean-image:
|
||||
runs-on: aliyun
|
||||
runs-on: aliyun-legacy
|
||||
steps:
|
||||
- name: Cleanup image
|
||||
run: docker image prune -f
|
||||
30
.github/workflows/trivy-scan.yml
vendored
Normal file
30
.github/workflows/trivy-scan.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: "Trivy Scan"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
images:
|
||||
name: Image Scan
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build Vela Core image from Dockerfile
|
||||
run: |
|
||||
docker build --build-arg GOPROXY=https://proxy.golang.org -t docker.io/oamdev/vela-core:${{ github.sha }} .
|
||||
|
||||
- name: Run Trivy vulnerability scanner for vela core
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/oamdev/vela-core:${{ github.sha }}'
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
16
.github/workflows/unit-test.yml
vendored
16
.github/workflows/unit-test.yml
vendored
@@ -13,9 +13,8 @@ on:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.16'
|
||||
GO_VERSION: '1.17'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
KIND_VERSION: 'v0.7.0'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -26,7 +25,7 @@ jobs:
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v3.3.0
|
||||
uses: fkirc/skip-duplicate-actions@v4.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
@@ -58,13 +57,14 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-pkg-
|
||||
|
||||
- name: Install ginkgo
|
||||
run: |
|
||||
run: |
|
||||
sudo apt-get install -y golang-ginkgo-dev
|
||||
|
||||
- name: Setup Kind Cluster
|
||||
uses: engineerd/setup-kind@v0.5.0
|
||||
- name: Setup K3d
|
||||
uses: nolar/setup-k3d-k3s@v1.0.8
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
version: v1.20
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: install Kubebuilder
|
||||
uses: RyanSiu1995/kubebuilder-action@v1.2
|
||||
@@ -81,5 +81,5 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
file: ./coverage.txt
|
||||
flags: unittests
|
||||
flags: core-unittests
|
||||
name: codecov-umbrella
|
||||
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
# Binaries for programs and plugins
|
||||
# Binaries for programs and docgen
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
@@ -7,6 +7,7 @@
|
||||
bin
|
||||
_bin
|
||||
e2e/vela
|
||||
vela
|
||||
|
||||
# Test binary, build with `go test -c`
|
||||
*.test
|
||||
@@ -41,8 +42,13 @@ references/cmd/cli/fake/source.go
|
||||
references/cmd/cli/fake/chart_source.go
|
||||
charts/vela-core/crds/_.yaml
|
||||
.test_vela
|
||||
tmp/
|
||||
|
||||
.vela/
|
||||
|
||||
# check docs
|
||||
git-page/
|
||||
git-page/
|
||||
|
||||
# e2e rollout runtime image build
|
||||
runtime/rollout/e2e/tmp
|
||||
vela.json
|
||||
|
||||
@@ -33,8 +33,8 @@ spec:
|
||||
arch: amd64
|
||||
{{addURIAndSha "https://github.com/oam-dev/kubevela/releases/download/{{ .TagName }}/kubectl-vela-{{ .TagName }}-windows-amd64.zip" .TagName }}
|
||||
files:
|
||||
- from: "*/kubectl-vela.exe"
|
||||
to: "."
|
||||
- from: "*/kubectl-vela"
|
||||
to: "kubectl-vela.exe"
|
||||
- from: "*/LICENSE"
|
||||
to: "."
|
||||
bin: "kubectl-vela.exe"
|
||||
|
||||
260
CHANGELOG/CHANGELOG-1.0.md
Normal file
260
CHANGELOG/CHANGELOG-1.0.md
Normal file
@@ -0,0 +1,260 @@
|
||||
# v1.0.7
|
||||
|
||||
This is a minor fix for release-1.0, please refer to release-1.1.x for the latest feature.
|
||||
|
||||
1. Fix podDisruptive field for inner traits #1844
|
||||
|
||||
|
||||
# v1.0.6
|
||||
|
||||
1. fix bug: When the Component contains multiple traits of the same type, the status of the trait in the Application is reported incorrectly (#1731) (#1743)
|
||||
2. Fix terraform component can't work normally, generate OpenAPI JSON schema for Terraform Component (#1738) (#1753)
|
||||
3. Improve the logging system #1735 #1758
|
||||
4. add ConcurrentReconciles for setting the concurrent reconcile number of the controller #1775
|
||||
|
||||
# v1.0.5
|
||||
|
||||
1. Fix Terraform application status issue (#1611)
|
||||
2. application supports specifying different versions of Definition (#1597)
|
||||
3. Enable Dynamic Admission Control for Application (#1619)
|
||||
4. Update inner samples for "vela show xxx --web" (#1616)
|
||||
5. fix empty rolloutBatch will panic whole controller bug (#1646)
|
||||
6. Use stricter syntax check for CUE (#1643)
|
||||
7. make ResourceTracker to own cluster-scope resource (#1634)
|
||||
8. update docs
|
||||
|
||||
# v1.0.4
|
||||
|
||||
## Upgrade to this release
|
||||
|
||||
**Please update Application CRD to upgrade from v1.0.3 to this release**
|
||||
|
||||
```
|
||||
kubectl apply -f https://raw.githubusercontent.com/kubevela/kubevela/master/charts/vela-core/crds/core.oam.dev_applications.yaml
|
||||
```
|
||||
|
||||
**Check the upgrade docs to upgrade from other release: https://kubevela.io/docs/advanced-install#upgrade**
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
1. add more PVC volume traits and docs (#1524)
|
||||
2. automatically sync vela api code to the repo([kubevela-core-api](https://github.com/oam-dev/kubevela-core-api)) on release, you can use this repo as import package for kubevela integration (#1523)
|
||||
3. fix cue template of worker and ingress with more accurate error info (#1532)
|
||||
4. add critical path k8s event for Application (#1463)
|
||||
5. support K8s Deployment for AppRollout #1539 #1557
|
||||
6. vela cli: enable "vela show" to support namespaced capability (#1521)
|
||||
7. Add scpoe reference in Application object `status.Service` (#1540)
|
||||
8. vela cli: `vela show` support list the parameter of ComponentDefinition created by helm charts (#1543)
|
||||
9. Add revision mechanism for Component/Trait Definition and default revision histroy will keep 20 revisions #1531
|
||||
10. fix CRD for legacy K8s cluser(<=1.14) (#1531)
|
||||
11. fix duplate key in kubevela chart webhook yaml (#1571)
|
||||
12. Check whether parameter.cmd is nill for `sidecar` trait (#1575)
|
||||
13. add e2e-test into test coverage report (#1553)
|
||||
14. support krew install for kubectl vela plugin #1582
|
||||
15. fix controller cannot start due to the format error of the third-party CRD (#1584)
|
||||
16. use accelerate domain for helm chart repo to speed up for global users (#1585)
|
||||
17. embed rollout in an application, now you can use rolloutPlan in Application (#1568)
|
||||
18. Support server-side Terraform as cloud resource provider #1519
|
||||
|
||||
# v1.0.3
|
||||
|
||||
More end user guide was added in `Application Deployment` section.
|
||||
|
||||
1. add helm test to verify the chart of KubeVela have been installed successfully (#1415)
|
||||
2. fix bug which Component/TraitDefinition won't work when contains “`_|_`” in value (#1450)
|
||||
3. add volumes definition in worker/webservice (#1459)
|
||||
4. Remove local kind binary dependency #1458
|
||||
5. ignore error not found when deleting resourceTracker (#1462)
|
||||
6. add context.appRevisionNum as runtime context (#1466)
|
||||
7. implement cli `vela system live-diff` to check diff before upgrade (#1419)
|
||||
8. add webhook validation on CUE template outputs name (#1460)
|
||||
9. Fix helm chart about wrong webhook policy (#1483)
|
||||
10. Remove trait-injector from controller options (#1490)
|
||||
12. add app name as label for AppRevision (#1488)
|
||||
13. Introduce vela as a kubectl plugin (#1485)
|
||||
14. update status of appContext by patch to avoid resourceVersion conflict error (#1500)
|
||||
15. add workloadDefinitionRef to application status.services (#1471)
|
||||
16. Add garbage collection mechanism for AppRevision, it will only keep 10 revisions by default (#1501)
|
||||
17. Remove AGE in definition crd print columns (#1509)
|
||||
|
||||
|
||||
# v1.0.2
|
||||
|
||||
1. remove no used ingress notes in KubeVela charts (#1405)
|
||||
2. fix import inner package in the format of third party package path and add docs (#1412 #1417)
|
||||
3. vela cli support use "vela system cue-packages" to list cue-package (#1417)
|
||||
4. Fix bug that the registered k8s built-in gvk does not exist in third party package path (#1414)
|
||||
5. Fix bug that patchKey not work when strategyUnify function not work with close call (#1430)
|
||||
6. add podDisruptive to traitdefinition to notify wether a trait update will cause restart of pod or not (#1192)
|
||||
7. Add a new cloneset scale controller (#1301)
|
||||
8. Support garbage collection for across-namespace workloads and traits (#1421)
|
||||
9. Add short name for crds && Remove redundant and ambiguous short names #1434
|
||||
10. Refresh built-in packages when component/trait definition are registered (#1402)
|
||||
|
||||
|
||||
**You should upgrade following CRDs to upgrade from v1.0.1, all CRDs changes are backward compatible**:
|
||||
|
||||
```
|
||||
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_resourcetrackers.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/standard.oam.dev_rollouttraits.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_traitdefinitions.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_applications.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_approllouts.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml
|
||||
```
|
||||
|
||||
|
||||
# v1.0.1
|
||||
|
||||
There are some fixes contained for release v1.0.0:
|
||||
|
||||
1. add initial finalizer and abandon support for app rollout, you can revert quickly now(#1362)
|
||||
2. fix vela show fail to get component definition (#1366)
|
||||
3. fix application context controller should not own application object (#1370)
|
||||
4. fix: "system-definition-namespace" chart args not work in vela chart (#1371)
|
||||
5. fix resources created in different namespace can not be updated (#1374)
|
||||
6. fix automatically generate schema for helm values fail in array list value (#1375)
|
||||
7. upgrade API version of mutate/validate webhook to v1 (#1383)
|
||||
8. fix webhook not work by helm install kubevela without cert-manager #1267
|
||||
7. remove create cert-manager issuer in vela CLI env command (#1267)
|
||||
8. refine CRD print results: add additional print column and short Name for CRD (#1377)
|
||||
|
||||
Many other docs improvements.
|
||||
|
||||
Thanks for all the contributors!
|
||||
|
||||
# v1.0.0
|
||||
|
||||
We're excited to announce the release of KubeVela 1.0.0! 🎉🎉🎉🎉
|
||||
|
||||
Thanks to all the new and existing contributors who helped make this release happen!
|
||||
|
||||
You may already noticed the awesome community has shipped a brand new KubeVela website https://kubevela.io ! 🎉🎉
|
||||
|
||||
If you're new to KubeVela, feel free to start with its [getting started page](https://kubevela.io/docs/quick-start) and learning about [its core concepts](https://kubevela.io/docs/concepts). The full feature of vela is explained in [platform builder guide](https://kubevela.io/docs/platform-engineers/overview).
|
||||
|
||||
For existing adopters, please follow the [installing](https://kubevela.io/docs/install) or [upgrading](https://kubevela.io/docs/install#upgrade) KubeVela to version 1.0.0.
|
||||
|
||||
## Acknowledgements ❤️
|
||||
|
||||
Thanks to everyone who made this release possible!
|
||||
|
||||
@captainroy-hy @sunny0826 @leejanee @yangsoon @wangyikewxgm @hongchaodeng @zzxwill @ryanzhang-oss @resouer @wonderflow @hprotzek @vnzongzna @majian159 @Cweiping @mengjiao-liu @kushthedude @unknwon @Ghostbaby @mosesyou @dylandee @wangkai1994 @LeoLiuYan @just-do1 @hoopoe61 @Incubator4th @TomorJM @hahchenchen @zeed-w-beez @allenhaozi @mason1kwok @kinsolee @shikanon @96RadhikaJadhav
|
||||
|
||||
# What's New
|
||||
|
||||
## API version upgraded to `v1beta1`
|
||||
|
||||
All user facing APIs have been upgraded to `v1beta1`, you could learn more details in the [API Changes](#API-Changes) section below.
|
||||
|
||||
## `ComponentDefinition`
|
||||
|
||||
The [`ComponentDefinition`](https://kubevela.io/docs/platform-engineers/definition-and-templates) now takes the responsibility of defining encapsulation and abstraction for your app components. And you are free to choose to use Helm chart or CUE to define them. This leaves `WorkloadDefinition` focusing on declaring workload characteristic such as `replicable`, `childResource` etc, so the `spec.schematic` field in `WorkloadDefinition` could be deprecated in next few releases.
|
||||
|
||||
## Application Versioning and Progressive Rollout
|
||||
|
||||
* A rolling style upgrade was supported by the object called [`AppRollout`](https://kubevela.io/docs/rollout/rollout/). It can help you to upgrade an Application from source revision to the target and support Blue/Green, Canary and A/B testing rollout strategy.
|
||||
* Multi-Version, Multi-Cluster Application Deployment was supported by the object called [`AppDeployment`](https://kubevela.io/docs/rollout/appdeploy). It can help you to deploy multiple revision apps to multiple clusters with leverage of Service Mesh.
|
||||
|
||||
## Visualization Enhancement
|
||||
|
||||
KubeVela now automatically generates Open-API-v3 Schema for all the definition abstractions including CUE, Helm and raw Kubernetes resource templates. You can integrate KubeVela with your own dashboard and [generate forms from definitions](https://kubevela.io/docs/platform-engineers/openapi-v3-json-schema) at ease!
|
||||
|
||||
## Application Abstraction
|
||||
|
||||
There're several major updates on the `Application` abstraction itself:
|
||||
* [Helm based abstraction](https://kubevela.io/docs/helm/component) was supported with few [limitations](https://kubevela.io/docs/helm/known-issues). In other words, you can now declare any existing Helm chart as an app component in KubeVela. The most exciting part is the trait system of KubeVela works seamlessly with the Helm based components, yes, just [attach trait](https://kubevela.io/docs/helm/trait) to it!
|
||||
* [Raw Kubernetes resource templates](https://kubevela.io/docs/kube/component) was still supported, that's simpler but less powerful comparing to [the CUE way](https://kubevela.io/docs/cue/component). Of course, the trait system also [works seamless](https://kubevela.io/docs/kube/trait) with it.
|
||||
|
||||
|
||||
## CUE Template Enhancement
|
||||
|
||||
* [Runtime information context](https://kubevela.io/docs/cue/component#full-available-information-in-cue-context) was supported, you could use this information to render the resources in CUE template.
|
||||
* [Data passing](https://kubevela.io/docs/cue/advanced#data-passing) was supported during CUE rendering. Specifically, the `context.output` contains the rendered workload API resource and the `context.outputs.<xx>` contains all the other rendered API resources.
|
||||
* [K8s API resources are now built-in packages](https://kubevela.io/docs/cue/basic#import-kube-package): the K8s built-in API including CRD will be discovered by KubeVela and automatically built as CUE packages, you can use it in your CUE template. This is very helpful in validation especially on writing new CUE templates.
|
||||
* [Dry-run Application](https://kubevela.io/docs/platform-engineers/debug-test-cue) was supported along with a debug and test guide for building CUE template. You can create CUE based definitions with confidence now!
|
||||
* [Deploy resources in different namespaces](https://kubevela.io/docs/cue/cross-namespace-resource/) was supported now, you can specify namespace in your CUE template.
|
||||
|
||||
## Declare and Consume Cloud Resources
|
||||
|
||||
* [Declare and consume cloud resources](https://kubevela.io/docs/platform-engineers/cloud-services/) were supported now in KubeVela, you can easily register cloud resources by `ComponentDefinition` and bind the service into the applications.
|
||||
|
||||
## A brand new website
|
||||
|
||||
We have upgraded our website [kubevela.io](https://github.com/oam-dev/kubevela.io) based on "Docusaurus". All docs is automatically generated from [KubeVela](https://github.com/oam-dev/kubevela/tree/master/docs) while the blogs are on [kubevela.io/blogs](https://github.com/oam-dev/kubevela.io/tree/main/blog).
|
||||
|
||||
|
||||
# Changes
|
||||
|
||||
## API Changes
|
||||
|
||||
1. Change definition from cluster scope to namespace scope #1085 the cluster scope CRD was still compatible.
|
||||
2. Application Spec changes.
|
||||
- `spec.components[x].settings` in v1alpha2 was changed to `spec.components[x].properties` in v1beta1
|
||||
- `spec.components[x].traits[x].name` in v1alpha2 was changed to `spec.components[x].traits[x].type` in v1beta1
|
||||
|
||||
Example of the v1alpha2 Spec:
|
||||
|
||||
```
|
||||
apiVersion: core.oam.dev/v1alpha2
|
||||
kind: Application
|
||||
metadata:
|
||||
name: first-vela-app
|
||||
spec:
|
||||
components:
|
||||
- name: express-server
|
||||
type: webservice
|
||||
settings:
|
||||
...
|
||||
traits:
|
||||
- name: ingress
|
||||
properties:
|
||||
...
|
||||
```
|
||||
|
||||
Example of the v1beta1 Spec:
|
||||
|
||||
```
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: first-vela-app
|
||||
spec:
|
||||
components:
|
||||
- name: express-server
|
||||
type: webservice
|
||||
properties:
|
||||
...
|
||||
traits:
|
||||
- type: ingress
|
||||
properties:
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
## Deprecation
|
||||
|
||||
1. route/autoscaler/metrics these three traits and their controllers were moved out from the vela core. #1172 You could still find and use them from https://github.com/oam-dev/catalog.
|
||||
2. the dashboard was deprecated in KubeVela and we will merge these features and create a new in [velacp](https://github.com/oam-dev/velacp) soon.
|
||||
3. vela CLI will only support run/modify an app from appfile by using `vela up`, so some other commands related were deprecated, such as `vela svc deploy`, `vela <trait> ...`
|
||||
|
||||
|
||||
## Other Notable changes
|
||||
|
||||
1. `prometheus` and `certmanager` CRD are not required in installation #1005
|
||||
2. Parent overrides child when annotation/labels conflicts && one revision will apply once only in force mode && AC.status CRD updated #1109
|
||||
3. `ApplicationRevision` CRD Object was introduced as revision of Application #1214
|
||||
4. KubeVela chart image pull policy was changed to `Always` from `IfNotPresent` #1228
|
||||
5.` Application` Controller will use `AppContext` to manage the resources generation #1245, in other word, you can run KubeVela `Application Controller` without any `v1apha2 Object`.
|
||||
6. The regular time for all events automatically sync changed from 5min to 1 hour #1285
|
||||
7. `vela system dry-run` will print raw K8s resources in a better format #1246
|
||||
|
||||
|
||||
# Known Issues
|
||||
|
||||
1. Built-in CUE package was not supported now for K8s Cluster v1.20, we will support in the next release. #1313
|
||||
2. Resources created in different namespace from application will only be garbage collected (GC) when the application deleted, an update will not trigger GC for now, we will fix it in the next release. #1339
|
||||
|
||||
|
||||
Thanks again to all the contributors!
|
||||
243
CHANGELOG/CHANGELOG-1.1.md
Normal file
243
CHANGELOG/CHANGELOG-1.1.md
Normal file
@@ -0,0 +1,243 @@
|
||||
# v1.1.3
|
||||
|
||||
## What's Changed
|
||||
* Fix: remove ocm addon enable in Makefile by @Somefive in https://github.com/oam-dev/kubevela/pull/2327
|
||||
* Chore(cli): remove useless deploy.yaml by @chivalryq in https://github.com/oam-dev/kubevela/pull/2335
|
||||
* Fix: do not override the workload name if its specified by @FogDong in https://github.com/oam-dev/kubevela/pull/2336
|
||||
* Fix: remove appcontext CRD and controller by @wonderflow in https://github.com/oam-dev/kubevela/pull/2270
|
||||
* Feat: add revisionHistoryLimit to helm chart by @haugom in https://github.com/oam-dev/kubevela/pull/2343
|
||||
* Chore: deprecate 'vela dashboard' apiserver by @chivalryq in https://github.com/oam-dev/kubevela/pull/2341
|
||||
* Chore: remove e2e-api-test in rollout test to speed up by @chivalryq in https://github.com/oam-dev/kubevela/pull/2345
|
||||
* Docs: rollout demo by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2348
|
||||
* Feat: add vela minimal chart by @FogDong in https://github.com/oam-dev/kubevela/pull/2340
|
||||
* Fix: runc security issue by @Somefive in https://github.com/oam-dev/kubevela/pull/2350
|
||||
* Docs: add a WeChat QR code by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2351
|
||||
* Feat: Initialize api for vela dashboard and CLI by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2339
|
||||
* Fix(helm chart): fix startup args for apiserver by @yangsoon in https://github.com/oam-dev/kubevela/pull/2362
|
||||
* Fix: dockerfile e2e test command lack environment configuration by @Somefive in https://github.com/oam-dev/kubevela/pull/2231
|
||||
* Feat: inputs support setting value in array by @leejanee in https://github.com/oam-dev/kubevela/pull/2358
|
||||
* Feat: support rollout controller for StatefulSet by @whichxjy in https://github.com/oam-dev/kubevela/pull/1969
|
||||
* Fix: delete deprecated vela dashboard in e2e setup by @FogDong in https://github.com/oam-dev/kubevela/pull/2379
|
||||
* Fix: try fix CI unit test by @wonderflow in https://github.com/oam-dev/kubevela/pull/2376
|
||||
* Feat: Addon REST API by @hongchaodeng in https://github.com/oam-dev/kubevela/pull/2369
|
||||
* Fix: fix built in workflow steps by @FogDong in https://github.com/oam-dev/kubevela/pull/2378
|
||||
* Feat: add vela minimal in make manifests by @FogDong in https://github.com/oam-dev/kubevela/pull/2389
|
||||
* Chore(deps): bump go.mongodb.org/mongo-driver from 1.3.2 to 1.5.1 by @wonderflow in https://github.com/oam-dev/kubevela/pull/2391
|
||||
* Fix: use aliyun oss istio chart by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2392
|
||||
* Support remote git repo for Terraform configuration by @zzxwill in https://github.com/oam-dev/kubevela/pull/2337
|
||||
* Feat: add inputs test cases and optimize code by @leejanee in https://github.com/oam-dev/kubevela/pull/2388
|
||||
* Fix: pass owner to workload if rollout failed by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2397
|
||||
* Feat: bootstrap multicluster testing by @Somefive in https://github.com/oam-dev/kubevela/pull/2368
|
||||
* Feat(workflow): add depends on in workflow by @FogDong in https://github.com/oam-dev/kubevela/pull/2387
|
||||
* Fix: make the name of Terraform credential secret same to component name by @zzxwill in https://github.com/oam-dev/kubevela/pull/2399
|
||||
* Fix: revision GC in workflow mode by @FogDong in https://github.com/oam-dev/kubevela/pull/2355
|
||||
* Fix: Applied Resources Statistics Error by @leejanee in https://github.com/oam-dev/kubevela/pull/2398
|
||||
|
||||
|
||||
# v1.1.2
|
||||
|
||||
This is a bug fix release.
|
||||
Since the big v1.1.1 release, many users had given it try for our new features. We sincerely appreciate your enthusiasm and amazing feedback.
|
||||
|
||||
There are some small issues found by our users and we have fixed them. Most notably:
|
||||
|
||||
- The Charts of addons (prometheus, etc.) are moved to OSS to provide better accessibility and network speed.
|
||||
- The FluxCD and Terraform addons are not enabled by default. Users can install them via `vela addon enable ...`.
|
||||
|
||||
We have located more small issues around templates as well and fixed them, and decided a bug fix release ASAP.
|
||||
|
||||
Users are highly recommended to use the v1.1.2 release instead. We want to thank all of our users sincerely! ❤️ ❤️ ❤️
|
||||
|
||||
## What's Changed
|
||||
* Fix(rollout): improve rollback experience by @hongchaodeng in https://github.com/oam-dev/kubevela/pull/2294
|
||||
* Fix: fix typo by @hughxia in https://github.com/oam-dev/kubevela/pull/2317
|
||||
* Fix: fix cluster-gateway image tag in chart by @Somefive in https://github.com/oam-dev/kubevela/pull/2318
|
||||
* Fix: workflow example by @leejanee in https://github.com/oam-dev/kubevela/pull/2323
|
||||
* Fix: fix multicluster values bug by @Somefive in https://github.com/oam-dev/kubevela/pull/2326
|
||||
* Fix(helm): Do not install fluxcd and terraform by default by @yangsoon in https://github.com/oam-dev/kubevela/pull/2328
|
||||
* Fix: move charts from github repo to Alibaba Cloud OSS repo by @zzxwill in https://github.com/oam-dev/kubevela/pull/2324
|
||||
* Fix: add comments and adjust helm typed component's spec by @zzxwill in https://github.com/oam-dev/kubevela/pull/2332
|
||||
* Fix: fix multicluster template bug by @Somefive in https://github.com/oam-dev/kubevela/pull/2333
|
||||
* Feat: add args for init-contianer and sidecar by @Gallardot in https://github.com/oam-dev/kubevela/pull/2331
|
||||
|
||||
# v1.1.1
|
||||
|
||||
Users are highly recommended to use the v1.1.2 release instead.
|
||||
|
||||
# Changes since v1.1.0
|
||||
|
||||
1. rollout trait change IncreaseFirst to DecreaseFirst (#2142)
|
||||
2. Feat(definition): add built-in dingtalk workflow step definition (#2152)
|
||||
3. Fix(dryrun): add default name and namespace in dry run (#2150)
|
||||
4. Docs: fix typo about workflow rollout (#2163)
|
||||
5. Fix: traitdefinition controller reconcile in a infinite loop (#2157)
|
||||
6. Refactor: change the ownerReference of configMap which store the parameter for each revision to definitionRevision (#2164)
|
||||
7. Fix: add fluxcd dashbaords (#2130)
|
||||
8. Feat: modify apply component cue action to support skipWorkload trait (#2167)
|
||||
9. Trait: Add TraitDefinition for PVC (#2158)
|
||||
10. initilize KubeVela codeowner file (#2178)
|
||||
11. Feat(cue): support access components artifacts in cue template context (#2161)
|
||||
12. Feat(addon): add default enable addon (#2172)
|
||||
13. Feat(envbinding): add resourceTracker for envBinding (#2179)
|
||||
14. Fix: align all CUE template keyword to use parameter (#2181)
|
||||
15. Feat: add vela live-diff , dry-run, cue-packages into vela commands (#2182)
|
||||
16. Fix: move Terraform defintions charts/vela-core/templates/definitions (#2176)
|
||||
17. Fix: add patchkey to volumes (#2191)
|
||||
18. Feat(workflow): add depends-on workflow step definition (#2190)
|
||||
19. Feat: add pprof (#2192)
|
||||
20. Feat: add more registry traits as internal ones (#2184)
|
||||
21. Fix: support more Terraform variable types (#2194)
|
||||
22. Fix: update help message of ingress trait (#2198)
|
||||
23. Refactor(#2185): remove unused config options in Makefile (#2200)
|
||||
24. Docs: update environment design (#2199)
|
||||
25. Fix: modify service-binding with more accurate type (#2209)
|
||||
26. Feat(healthscope): add health-scope-binding policy and e2e test for health scope (#2205)
|
||||
27. Feat(workflow): support dingding and slack in webhook notification (#2213)
|
||||
28. Feat(workflow): add apply application workflow step definition (#2186)
|
||||
29. Feat(workflow): input.ParameterKey described like paths notation (#2214)
|
||||
30. Fix(upgrade): upgrade controller-tools from 0.2 to 0.6.2 (#2215)
|
||||
31. Fix(app): When only the policy is specified, the resources in the app need to be rendered and created (#2197)
|
||||
32. Feat(workflow): outputs support script notation (#2218)
|
||||
33. Fix(addon): rename clonset-service to clonse (#2219)
|
||||
34. Feat(workflow): Add op.#Task action (#2220)
|
||||
35. Fix(webhook): only check the uniqueness of component names under the same namespace (#2222)
|
||||
36. Feat(apiserver): add apiserver service to helm chart (#2225)
|
||||
37. Fix: add flag --label to filer components and traits (#2217)
|
||||
38. Fix(addons): remove kruise addon (#2226)
|
||||
39. Feat: add pressure-test parameter optimize (#2230)
|
||||
40. Fix: align the envbind-app name with the original application name (#2232)
|
||||
41. Feat(workflow): add status check for workflow mutil-env deploy (#2229)
|
||||
42. Refactor: move from io/ioutil to io and os package (#2234)
|
||||
43. Feat(trait): annotation and labels trait should also affect the workload object along with pod (#2237)
|
||||
44. Feat(app): show health status from HealthScope in application (#2228)
|
||||
45. Fix: kustomize json patch trait definition (#2239)
|
||||
46. Docs: canary rollout demo (rollout part only) (#2177)
|
||||
47. Feat: vela show annotations display undefined should be refined (#2244)
|
||||
48. Feat: support code-generator and sync to kubevela-core-api (#2174)
|
||||
49. Feat: add image auto update for gitops (#2251)
|
||||
50. Fix: fix the output DB_PASSWORD for rds definition (#2267)
|
||||
51. Fix: add alibaba eip cloud resource (#2268)
|
||||
52. Refactor application code to make it run as Dag workflow (#2236)
|
||||
53. Fix: remove podspecworkload controller and CRD (#2269)
|
||||
54. Feat: add more options for leader election configuration to avoid pressure on apiserver
|
||||
55. Feat: istio addon and use case demo (#2276)
|
||||
56. Fix: patch any key using retainKeys strategy (#2280)
|
||||
57. Fix: add exponential backoff wait time for workflow reconciling (#2279)
|
||||
58. Refactor: change field exportKey to valueFrom (#2284)
|
||||
59. Fix(helm): enable apiserver by default (#2249)
|
||||
60. Feat: alibaba provider addon (#2243)
|
||||
61. Support MultiCluster EnvBinding with cluster-gateway (#2247)
|
||||
62. Fix: fix apply application workflow step (#2288)
|
||||
63. Fix: fix alibaba cloud rds module (#2293)
|
||||
64. Feat: add commit msg in kustomize (#2296)
|
||||
65. Feat: allow user specify alibaba provider addon's region (#2297)
|
||||
66. Fix: generate service in canary-traffic trait (#2300)
|
||||
67. Fix: imagePullSecrets error from cloneset (#2305)
|
||||
68. Fix: add application logging dashboard (#2301)
|
||||
69. Feat: Make applicationComponent can be modified in step (#2304)
|
||||
70. Fix: generate service in canary-traffic trait (#2307)
|
||||
|
||||
|
||||
# v1.1.0
|
||||
|
||||
Note: the documents (https://kubevela.io/) for v1.1.0 is still WIP, so we mark it as pre-release. The ETA for documents is next 2 weeks.
|
||||
|
||||
We would like to extend our thanks to all [the new and existing contributors](https://github.com/oam-dev/kubevela/graphs/contributors) who helped make this release happen.
|
||||
|
||||
Please follow the guide to [install](https://kubevela.io/docs/next/getting-started/quick-install) or [upgrade](https://kubevela.io/docs/next/platform-engineers/advanced-install/) KubeVela to version v1.1.0.
|
||||
|
||||
## What's New
|
||||
|
||||
- **Hybrid Environment App Delivery Control plane**
|
||||
- In the new release, we have fully upgraded KubeVela to a multi-cluster/hybrid-cloud/multi-cloud app delivery control plane with leverage of OAM as the consistent app delivery model across clouds and infrastructures.
|
||||
- **Workflow**
|
||||
- KubeVela has added a Workflow mechanism that empowers users to glue any operational tasks to customize the control logic to build more complex operations. Workflow is modular by design and each module is mainly composed in CUE -- so you can define complex operations in a declarative, data-driven manner.
|
||||
- **Environment**
|
||||
- KubeVela added an Initializer which allow users to define what constructs the environment. The environment Initialized by the Initilizer could contain different kinds of resources include K8s cluster, system components, policies and almost everything. Of course, you can destry an environment very easily with the help of Initializer.
|
||||
- **Out of Box Addons**
|
||||
- With the help of Initilizer, KubeVela has support lots of out of box addons. You can list/enable/disable them by `vela addon` command. Each addon is an Initializer that deloy the CRD Controllers and other resources related.
|
||||
- **Cloud Resources Support**
|
||||
- We also support terraform to provision almost every cloud resources and pass through to other components defined in KubeVela application.
|
||||
- **Tools to edit and manage X-Definition**
|
||||
- We also provide the `vela def` tool sets to provide unified CUE based capability to manage X-Definition.
|
||||
- **Others**
|
||||
- Allow specify name for component revision auto-generated by Application. Allow specify name for auto generated Definition revision.
|
||||
- Controller runtime dependency upgrade that can compatible with Kubernetes v1.21 . KubeVela support Kubernetes v1.18~v1.21.
|
||||
- Other details you could read changelog in the release history.
|
||||
|
||||
## Change log since v1.1-rc2
|
||||
|
||||
1. fix configmap patchkey bug (#2080)
|
||||
2. Merge velacp to apiserver branch in oam repo (#2039) (#2127) (#2087)
|
||||
3. support rollout controller seprated and install as helm chart in runtime cluster (#2075)
|
||||
4. fix bug that KubeVela can not be installed in specified namespace (#2083)
|
||||
5. enable vela def to use import decl (#2084)
|
||||
6. enhance envbinding: support apply resources to cluster (#2093)
|
||||
7. Add obsevability addon (#2091)
|
||||
8. Feat(vela): add vela workflow suspend command (#2108)
|
||||
9. feat(def): add built-in workflow definitions (#2094)
|
||||
10. Feat(vela): add vela workflow resume command (#2114)
|
||||
11. upgrade openkruise version to v0.9.0 (#2076)
|
||||
12. Fix(workflow): set workload name in configmap if the name is not specified (#2119)
|
||||
13. helm component support OSS bucket (#2104)
|
||||
14. add rollout demo with Workflow (#2121)
|
||||
15. Support script as parameter and make the WorkflowStepDefinition more universal (#2124)
|
||||
16. fix(cli) fix bug when vela show componetdefinition's workload type is AutoDetectWorkloadDefinition (#2125)
|
||||
17. Fix(workflow): set the namespace to app's ns if it's not specified (#2133)
|
||||
18. fix specify external revision bug (#2126)
|
||||
19. add CUE-based health check in HealthScope controller (#1956)
|
||||
20. Feat(addon): Add source and patch to kustomize definition (#2138)
|
||||
21. Feat(vela): add vela workflow terminate and restart command (#2131)
|
||||
|
||||
|
||||
# v1.1.0-rc.2
|
||||
|
||||
1. Allow users to specify component revision name in Application (#1929) the new field `externalRevision` can specify the revision name.
|
||||
|
||||
```
|
||||
kind: Application
|
||||
spec:
|
||||
components:
|
||||
- name: mycomp
|
||||
type: webservice
|
||||
externalRevision: my-revision-v1
|
||||
properties:
|
||||
...
|
||||
```
|
||||
|
||||
2. Add more workflow demo and fix some demos #2042 #2059 #2060 #2064
|
||||
3. Add cloneset ComponentDefinition into kruise addon (#2050)
|
||||
4. definitions support specify the revision name (#2044), you can specify the name by adding an annotation `definitionrevision.oam.dev/name`
|
||||
|
||||
```
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
name: worker
|
||||
annotations:
|
||||
# you can specify the revision name in annotations
|
||||
definitionrevision.oam.dev/name: "1.1.3"
|
||||
spec:
|
||||
...
|
||||
```
|
||||
|
||||
5. fix definition controller log error cause by openapi schema generation error (#2063)
|
||||
6. Add add-on input go-template implementation (#2049)
|
||||
|
||||
# v1.1.0-rc.1
|
||||
|
||||
|
||||
1. Workflow support specify Order Steps by Field Tag (#2022)
|
||||
2. support application policy (#2011)
|
||||
3. add OCM multi cluster demo (#1992)
|
||||
4. Fix(volume): seperate volume to trait (#2027)
|
||||
5. allow application skip gc resource and leave workload ownerReference controlled by rollout(#2024)
|
||||
6. Store component parameters in context (#2030)
|
||||
7. Allow specify chart values for helm trait(#2033)
|
||||
8. workflow support http provider (#2029)
|
||||
9. Use vela def commands to replace mergedef.sh for internal definition generation (#2031)
|
||||
|
||||
|
||||
# Other release histories
|
||||
|
||||
Refer to https://github.com/oam-dev/kubevela/releases
|
||||
205
CHANGELOG/CHANGELOG-1.2.md
Normal file
205
CHANGELOG/CHANGELOG-1.2.md
Normal file
@@ -0,0 +1,205 @@
|
||||
# v1.2.2
|
||||
|
||||
|
||||
## What's Changed
|
||||
* Feat: add JFrog webhook trigger by @chwetion in https://github.com/oam-dev/kubevela/pull/3104
|
||||
* Fix: trait/comp command output without a new line by @chivalryq in https://github.com/oam-dev/kubevela/pull/3112
|
||||
* Feat: support wild match for env patch by @Somefive in https://github.com/oam-dev/kubevela/pull/3111
|
||||
* Fix: fix revision will change when add new trait with skiprevisionaffect to application by @chwetion in https://github.com/oam-dev/kubevela/pull/3032
|
||||
* Fix: add app samples for Terraform definition by @zzxwill in https://github.com/oam-dev/kubevela/pull/3118
|
||||
* Feat: add port name in webservice by @FogDong in https://github.com/oam-dev/kubevela/pull/3110
|
||||
* Fix: add imagePullSecrets for helm templates to support private docker registry by @StevenLeiZhang in https://github.com/oam-dev/kubevela/pull/3122
|
||||
* Fix: workflow skip executing all steps occasionally by @leejanee in https://github.com/oam-dev/kubevela/pull/3025
|
||||
* Fix: support generate Terraform ComponentDefinition from local HCL file by @zzxwill in https://github.com/oam-dev/kubevela/pull/3132
|
||||
* Fix: prioritize namespace flag for `vela up` by @devholic in https://github.com/oam-dev/kubevela/pull/3135
|
||||
* Fix: handle workflow cache reconcile by @FogDong in https://github.com/oam-dev/kubevela/pull/3128
|
||||
* Feat: extend gateway trait to set class in spec by @devholic in https://github.com/oam-dev/kubevela/pull/3138
|
||||
* Fix: add providerRef in generated ComponentDefinition by @zzxwill in https://github.com/oam-dev/kubevela/pull/3142
|
||||
* Fix: retrieve Terraform variables from variables.tf by @zzxwill in https://github.com/oam-dev/kubevela/pull/3149
|
||||
* Feat: addon parameter support ui-shcema by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3154
|
||||
* Fix: vela addnon enable cannot support '=' by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3156
|
||||
* Fix: add context parameters into the error message by @zeed-w-beez in https://github.com/oam-dev/kubevela/pull/3145
|
||||
* Feat: support vela show for workflow step definition by @FogDong in https://github.com/oam-dev/kubevela/pull/3140
|
||||
|
||||
## New Contributors
|
||||
* @devholic made their first contribution in https://github.com/oam-dev/kubevela/pull/3135
|
||||
|
||||
**Full Changelog**: https://github.com/oam-dev/kubevela/compare/v1.2.1...v1.2.2
|
||||
|
||||
# v1.2.1
|
||||
|
||||
## What's Changed
|
||||
|
||||
* Fix: can't query data from the MongoDB by @barnettZQG in https://github.com/oam-dev/kubevela/pull/3095
|
||||
* Fix: use personal token of vela-bot instead of github token for homebrew update by @wonderflow in https://github.com/oam-dev/kubevela/pull/3096
|
||||
* Fix: acr image no version by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3100
|
||||
* Fix: support generate cloud resource docs in Chinese by @zzxwill in https://github.com/oam-dev/kubevela/pull/3079
|
||||
* Fix: clear old data in mongodb unit test case by @barnettZQG in https://github.com/oam-dev/kubevela/pull/3103
|
||||
* Feat: support external revision in patch component by @Somefive in https://github.com/oam-dev/kubevela/pull/3106
|
||||
* Fix: file under the path of github addon registry is not ignored by @StevenLeiZhang in https://github.com/oam-dev/kubevela/pull/3099
|
||||
* Fix: Vela is crashed, when disabling addon, which needs namespace vela-system by @StevenLeiZhang in https://github.com/oam-dev/kubevela/pull/3109
|
||||
* Fix: rollout workload namespace not aligned with rollout by @Somefive in https://github.com/oam-dev/kubevela/pull/3107
|
||||
|
||||
## New Contributors
|
||||
* @StevenLeiZhang made their first contribution in https://github.com/oam-dev/kubevela/pull/3099
|
||||
|
||||
**Full Changelog**: https://github.com/oam-dev/kubevela/compare/v1.2.0...v1.2.1
|
||||
|
||||
|
||||
# v1.2.0
|
||||
|
||||
❤️ KubeVela v1.2.0 released ! ❤️
|
||||
|
||||
Docs have been updated about the release at https://kubevela.io/docs/next/ .
|
||||
|
||||
**Changelog Between v1.2.0-rc.2~v1.2.0**: https://github.com/oam-dev/kubevela/compare/v1.2.0-rc.2...v1.2.0
|
||||
|
||||
## What's New
|
||||
|
||||
### UI Console Supported
|
||||
|
||||
Check how to use the GUI by this [how-to document](https://kubevela.io/docs/next/how-to/dashboard/application/create-application).
|
||||
|
||||
**GUI frontend code repo is here: https://github.com/oam-dev/velaux**
|
||||
**API Server Code is here: https://github.com/oam-dev/kubevela/tree/master/pkg/apiserver**
|
||||
|
||||
We also add a [VelaQL](https://kubevela.io/docs/next/platform-engineers/system-operation/velaql) feature that could allow apiserver to interact with K8s Object in an extended way.
|
||||
|
||||
### Addon System
|
||||
|
||||
We add a new addon system in v1.2, this helps KubeVela install it's extension including more than X-Definition files.
|
||||
|
||||
The community has already supported some built-in addons here(https://github.com/oam-dev/catalog/tree/master/addons ), there're also some experimental addons here (https://github.com/oam-dev/catalog/tree/master/experimental/addons)。
|
||||
|
||||
You can learn how to use it [from docs](https://kubevela.io/docs/next/how-to/cli/addon/addon).
|
||||
|
||||
You can [build and contribute](https://kubevela.io/docs/next/platform-engineers/addon/intro) your own addons.
|
||||
|
||||
### CI/CD Integration
|
||||
|
||||
You can use triggers to integrate with different CI and image registry systems on VelaUX.
|
||||
|
||||
* Feat: add ACR webhook trigger for CI/CD (#3044)
|
||||
* Feat: add Harbor image registry webhook trigger for CI/CD (#3065)
|
||||
* Feat: add DockerHub webhook trigger for CI/CD (#3081)
|
||||
|
||||
### Cloud Resources Enhancement
|
||||
|
||||
* Feature: support terraform/provider-azure addon by @zzxwill in https://github.com/oam-dev/kubevela/pull/2402
|
||||
* Fix: aws/azure Terraform provider are broken by @zzxwill in https://github.com/oam-dev/kubevela/pull/2513 , https://github.com/oam-dev/kubevela/pull/2520 , https://github.com/oam-dev/kubevela/pull/2465
|
||||
* Feat: Add Terraform Azure Storage Account by @maciejgwizdala in https://github.com/oam-dev/kubevela/pull/2646
|
||||
* Docs: add vpc and vswitch cloud resource templates of alicloud by @lowkeyrd in https://github.com/oam-dev/kubevela/pull/2663
|
||||
* Fix: allow external cloud resources to be kept when Application is deleted by @zzxwill in https://github.com/oam-dev/kubevela/pull/2698
|
||||
* Feat: add alibaba cloud redis definition by @chivalryq in https://github.com/oam-dev/kubevela/pull/2507
|
||||
* Feat: envbinding support cloud resource deploy and share by @Somefive in https://github.com/oam-dev/kubevela/pull/2734
|
||||
* Fix: support naming a terraform provider by @zzxwill in https://github.com/oam-dev/kubevela/pull/2794
|
||||
|
||||
|
||||
### Multi-Cluster Enhancement
|
||||
|
||||
* Feat: multicluster support ServiceAccountToken by @Somefive in https://github.com/oam-dev/kubevela/pull/2356
|
||||
* Feat: add secure tls for cluster-gateway by @Somefive in https://github.com/oam-dev/kubevela/pull/2426
|
||||
* Feat: add support for envbinding with namespace selector by @Somefive in https://github.com/oam-dev/kubevela/pull/2432
|
||||
* Feat: upgrade cluster gateway to support remote debug by @Somefive in https://github.com/oam-dev/kubevela/pull/2673
|
||||
* Feat: set multicluster enabled by default by @Somefive in #2930
|
||||
|
||||
### Workflow Enhancement
|
||||
|
||||
* Feat: add apply raw built in workflow steps by @FogDong in https://github.com/oam-dev/kubevela/pull/2420
|
||||
* Feat: add read object step def by @FogDong in https://github.com/oam-dev/kubevela/pull/2480
|
||||
* Feat: add export config and secret def for workflow by @FogDong in https://github.com/oam-dev/kubevela/pull/2484
|
||||
* Feat: support secret in webhook notification by @FogDong in https://github.com/oam-dev/kubevela/pull/2509
|
||||
* Feat: Record workflow execution state by @leejanee in https://github.com/oam-dev/kubevela/pull/2479
|
||||
* Fix(cli): use flag instead of env in workflow cli by @FogDong in https://github.com/oam-dev/kubevela/pull/2512
|
||||
* Not update resource if render hash equal. by @leejanee in https://github.com/oam-dev/kubevela/pull/2522
|
||||
* Feat: add email support in webhook notification by @FogDong in https://github.com/oam-dev/kubevela/pull/2535
|
||||
* Feat: add render component and apply component remaining by @FogDong in https://github.com/oam-dev/kubevela/pull/2587
|
||||
* Feat: add list application records api by @FogDong in https://github.com/oam-dev/kubevela/pull/2757
|
||||
* Feat: component-pod-view support filter resource by cluster name and cluster namespace by @yangsoon in https://github.com/oam-dev/kubevela/pull/2754
|
||||
* Feat: workflow support update by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2760
|
||||
* Feat: add workflow reconciling backoff time and failed limit times by @FogDong in #2881
|
||||
|
||||
### Component/Trait Enhancement
|
||||
|
||||
* Feat: add health check and custom status for helm type component by @chivalryq in https://github.com/oam-dev/kubevela/pull/2499
|
||||
* Feat: add nocalhost dev config trait definition by @yuyicai in https://github.com/oam-dev/kubevela/pull/2545
|
||||
* Feat(rollout): fill rolloutBatches if empty when scale up/down by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2569
|
||||
* Feat: allow import package in custom status cue template by @Chwetion in https://github.com/oam-dev/kubevela/pull/2585
|
||||
* Feat: add trait service-account by @yangsoon in https://github.com/oam-dev/kubevela/pull/2878
|
||||
* Fix: add ingress class as arguments by @Somefive in https://github.com/oam-dev/kubevela/pull/2445
|
||||
* Fix: add libgit2 support for gitops by @FogDong in https://github.com/oam-dev/kubevela/pull/2477
|
||||
* Fix: make nginx class to be default value and allow pvc trait to attach more than once by @wonderflow in https://github.com/oam-dev/kubevela/pull/2466
|
||||
* Feat: add imagePullPolicy/imagePullSecret to task def by @chivalryq in https://github.com/oam-dev/kubevela/pull/2503
|
||||
|
||||
|
||||
### Vela CLI Enhancement
|
||||
|
||||
* Feat: add vela prob to test cluster by @wonderflow in https://github.com/oam-dev/kubevela/pull/2635
|
||||
* Feat: vela logs support multicluster by @chivalryq in https://github.com/oam-dev/kubevela/pull/2593
|
||||
* Feat: vela-cli support use ocm to join/list/detach cluster by @yangsoon in https://github.com/oam-dev/kubevela/pull/2599
|
||||
* Feat: add vela exec for multi cluster by @wonderflow in https://github.com/oam-dev/kubevela/pull/2299
|
||||
* Feat: multicluster vela status/exec/port-forward by @Somefive in https://github.com/oam-dev/kubevela/pull/2662
|
||||
* Fix: support `-n` flag for all commands to specify namespace by @chivalryq in https://github.com/oam-dev/kubevela/pull/2719
|
||||
* Feat: vela delete add wait and force options by @yangsoon in https://github.com/oam-dev/kubevela/pull/2747
|
||||
* Feat: add workflow rollback cli by @FogDong in https://github.com/oam-dev/kubevela/pull/2795
|
||||
* Refactor: refine cli commands && align kubectl-vela with vela && use getnamespaceAndEnv for all by @wonderflow in #3048
|
||||
|
||||
|
||||
### Overall Enhancements
|
||||
|
||||
* Feat: ResourceTracker new architecture by @Somefive in https://github.com/oam-dev/kubevela/pull/2849
|
||||
* New Resource Management Model: Garbage Collection and Resource State Keeper [Desigin Doc](https://github.com/oam-dev/kubevela/blob/master/design/vela-core/resourcetracker_design.md)
|
||||
* Feat: output log with structured tag & add step duration metrics by @leejanee in https://github.com/oam-dev/kubevela/pull/2683
|
||||
* Feat: support user defined image registry that allows private installation by @wonderflow in https://github.com/oam-dev/kubevela/pull/2623
|
||||
* Feat: add a built in garbage-collect policy to application by @yangsoon in https://github.com/oam-dev/kubevela/pull/2575
|
||||
* Feat: health scope controller support check trait-managing workload by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2527
|
||||
* Chore: add homebrew bump to support `brew install kubevela` by @basefas in https://github.com/oam-dev/kubevela/pull/2434
|
||||
* Chore: Update release action to support build binaries for more platform by @basefas in https://github.com/oam-dev/kubevela/pull/2537
|
||||
* Feat: add reconcile timeout configuration for vela-core by @Somefive in https://github.com/oam-dev/kubevela/pull/2630
|
||||
* Chore: push docker images to Alibaba Cloud ACR by @zzxwill in https://github.com/oam-dev/kubevela/pull/2601
|
||||
|
||||
|
||||
## What's Changed/Deprecated
|
||||
|
||||
* Deprecated: containerized workload by @reetasingh in https://github.com/oam-dev/kubevela/pull/2330
|
||||
* Deprecated: initializer CRD controller by @chivalryq in https://github.com/oam-dev/kubevela/pull/2491
|
||||
* Deprecated: remove envbinding controller, use #ApplyComponent for EnvBinding by @Somefive in https://github.com/oam-dev/kubevela/pull/2556 , https://github.com/oam-dev/kubevela/pull/2382
|
||||
* Deprecated(cli): CLI vela config by @chivalryq in https://github.com/oam-dev/kubevela/pull/2037
|
||||
* Deprecated: remove addon with no definitions by @chivalryq in https://github.com/oam-dev/kubevela/pull/2574
|
||||
* Refactor: remove apiserver component from the chart, users should use velaux addon instead by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2838
|
||||
* Refactor: all addons are migrated from initializer to application objects by @chivalryq in https://github.com/oam-dev/kubevela/pull/2444
|
||||
* Refactor: change rollout's json tag so the status of rollout will be optional by @GingoBang in https://github.com/oam-dev/kubevela/pull/2314
|
||||
* Deprecated: deprecate CRD discovery for CUE import in Definition to prevent memory leak and OOM crash (#2925)
|
||||
* Deprecated: delete approllout related code #3040
|
||||
* Deprecate: delete appDeployment related logic #3050
|
||||
|
||||
## Bugfix
|
||||
|
||||
* Feat: rework resource tracker to solve bugs by @Somefive in https://github.com/oam-dev/kubevela/pull/2797
|
||||
* Fix: change raw extension to pointer by @FogDong in https://github.com/oam-dev/kubevela/pull/2451
|
||||
* Fix: show reconcile error log by @wonderflow in https://github.com/oam-dev/kubevela/pull/2626
|
||||
* Fix: Closure Bug In newValue by @leejanee in https://github.com/oam-dev/kubevela/pull/2437
|
||||
* Fix: resourceTracker compatibility bug by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2467
|
||||
* Fix(application): nil pointer for component properties by @kinsolee in https://github.com/oam-dev/kubevela/pull/2481
|
||||
* Fix: Commit step-generate data without success by @leejanee in https://github.com/oam-dev/kubevela/pull/2539
|
||||
* Fix(cli): client-side throttling in vela CLI by @chivalryq in https://github.com/oam-dev/kubevela/pull/2581
|
||||
* Fix: fix delete a component from application not delete workload by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2680
|
||||
* Fix: lookupByScript don't support `import` by @leejanee in https://github.com/oam-dev/kubevela/pull/2788
|
||||
* Fix: resourcetracker do not garbage collect legacyRTs correctly by @Somefive in https://github.com/oam-dev/kubevela/pull/2817
|
||||
* Fix: application conditions confusion. by @leejanee in https://github.com/oam-dev/kubevela/pull/2834
|
||||
|
||||
## New Contributors
|
||||
* @GingoBang made their first contribution in https://github.com/oam-dev/kubevela/pull/2314
|
||||
* @basefas made their first contribution in https://github.com/oam-dev/kubevela/pull/2434
|
||||
* @yuyicai made their first contribution in https://github.com/oam-dev/kubevela/pull/2540
|
||||
* @maciejgwizdala made their first contribution in https://github.com/oam-dev/kubevela/pull/2646
|
||||
* @lowkeyrd made their first contribution in https://github.com/oam-dev/kubevela/pull/2663
|
||||
* @zxbyoyoyo made their first contribution in https://github.com/oam-dev/kubevela/pull/2703
|
||||
* @yue9944882 made their first contribution in https://github.com/oam-dev/kubevela/pull/2751
|
||||
* @snyk-bot made their first contribution in https://github.com/oam-dev/kubevela/pull/2857
|
||||
* @yunjianzhong made their first contribution in https://github.com/oam-dev/kubevela/pull/3005
|
||||
* @songminglong made their first contribution in https://github.com/oam-dev/kubevela/pull/3064
|
||||
* @basuotian made their first contribution in https://github.com/oam-dev/kubevela/pull/3059
|
||||
* @K1ngram4 made their first contribution in https://github.com/oam-dev/kubevela/pull/3065
|
||||
|
||||
**Full Changelog**: https://github.com/oam-dev/kubevela/compare/v1.1.3...v1.2.0
|
||||
13
CHANGELOG/README.md
Normal file
13
CHANGELOG/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# CHANGELOGs
|
||||
|
||||
## Development release
|
||||
|
||||
- [CHANGELOG-1.2.md](./CHANGELOG-1.2.md)
|
||||
|
||||
## Current release
|
||||
|
||||
- [CHANGELOG-1.1.md](./CHANGELOG-1.1.md)
|
||||
|
||||
## Older releases
|
||||
|
||||
- [CHANGELOG-1.0.md](./CHANGELOG-1.0.md)
|
||||
@@ -1,66 +1,3 @@
|
||||
# CONTRIBUTING Guide
|
||||
|
||||
## About KubeVela
|
||||
|
||||
KubeVela project is initialized and maintained by the cloud native community since day 0 with [bootstrapping contributors from 8+ different organizations](https://github.com/oam-dev/kubevela/graphs/contributors).
|
||||
We intend for KubeVela to have an open governance since the very beginning and donate the project to neutral foundation as soon as it's released.
|
||||
To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](./CODE_OF_CONDUCT.md).
|
||||
|
||||
This document is a guide to help you through the process of contributing to KubeVela.
|
||||
|
||||
## Become a contributor
|
||||
|
||||
You can contribute to KubeVela in several ways. Here are some examples:
|
||||
|
||||
* Contribute to the KubeVela codebase.
|
||||
* Contribute to the [KubeVela docs](https://github.com/oam-dev/kubevela.io).
|
||||
* Report and triage bugs.
|
||||
* Develop community CRD operators as workload or trait and contribute to [catalog](https://github.com/oam-dev/catalog).
|
||||
* Write technical documentation and blog posts, for users and contributors.
|
||||
* Organize meetups and user groups in your local area.
|
||||
* Help others by answering questions about KubeVela.
|
||||
|
||||
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
|
||||
|
||||
|
||||
### Report bugs
|
||||
|
||||
Before submitting a new issue, try to make sure someone hasn't already reported the problem.
|
||||
Look through the [existing issues](https://github.com/oam-dev/kubevela/issues) for similar issues.
|
||||
|
||||
Report a bug by submitting a [bug report](https://github.com/oam-dev/kubevela/issues/new?assignees=&labels=kind%2Fbug&template=bug_report.md&title=).
|
||||
Make sure that you provide as much information as possible on how to reproduce the bug.
|
||||
|
||||
Follow the issue template and add additional information that will help us replicate the problem.
|
||||
|
||||
#### Security issues
|
||||
|
||||
If you believe you've found a security vulnerability, please read our [security policy](https://github.com/oam-dev/kubevela/blob/master/SECURITY.md) for more details.
|
||||
|
||||
### Suggest enhancements
|
||||
|
||||
If you have an idea to improve KubeVela, submit an [feature request](https://github.com/oam-dev/kubevela/issues/new?assignees=&labels=kind%2Ffeature&template=feature_request.md&title=%5BFeature%5D).
|
||||
|
||||
### Triage issues
|
||||
|
||||
If you don't have the knowledge or time to code, consider helping with _issue triage_. The community will thank you for saving them time by spending some of yours.
|
||||
|
||||
Read more about the ways you can [Triage issues](/contribute/triage-issues.md).
|
||||
|
||||
### Answering questions
|
||||
|
||||
If you have a question and you can't find the answer in the [documentation](https://kubevela.io/docs/),
|
||||
the next step is to ask it on the [github discussion](https://github.com/oam-dev/kubevela/discussions).
|
||||
|
||||
It's important to us to help these users, and we'd love your help. You can help other KubeVela users by answering [their questions](https://github.com/oam-dev/kubevela/discussions).
|
||||
|
||||
### Your first contribution
|
||||
|
||||
Unsure where to begin contributing to KubeVela? Start by browsing issues labeled `good first issue` or `help wanted`.
|
||||
|
||||
- [Good first issue](https://github.com/oam-dev/kubevela/labels/good%20first%20issue) issues are generally straightforward to complete.
|
||||
- [Help wanted](https://github.com/oam-dev/kubevela/labels/help%20wanted) issues are problems we would like the community to help us with regardless of complexity.
|
||||
|
||||
If you're looking to make a code change, see how to set up your environment for [local development](contribute/developer-guide.md).
|
||||
|
||||
When you're ready to contribute, it's time to [Create a pull request](/contribute/create-pull-request.md).
|
||||
Please refer to https://kubevela.io/docs/contributor/overview for details.
|
||||
|
||||
21
Dockerfile
21
Dockerfile
@@ -1,10 +1,16 @@
|
||||
ARG BASE_IMAGE
|
||||
# Build the manager binary
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16-alpine as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.17-alpine as builder
|
||||
|
||||
WORKDIR /workspace
|
||||
# Copy the Go Modules manifests
|
||||
COPY go.mod go.mod
|
||||
COPY go.sum go.sum
|
||||
|
||||
# It's a proxy for CN developer, please unblock it if you have network issue
|
||||
ARG GOPROXY
|
||||
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
|
||||
|
||||
# cache deps before building and copying source so that we don't need to re-download as much
|
||||
# and so that source changes don't invalidate our downloaded layer
|
||||
RUN go mod download
|
||||
@@ -15,6 +21,7 @@ COPY cmd/apiserver/main.go cmd/apiserver/main.go
|
||||
COPY apis/ apis/
|
||||
COPY pkg/ pkg/
|
||||
COPY version/ version/
|
||||
COPY references/ references/
|
||||
|
||||
# Build
|
||||
ARG TARGETARCH
|
||||
@@ -24,24 +31,18 @@ RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
|
||||
-o manager-${TARGETARCH} main.go
|
||||
|
||||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
|
||||
-o apiserver-${TARGETARCH} cmd/apiserver/main.go
|
||||
|
||||
# Use alpine as base image due to the discussion in issue #1448
|
||||
# You can replace distroless as minimal base image to package the manager binary
|
||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
|
||||
ARG BASE_IMAGE
|
||||
FROM ${BASE_IMAGE:-alpine:latest}
|
||||
# This is required by daemon connnecting with cri
|
||||
RUN apk add --no-cache ca-certificates bash
|
||||
FROM ${BASE_IMAGE:-alpine:3.15}
|
||||
# This is required by daemon connecting with cri
|
||||
RUN apk add --no-cache ca-certificates bash expat
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ARG TARGETARCH
|
||||
COPY --from=builder /workspace/manager-${TARGETARCH} /usr/local/bin/manager
|
||||
COPY --from=builder /workspace/apiserver-${TARGETARCH} /usr/local/bin/apiserver
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
|
||||
|
||||
49
Dockerfile.apiserver
Normal file
49
Dockerfile.apiserver
Normal file
@@ -0,0 +1,49 @@
|
||||
ARG BASE_IMAGE
|
||||
# Build the manager binary
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.17-alpine as builder
|
||||
ARG GOPROXY
|
||||
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
|
||||
WORKDIR /workspace
|
||||
# Copy the Go Modules manifests
|
||||
COPY go.mod go.mod
|
||||
COPY go.sum go.sum
|
||||
# cache deps before building and copying source so that we don't need to re-download as much
|
||||
# and so that source changes don't invalidate our downloaded layer
|
||||
RUN go mod download
|
||||
|
||||
# Copy the go source
|
||||
COPY cmd/core/main.go main.go
|
||||
COPY cmd/apiserver/main.go cmd/apiserver/main.go
|
||||
COPY apis/ apis/
|
||||
COPY pkg/ pkg/
|
||||
COPY version/ version/
|
||||
COPY references/ references/
|
||||
|
||||
# Build
|
||||
ARG TARGETARCH
|
||||
ARG VERSION
|
||||
ARG GITVERSION
|
||||
|
||||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
|
||||
-o apiserver-${TARGETARCH} cmd/apiserver/main.go
|
||||
|
||||
# Use alpine as base image due to the discussion in issue #1448
|
||||
# You can replace distroless as minimal base image to package the manager binary
|
||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
|
||||
|
||||
FROM ${BASE_IMAGE:-alpine:3.15}
|
||||
# This is required by daemon connecting with cri
|
||||
RUN apk add --no-cache ca-certificates bash expat
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ARG TARGETARCH
|
||||
COPY --from=builder /workspace/apiserver-${TARGETARCH} /usr/local/bin/apiserver
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
|
||||
CMD ["apiserver"]
|
||||
43
Dockerfile.cli
Normal file
43
Dockerfile.cli
Normal file
@@ -0,0 +1,43 @@
|
||||
ARG BASE_IMAGE
|
||||
# Build the cli binary
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.17-alpine as builder
|
||||
ARG GOPROXY
|
||||
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
|
||||
WORKDIR /workspace
|
||||
# Copy the Go Modules manifests
|
||||
COPY go.mod go.mod
|
||||
COPY go.sum go.sum
|
||||
# cache deps before building and copying source so that we don't need to re-download as much
|
||||
# and so that source changes don't invalidate our downloaded layer
|
||||
RUN go mod download
|
||||
|
||||
# Copy the go source
|
||||
COPY apis/ apis/
|
||||
COPY pkg/ pkg/
|
||||
COPY version/ version/
|
||||
COPY references/ references/
|
||||
|
||||
# Build
|
||||
ARG TARGETARCH
|
||||
ARG VERSION
|
||||
ARG GITVERSION
|
||||
|
||||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH:-amd64} \
|
||||
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
|
||||
-o vela-${TARGETARCH} ./references/cmd/cli/main.go
|
||||
|
||||
|
||||
# Use alpine as base image due to the discussion in issue #1448
|
||||
# You can replace distroless as minimal base image to package the manager binary
|
||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
|
||||
|
||||
FROM ${BASE_IMAGE:-alpine:3.15}
|
||||
# This is required by daemon connecting with cri
|
||||
RUN apk add --no-cache ca-certificates bash expat
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ARG TARGETARCH
|
||||
COPY --from=builder /workspace/vela-${TARGETARCH} /bin/vela
|
||||
ENTRYPOINT ["/bin/vela"]
|
||||
@@ -1,5 +1,6 @@
|
||||
ARG BASE_IMAGE
|
||||
# Build the manager binary
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16-alpine as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.17-alpine as builder
|
||||
|
||||
WORKDIR /workspace
|
||||
# Copy the Go Modules manifests
|
||||
@@ -17,6 +18,7 @@ COPY cmd/ cmd/
|
||||
COPY apis/ apis/
|
||||
COPY pkg/ pkg/
|
||||
COPY version/ version/
|
||||
COPY references/ references/
|
||||
|
||||
# Build
|
||||
ARG TARGETARCH
|
||||
@@ -24,8 +26,8 @@ ARG VERSION
|
||||
ARG GITVERSION
|
||||
|
||||
RUN apk add gcc musl-dev libc-dev ;\
|
||||
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
go test -c -o manager-${TARGETARCH} -cover -covermode=atomic -coverpkg ./... .
|
||||
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
go test -c -o manager-${TARGETARCH} -cover -covermode=atomic -coverpkg ./... .
|
||||
|
||||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
|
||||
@@ -35,10 +37,10 @@ RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
# You can replace distroless as minimal base image to package the manager binary
|
||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
|
||||
ARG BASE_IMAGE
|
||||
FROM ${BASE_IMAGE:-alpine:latest}
|
||||
# This is required by daemon connnecting with cri
|
||||
RUN apk add --no-cache ca-certificates bash
|
||||
|
||||
FROM ${BASE_IMAGE:-alpine:3.15}
|
||||
# This is required by daemon connecting with cri
|
||||
RUN apk add --no-cache ca-certificates bash expat
|
||||
|
||||
WORKDIR /
|
||||
|
||||
|
||||
16
GOVERNANCE.md
Normal file
16
GOVERNANCE.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Governance
|
||||
|
||||
[Project maintainers](https://github.com/kubevela/community/blob/main/OWNERS.md#maintainers) are responsible for activities around maintaining and updating KubeVela.
|
||||
Final decisions on the project reside with the project maintainers.
|
||||
|
||||
Maintainers **MUST** remain active. If they are unresponsive for >6 months,
|
||||
they will be automatically removed unless a [super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) of the other project maintainers agrees to extend the period to be greater than 6 months.
|
||||
|
||||
New maintainers can be added to the project by a [super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) vote of the existing maintainers.
|
||||
A potential maintainer may be nominated by an existing maintainer.
|
||||
A vote is conducted in private between the current maintainers over the course of a one week voting period.
|
||||
At the end of the week, votes are counted and a pull request is made on the repo adding the new maintainer to the [CODEOWNERS](https://github.com/kubevela/kubevela/blob/master/.github/CODEOWNERS) file.
|
||||
|
||||
A maintainer may step down by submitting an [issue](https://github.com/kubevela/kubevela/issues/new/choose) stating their intent.
|
||||
|
||||
Changes to this governance document require a pull request with approval from a [super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) of the current maintainers.
|
||||
@@ -71,7 +71,7 @@ To get started with issue triage and finding issues that haven't been triaged yo
|
||||
### Browse unlabeled issues
|
||||
|
||||
The easiest and straight forward way of getting started and finding issues that haven't been triaged is to browse
|
||||
[unlabeled issues](https://github.com/oam-dev/kubevela/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and starting from
|
||||
[unlabeled issues](https://github.com/kubevela/kubevela/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and starting from
|
||||
the bottom and working yourself to the top.
|
||||
|
||||
### Subscribe to all notifications
|
||||
@@ -95,7 +95,7 @@ to guide contributors to provide standard information that must be included for
|
||||
|
||||
### Standard issue information that must be included
|
||||
|
||||
Given a certain [issue template]([template](https://github.com/oam-dev/kubevela/issues/new/choose)) have been used
|
||||
Given a certain [issue template]([template](https://github.com/kubevela/kubevela/issues/new/choose)) have been used
|
||||
by the issue author or depending how the issue is perceived by the issue triage responsible, the following should
|
||||
help you understand what standard issue information that must be included.
|
||||
|
||||
@@ -219,7 +219,7 @@ There's a minor typo/error/lack of information that adds a lot of confusion for
|
||||
|
||||
### Support requests and questions
|
||||
|
||||
1. Kindly and politely direct the issue author to the [github discussion](https://github.com/oam-dev/kubevela/discussions)
|
||||
1. Kindly and politely direct the issue author to the [github discussion](https://github.com/kubevela/kubevela/discussions)
|
||||
and explain that issue is mainly used for tracking bugs and feature requests.
|
||||
If possible, it's usually a good idea to add some pointers to the issue author's question.
|
||||
2. Close the issue and label it with `type/question`.
|
||||
|
||||
287
Makefile
287
Makefile
@@ -1,108 +1,39 @@
|
||||
# Vela version
|
||||
VELA_VERSION ?= master
|
||||
# Repo info
|
||||
GIT_COMMIT ?= git-$(shell git rev-parse --short HEAD)
|
||||
GIT_COMMIT_LONG ?= $(shell git rev-parse HEAD)
|
||||
VELA_VERSION_KEY := github.com/oam-dev/kubevela/version.VelaVersion
|
||||
VELA_GITVERSION_KEY := github.com/oam-dev/kubevela/version.GitRevision
|
||||
LDFLAGS ?= "-s -w -X $(VELA_VERSION_KEY)=$(VELA_VERSION) -X $(VELA_GITVERSION_KEY)=$(GIT_COMMIT)"
|
||||
|
||||
GOBUILD_ENV = GO111MODULE=on CGO_ENABLED=0
|
||||
GOX = go run github.com/mitchellh/gox
|
||||
TARGETS := darwin/amd64 linux/amd64 windows/amd64
|
||||
DIST_DIRS := find * -type d -exec
|
||||
|
||||
TIME_LONG = `date +%Y-%m-%d' '%H:%M:%S`
|
||||
TIME_SHORT = `date +%H:%M:%S`
|
||||
TIME = $(TIME_SHORT)
|
||||
|
||||
BLUE := $(shell printf "\033[34m")
|
||||
YELLOW := $(shell printf "\033[33m")
|
||||
RED := $(shell printf "\033[31m")
|
||||
GREEN := $(shell printf "\033[32m")
|
||||
CNone := $(shell printf "\033[0m")
|
||||
|
||||
INFO = echo ${TIME} ${BLUE}[ .. ]${CNone}
|
||||
WARN = echo ${TIME} ${YELLOW}[WARN]${CNone}
|
||||
ERR = echo ${TIME} ${RED}[FAIL]${CNone}
|
||||
OK = echo ${TIME} ${GREEN}[ OK ]${CNone}
|
||||
FAIL = (echo ${TIME} ${RED}[FAIL]${CNone} && false)
|
||||
|
||||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
||||
ifeq (,$(shell go env GOBIN))
|
||||
GOBIN=$(shell go env GOPATH)/bin
|
||||
else
|
||||
GOBIN=$(shell go env GOBIN)
|
||||
endif
|
||||
|
||||
# Image URL to use all building/pushing image targets
|
||||
VELA_CORE_IMAGE ?= vela-core:latest
|
||||
VELA_CORE_TEST_IMAGE ?= vela-core-test:$(GIT_COMMIT)
|
||||
VELA_RUNTIME_ROLLOUT_IMAGE ?= vela-runtime-rollout:latest
|
||||
include makefiles/const.mk
|
||||
include makefiles/dependency.mk
|
||||
include makefiles/release.mk
|
||||
include makefiles/develop.mk
|
||||
include makefiles/build.mk
|
||||
include makefiles/e2e.mk
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
all: build
|
||||
|
||||
# Run tests
|
||||
test: vet lint staticcheck
|
||||
go test -coverprofile=coverage.txt ./pkg/... ./cmd/...
|
||||
go test ./references/appfile/... ./references/cli/... ./references/common/... ./references/plugins/...
|
||||
test: vet lint staticcheck unit-test-core test-cli-gen
|
||||
@$(OK) unit-tests pass
|
||||
|
||||
test-cli-gen:
|
||||
mkdir -p ./bin/doc
|
||||
go run ./hack/docgen/cli/gen.go ./bin/doc
|
||||
unit-test-core:
|
||||
go test -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... ./apis/... | grep -v apiserver | grep -v applicationconfiguration)
|
||||
go test $(shell go list ./references/... | grep -v apiserver)
|
||||
unit-test-apiserver:
|
||||
go test -gcflags=all=-l -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... | grep -E 'apiserver|velaql')
|
||||
|
||||
# Build vela cli binary
|
||||
build: fmt vet lint staticcheck vela-cli kubectl-vela
|
||||
@$(OK) build succeed
|
||||
|
||||
vela-cli:
|
||||
$(GOBUILD_ENV) go build -o bin/vela -a -ldflags $(LDFLAGS) ./references/cmd/cli/main.go
|
||||
|
||||
kubectl-vela:
|
||||
$(GOBUILD_ENV) go build -o bin/kubectl-vela -a -ldflags $(LDFLAGS) ./cmd/plugin/main.go
|
||||
|
||||
doc-gen:
|
||||
rm -r docs/en/cli/*
|
||||
go run hack/docgen/gen.go
|
||||
|
||||
PWD := $(shell pwd)
|
||||
cross-build:
|
||||
rm -rf _bin
|
||||
go get github.com/mitchellh/gox@v0.4.0
|
||||
$(GOBUILD_ENV) $(GOX) -ldflags $(LDFLAGS) -parallel=2 -output="_bin/vela/{{.OS}}-{{.Arch}}/vela" -osarch='$(TARGETS)' ./references/cmd/cli
|
||||
$(GOBUILD_ENV) $(GOX) -ldflags $(LDFLAGS) -parallel=2 -output="_bin/kubectl-vela/{{.OS}}-{{.Arch}}/kubectl-vela" -osarch='$(TARGETS)' ./cmd/plugin
|
||||
$(GOBUILD_ENV) $(GOX) -ldflags $(LDFLAGS) -parallel=2 -output="_bin/apiserver/{{.OS}}-{{.Arch}}/apiserver" -osarch="$(TARGETS)" ./cmd/apiserver
|
||||
|
||||
build-cleanup:
|
||||
rm -rf _bin
|
||||
|
||||
compress:
|
||||
( \
|
||||
echo "\n## Release Info\nVERSION: $(VELA_VERSION)" >> README.md && \
|
||||
echo "GIT_COMMIT: $(GIT_COMMIT_LONG)\n" >> README.md && \
|
||||
cd _bin/vela && \
|
||||
$(DIST_DIRS) cp ../../LICENSE {} \; && \
|
||||
$(DIST_DIRS) cp ../../README.md {} \; && \
|
||||
$(DIST_DIRS) tar -zcf vela-{}.tar.gz {} \; && \
|
||||
$(DIST_DIRS) zip -r vela-{}.zip {} \; && \
|
||||
cd ../kubectl-vela && \
|
||||
$(DIST_DIRS) cp ../../LICENSE {} \; && \
|
||||
$(DIST_DIRS) cp ../../README.md {} \; && \
|
||||
$(DIST_DIRS) tar -zcf kubectl-vela-{}.tar.gz {} \; && \
|
||||
$(DIST_DIRS) zip -r kubectl-vela-{}.zip {} \; && \
|
||||
cd .. && \
|
||||
sha256sum vela/vela-* kubectl-vela/kubectl-vela-* > sha256sums.txt \
|
||||
)
|
||||
|
||||
# Run against the configured Kubernetes cluster in ~/.kube/config
|
||||
run:
|
||||
go run ./cmd/core/main.go --application-revision-limit 5
|
||||
|
||||
run-apiserver:
|
||||
go run ./cmd/apiserver/main.go
|
||||
|
||||
# Run go fmt against code
|
||||
fmt: goimports installcue
|
||||
go fmt ./...
|
||||
$(GOIMPORTS) -local github.com/oam-dev/kubevela -w $$(go list -f {{.Dir}} ./...)
|
||||
$(CUE) fmt ./vela-templates/definitions/internal/*
|
||||
$(CUE) fmt ./vela-templates/definitions/deprecated/*
|
||||
$(CUE) fmt ./vela-templates/definitions/registry/*
|
||||
$(CUE) fmt ./pkg/stdlib/pkgs/*
|
||||
$(CUE) fmt ./pkg/stdlib/op.cue
|
||||
@@ -117,7 +48,7 @@ staticcheck: staticchecktool
|
||||
lint: golangci
|
||||
$(GOLANGCILINT) run ./...
|
||||
|
||||
reviewable: manifests fmt vet lint staticcheck
|
||||
reviewable: manifests fmt vet lint staticcheck helm-doc-gen
|
||||
go mod tidy
|
||||
|
||||
# Execute auto-gen code commands and ensure branch is clean.
|
||||
@@ -126,88 +57,42 @@ check-diff: reviewable
|
||||
git diff --quiet || ($(ERR) please run 'make reviewable' to include all changes && false)
|
||||
@$(OK) branch is clean
|
||||
|
||||
# Build the docker image
|
||||
docker-build:
|
||||
docker build --build-arg=VERSION=$(VELA_VERSION) --build-arg=GITVERSION=$(GIT_COMMIT) -t $(VELA_CORE_IMAGE) .
|
||||
|
||||
# Build the runtime docker image
|
||||
docker-build-runtime-rollout:
|
||||
docker build --build-arg=VERSION=$(VELA_VERSION) --build-arg=GITVERSION=$(GIT_COMMIT) -t $(VELA_RUNTIME_ROLLOUT_IMAGE) -f runtime/rollout/Dockerfile .
|
||||
|
||||
# Push the docker image
|
||||
docker-push:
|
||||
docker push $(VELA_CORE_IMAGE)
|
||||
|
||||
e2e-setup-core:
|
||||
sh ./hack/e2e/modify_charts.sh
|
||||
helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set applicationRevisionLimit=5 --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --set multicluster.enabled=true --wait kubevela ./charts/vela-core
|
||||
kubectl wait --for=condition=Available deployment/kubevela-vela-core -n vela-system --timeout=180s
|
||||
build-swagger:
|
||||
go run ./cmd/apiserver/main.go build-swagger ./docs/apidoc/swagger.json
|
||||
|
||||
e2e-setup:
|
||||
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.9.0/kruise-chart.tgz --set featureGates="PreDownloadImageForInPlaceUpdate=true"
|
||||
sh ./hack/e2e/modify_charts.sh
|
||||
helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set applicationRevisionLimit=5 --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --wait kubevela ./charts/vela-core
|
||||
helm upgrade --install --create-namespace --namespace oam-runtime-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --wait oam-runtime ./charts/oam-runtime
|
||||
bin/vela addon enable fluxcd
|
||||
bin/vela addon enable terraform
|
||||
ginkgo version
|
||||
ginkgo -v -r e2e/setup
|
||||
|
||||
timeout 600s bash -c -- 'while true; do kubectl get ns flux-system; if [ $$? -eq 0 ] ; then break; else sleep 5; fi;done'
|
||||
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela -n vela-system --timeout=600s
|
||||
kubectl wait --for=condition=Ready pod -l app=source-controller -n flux-system --timeout=600s
|
||||
kubectl wait --for=condition=Ready pod -l app=helm-controller -n flux-system --timeout=600s
|
||||
|
||||
e2e-api-test:
|
||||
# Run e2e test
|
||||
ginkgo -v -skipPackage capability,setup,application -r e2e
|
||||
ginkgo -v -r e2e/application
|
||||
|
||||
e2e-test:
|
||||
# Run e2e test
|
||||
ginkgo -v --skip="rollout related e2e-test." ./test/e2e-test
|
||||
@$(OK) tests pass
|
||||
|
||||
e2e-rollout-test:
|
||||
ginkgo -v --focus="rollout related e2e-test." ./test/e2e-test
|
||||
@$(OK) tests pass
|
||||
|
||||
e2e-multicluster-test:
|
||||
go test -v -coverpkg=./... -coverprofile=/tmp/e2e_multicluster_test.out ./test/e2e-multicluster-test
|
||||
@$(OK) tests pass
|
||||
|
||||
compatibility-test: vet lint staticcheck generate-compatibility-testdata
|
||||
# Run compatibility test with old crd
|
||||
COMPATIBILITY_TEST=TRUE go test -race ./pkg/...
|
||||
@$(OK) compatibility-test pass
|
||||
|
||||
generate-compatibility-testdata:
|
||||
mkdir -p ./test/compatibility-test/testdata
|
||||
go run ./test/compatibility-test/convert/main.go ./charts/vela-core/crds ./test/compatibility-test/testdata
|
||||
|
||||
compatibility-testdata-cleanup:
|
||||
rm -f ./test/compatibility-test/testdata/*
|
||||
|
||||
e2e-cleanup:
|
||||
# Clean up
|
||||
rm -rf ~/.vela
|
||||
|
||||
image-cleanup:
|
||||
# Delete Docker image
|
||||
ifneq (, $(shell which docker))
|
||||
# Delete Docker images
|
||||
|
||||
ifneq ($(shell docker images -q $(VELA_CORE_TEST_IMAGE)),)
|
||||
docker rmi -f $(VELA_CORE_TEST_IMAGE)
|
||||
endif
|
||||
|
||||
end-e2e-core:
|
||||
sh ./hack/e2e/end_e2e_core.sh
|
||||
ifneq ($(shell docker images -q $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)),)
|
||||
docker rmi -f $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)
|
||||
endif
|
||||
|
||||
end-e2e:
|
||||
sh ./hack/e2e/end_e2e.sh
|
||||
endif
|
||||
|
||||
# load docker image to the kind cluster
|
||||
kind-load:
|
||||
|
||||
|
||||
# load docker image to the k3d cluster
|
||||
image-load:
|
||||
docker build -t $(VELA_CORE_TEST_IMAGE) -f Dockerfile.e2e .
|
||||
kind load docker-image $(VELA_CORE_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
|
||||
k3d image import $(VELA_CORE_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
|
||||
|
||||
image-load-runtime-cluster:
|
||||
/bin/sh hack/e2e/build_runtime_rollout.sh
|
||||
docker build -t $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) -f runtime/rollout/e2e/Dockerfile.e2e runtime/rollout/e2e/
|
||||
rm -rf runtime/rollout/e2e/tmp
|
||||
k3d image import $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)"; exit 1; }
|
||||
k3d cluster get $(RUNTIME_CLUSTER_NAME) && k3d image import $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) --cluster=$(RUNTIME_CLUSTER_NAME) || echo "no worker cluster"
|
||||
|
||||
# Run tests
|
||||
core-test: fmt vet manifests
|
||||
@@ -221,110 +106,30 @@ manager: fmt vet lint manifests
|
||||
vela-runtime-rollout-manager: fmt vet lint manifests
|
||||
$(GOBUILD_ENV) go build -o ./runtime/rollout/bin/manager -a -ldflags $(LDFLAGS) ./runtime/rollout/cmd/main.go
|
||||
|
||||
# Run against the configured Kubernetes cluster in ~/.kube/config
|
||||
core-run: fmt vet manifests
|
||||
go run ./cmd/core/main.go
|
||||
|
||||
# Run against the configured Kubernetes cluster in ~/.kube/config with debug logs
|
||||
core-debug-run: fmt vet manifests
|
||||
go run ./cmd/core/main.go --log-debug=true
|
||||
|
||||
# Install CRDs and Definitions of Vela Core into a cluster, this is for develop convenient.
|
||||
core-install: manifests
|
||||
kubectl apply -f hack/namespace.yaml
|
||||
kubectl apply -f charts/vela-core/crds/
|
||||
@$(OK) install succeed
|
||||
|
||||
# Uninstall CRDs and Definitions of Vela Core from a cluster, this is for develop convenient.
|
||||
core-uninstall: manifests
|
||||
kubectl delete -f charts/vela-core/crds/
|
||||
|
||||
# Generate manifests e.g. CRD, RBAC etc.
|
||||
manifests: installcue kustomize
|
||||
go generate $(foreach t,pkg apis,./$(t)/...)
|
||||
# TODO(yangsoon): kustomize will merge all CRD into a whole file, it may not work if we want patch more than one CRD in this way
|
||||
$(KUSTOMIZE) build config/crd -o config/crd/base/core.oam.dev_applications.yaml
|
||||
./hack/crd/cleanup.sh
|
||||
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds charts/oam-runtime/crds runtime/ charts/vela-minimal/crds
|
||||
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds runtime/ charts/vela-minimal/crds
|
||||
rm -f config/crd/base/*
|
||||
./vela-templates/gen_definitions.sh
|
||||
go run ./vela-templates/gen_addons.go
|
||||
|
||||
GOLANGCILINT_VERSION ?= v1.38.0
|
||||
|
||||
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
HOSTARCH := $(shell uname -m)
|
||||
ifeq ($(HOSTARCH),x86_64)
|
||||
HOSTARCH := amd64
|
||||
endif
|
||||
|
||||
golangci:
|
||||
ifeq (, $(shell which golangci-lint))
|
||||
@{ \
|
||||
set -e ;\
|
||||
echo 'installing golangci-lint-$(GOLANGCILINT_VERSION)' ;\
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) $(GOLANGCILINT_VERSION) ;\
|
||||
echo 'Install succeed' ;\
|
||||
}
|
||||
GOLANGCILINT=$(GOBIN)/golangci-lint
|
||||
else
|
||||
GOLANGCILINT=$(shell which golangci-lint)
|
||||
endif
|
||||
|
||||
.PHONY: staticchecktool
|
||||
staticchecktool:
|
||||
ifeq (, $(shell which staticcheck))
|
||||
@{ \
|
||||
set -e ;\
|
||||
echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\
|
||||
GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck ;\
|
||||
}
|
||||
STATICCHECK=$(GOBIN)/staticcheck
|
||||
else
|
||||
STATICCHECK=$(shell which staticcheck)
|
||||
endif
|
||||
|
||||
.PHONY: goimports
|
||||
goimports:
|
||||
ifeq (, $(shell which goimports))
|
||||
@{ \
|
||||
set -e ;\
|
||||
GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports ;\
|
||||
}
|
||||
GOIMPORTS=$(GOBIN)/goimports
|
||||
else
|
||||
GOIMPORTS=$(shell which goimports)
|
||||
endif
|
||||
|
||||
.PHONY: installcue
|
||||
installcue:
|
||||
ifeq (, $(shell which cue))
|
||||
@{ \
|
||||
set -e ;\
|
||||
GO111MODULE=off go get -u cuelang.org/go/cmd/cue ;\
|
||||
}
|
||||
CUE=$(GOBIN)/cue
|
||||
else
|
||||
CUE=$(shell which cue)
|
||||
endif
|
||||
|
||||
KUSTOMIZE_VERSION ?= 3.8.2
|
||||
|
||||
.PHONY: kustomize
|
||||
kustomize:
|
||||
ifeq (, $(shell kustomize version | grep $(KUSTOMIZE_VERSION)))
|
||||
@{ \
|
||||
set -e ;\
|
||||
echo 'installing kustomize-v$(KUSTOMIZE_VERSION) into $(GOBIN)' ;\
|
||||
curl -s https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh | bash -s $(KUSTOMIZE_VERSION) $(GOBIN);\
|
||||
echo 'Install succeed' ;\
|
||||
}
|
||||
KUSTOMIZE=$(GOBIN)/kustomize
|
||||
else
|
||||
KUSTOMIZE=$(shell which kustomize)
|
||||
endif
|
||||
|
||||
check-license-header:
|
||||
./hack/licence/header-check.sh
|
||||
|
||||
def-install:
|
||||
./hack/utils/installdefinition.sh
|
||||
|
||||
helm-doc-gen: helmdoc
|
||||
readme-generator -v charts/vela-core/values.yaml -r charts/vela-core/README.md
|
||||
readme-generator -v charts/vela-minimal/values.yaml -r charts/vela-minimal/README.md
|
||||
12
OWNERS
12
OWNERS
@@ -1,12 +0,0 @@
|
||||
approvers:
|
||||
- kubevela-controller
|
||||
- kubevela-devex
|
||||
- kubevela-dashboard-approver
|
||||
|
||||
reviewers:
|
||||
- kubevela-controller
|
||||
- oam-spec
|
||||
- kubevela-dashboard-reviewer
|
||||
|
||||
members:
|
||||
- community-collaborators
|
||||
@@ -1,44 +1 @@
|
||||
aliases:
|
||||
kubevela-devex:
|
||||
- hongchaodeng
|
||||
- wonderflow
|
||||
|
||||
kubevela-dashboard-approver:
|
||||
- zzxwill
|
||||
- hongchaodeng
|
||||
|
||||
kubevela-dashboard-reviewer:
|
||||
- sunny0826
|
||||
- hanxie-crypto
|
||||
|
||||
kubevela-controller:
|
||||
- resouer
|
||||
- wonderflow
|
||||
- hongchaodeng
|
||||
- zzxwill
|
||||
- ryanzhang-oss
|
||||
- captainroy-hy
|
||||
|
||||
oam-spec: # inherit from https://github.com/oam-dev/spec/blob/master/OWNERS.md
|
||||
- hongchaodeng
|
||||
- resouer
|
||||
|
||||
community-collaborators:
|
||||
- Fei-Guo
|
||||
- szihai
|
||||
|
||||
bootstrap-contributors: # thank you for bootstrapping KubeVela at the very early stage!
|
||||
- xiaoyuaiheshui
|
||||
- Ghostbaby
|
||||
- wenxinnnnn
|
||||
- silenceper
|
||||
- erdun
|
||||
- sunny0826
|
||||
- mosesyou
|
||||
- artursouza
|
||||
- wonderflow
|
||||
- hongchaodeng
|
||||
- ryanzhang-oss
|
||||
- woshilanren11
|
||||
- hanxie-crypto
|
||||
- zzxwill
|
||||
The owner file has been migrated to the community repo, please refer to https://github.com/kubevela/community/blob/main/OWNERS.md
|
||||
85
README.md
85
README.md
@@ -1,63 +1,96 @@
|
||||

|
||||
[](https://goreportcard.com/report/github.com/oam-dev/kubevela)
|
||||
<div style="text-align: center">
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/kubevela/kubevela.io/main/docs/resources/KubeVela-03.png">
|
||||
<br><br>
|
||||
<i>Make shipping applications more enjoyable.</i>
|
||||
</p>
|
||||
</div>
|
||||
|
||||

|
||||
[](https://goreportcard.com/report/github.com/kubevela/kubevela)
|
||||

|
||||
[](https://codecov.io/gh/oam-dev/kubevela)
|
||||
[](/LICENSE)
|
||||
[](https://github.com/oam-dev/kubevela/releases)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/oam-dev/kubevela)
|
||||
[](https://codecov.io/gh/kubevela/kubevela)
|
||||
[](/LICENSE)
|
||||
[](https://github.com/kubevela/kubevela/releases)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/kubevela/kubevela)
|
||||
[](https://twitter.com/oam_dev)
|
||||
[](https://artifacthub.io/packages/search?repo=kubevela)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/4602)
|
||||
|
||||

|
||||
## Introduction
|
||||
|
||||
*Make shipping applications more enjoyable.*
|
||||
KubeVela is a modern application delivery platform that makes deploying and operating applications across today's hybrid, multi-cloud environments easier, faster and more reliable.
|
||||
|
||||
# KubeVela
|
||||

|
||||
|
||||
KubeVela is a modern application platform that makes deploying and managing applications across today's hybrid, multi-cloud environments easier and faster.
|
||||
## Highlights
|
||||
|
||||
## Features
|
||||
KubeVela practices the "render, orchestrate, deploy" workflow with below highlighted values added to existing ecosystem:
|
||||
|
||||
**Application Centric** - KubeVela introduces [Open Application Model (OAM)](https://oam.dev/) as the consistent yet higher level API to capture a full deployment of microservices on top of hybrid environments. Placement strategy, traffic shifting and rolling update are declared at application level. No infrastructure level concern, simply deploy.
|
||||
* Deployment as Code
|
||||
|
||||
**Programmable Workflow** - KubeVela leverages [CUE](https://cuelang.org/) to implement its model layer. This allows you to declare application deployment workflow as a DAG, with all steps and application's needs glued together in programmable approach. No restrictions, natively extensible.
|
||||
Declare your deployment plan as workflow, run it automatically with any CI/CD or GitOps system, extend or re-program the workflow steps with CUE. No add-hoc scripts, no dirty glue code, just deploy. The deployment workflow in KubeVela is powered by [Open Application Model](https://oam.dev/).
|
||||
|
||||
**Runtime Agnostic** - KubeVela works as an application delivery control plane that is fully runtime agnostic. It can deploy and manage any application components including containers, cloud functions, databases, or even EC2 instances across hybrid environments, following the workflow you defined.
|
||||
* Built-in security and compliance building blocks
|
||||
|
||||
Choose from the wide range of LDAP integrations we provided out-of-box, enjoy multi-cluster authorization that is fully automated, pick and apply fine-grained RBAC modules and customize them per your own supply chain requirements.
|
||||
|
||||
* Multi-cloud/hybrid-environments app delivery as first-class citizen
|
||||
|
||||
Progressive rollout across test/staging/production environments, automatic canary, blue-green and continuous verification, rich placement strategy across clusters and clouds, fully managed cloud environments provision.
|
||||
|
||||
## Getting Started
|
||||
|
||||
- [Introduction](https://kubevela.io/docs)
|
||||
- [Installation](https://kubevela.io/docs/install)
|
||||
- [Design Your First Deployment Plan](https://kubevela.io/docs/quick-start)
|
||||
* [Introduction](https://kubevela.io/docs)
|
||||
* [Installation](https://kubevela.io/docs/install)
|
||||
* [Deploy Your Application](https://kubevela.io/docs/quick-start)
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation is available on the [KubeVela website](https://kubevela.io/).
|
||||
|
||||
## Blog
|
||||
|
||||
Official blog is available on [KubeVela blog](https://kubevela.io/blog).
|
||||
|
||||
## Community
|
||||
|
||||
- Slack: [CNCF Slack](https://slack.cncf.io/) #kubevela channel (*English*)
|
||||
- Gitter: [oam-dev](https://gitter.im/oam-dev/community) (*English*)
|
||||
We want your contributions and suggestions!
|
||||
One of the easiest ways to contribute is to participate in discussions on the Github Issues/Discussion, chat on IM or the bi-weekly community calls.
|
||||
For more information on the community engagement, developer and contributing guidelines and more, head over to the [KubeVela community repo](https://github.com/kubevela/community).
|
||||
|
||||
### Contact Us
|
||||
|
||||
Reach out with any questions you may have and we'll make sure to answer them as soon as possible!
|
||||
|
||||
- Slack: [CNCF Slack kubevela channel](https://cloud-native.slack.com/archives/C01BLQ3HTJA) (*English*)
|
||||
- [DingTalk Group](https://page.dingtalk.com/wow/dingtalk/act/en-home): `23310022` (*Chinese*)
|
||||
- Wechat Group (*Chinese*): Broker wechat to add you into the user group.
|
||||
|
||||
<img src="https://static.kubevela.net/images/barnett-wechat.jpg" width="200" />
|
||||
- Bi-weekly Community Call: [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs)
|
||||
|
||||
### Community Call
|
||||
|
||||
Every two weeks we host a community call to showcase new features, review upcoming milestones, and engage in a Q&A. All are welcome!
|
||||
|
||||
- Bi-weekly Community Call:
|
||||
- [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs).
|
||||
- [Video Records](https://www.youtube.com/channel/UCSCTHhGI5XJ0SEhDHVakPAA/videos).
|
||||
- Bi-weekly Chinese Community Call:
|
||||
- [Video Records](https://space.bilibili.com/180074935/channel/seriesdetail?sid=1842207).
|
||||
|
||||
## Talks and Conferences
|
||||
|
||||
| Engagement | Link |
|
||||
|:-----------|:------------|
|
||||
| 🎤 Talks | - [KubeVela - The Modern App Delivery System in Alibaba](https://docs.google.com/presentation/d/1CWCLcsKpDQB3bBDTfdv2BZ8ilGGJv2E8L-iOA5HMrV0/edit?usp=sharing) |
|
||||
| 🌎 KubeCon | - [ [NA 2020] Standardizing Cloud Native Application Delivery Across Different Clouds](https://www.youtube.com/watch?v=0yhVuBIbHcI) <br> - [ [EU 2021] Zero Pain Microservice Development and Deployment with Dapr and KubeVela](https://sched.co/iE4S) |
|
||||
| 📺 Conferences | - [Dapr, Rudr, OAM: Mark Russinovich presents next gen app development & deployment](https://www.youtube.com/watch?v=eJCu6a-x9uo) <br> - [Mark Russinovich presents "The Future of Cloud Native Applications with OAM and Dapr"](https://myignite.techcommunity.microsoft.com/sessions/82059)|
|
||||
Check out [KubeVela videos](https://kubevela.io/videos/talks/en/oam-dapr) for these talks and conferences.
|
||||
|
||||
## Contributing
|
||||
Check out [CONTRIBUTING](./CONTRIBUTING.md) to see how to develop with KubeVela.
|
||||
|
||||
Check out [CONTRIBUTING](https://kubevela.io/docs/contributor/overview) to see how to develop with KubeVela.
|
||||
|
||||
## Report Vulnerability
|
||||
|
||||
Security is a first priority thing for us at KubeVela. If you come across a related issue, please send email to security@mail.kubevela.io .
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
KubeVela adopts [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
Copyright 2019 The Crossplane Authors.
|
||||
Copyright 2022 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -14,5 +14,9 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package workloads provides workloads related controllers.
|
||||
package workloads
|
||||
package common
|
||||
|
||||
const (
|
||||
// Group api group name
|
||||
Group = "core.oam.dev"
|
||||
)
|
||||
@@ -17,12 +17,18 @@ limitations under the License.
|
||||
package common
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
types "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
)
|
||||
|
||||
// Kube defines the encapsulation in raw Kubernetes resource format
|
||||
@@ -109,6 +115,26 @@ type Terraform struct {
|
||||
// +kubebuilder:default:=hcl
|
||||
// +kubebuilder:validation:Enum:=hcl;json;remote
|
||||
Type string `json:"type,omitempty"`
|
||||
|
||||
// Path is the sub-directory of remote git repository. It's valid when remote is set
|
||||
Path string `json:"path,omitempty"`
|
||||
|
||||
// WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
// Secret to which any connection details for this managed resource should
|
||||
// be written. Connection details frequently include the endpoint, username,
|
||||
// and password required to connect to the managed resource.
|
||||
// +optional
|
||||
WriteConnectionSecretToReference *types.SecretReference `json:"writeConnectionSecretToRef,omitempty"`
|
||||
|
||||
// ProviderReference specifies the reference to Provider
|
||||
ProviderReference *types.Reference `json:"providerRef,omitempty"`
|
||||
|
||||
// DeleteResource will determine whether provisioned cloud resources will be deleted when CR is deleted
|
||||
// +kubebuilder:default:=true
|
||||
DeleteResource bool `json:"deleteResource,omitempty"`
|
||||
|
||||
// Region is cloud provider's region. It will override the region in the region field of ProviderReference
|
||||
Region string `json:"customRegion,omitempty"`
|
||||
}
|
||||
|
||||
// A WorkloadTypeDescriptor refer to a Workload Type
|
||||
@@ -157,7 +183,7 @@ type Status struct {
|
||||
HealthPolicy string `json:"healthPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationPhase is a label for the condition of a application at the current time
|
||||
// ApplicationPhase is a label for the condition of an application at the current time
|
||||
type ApplicationPhase string
|
||||
|
||||
const (
|
||||
@@ -181,26 +207,36 @@ const (
|
||||
ApplicationRunning ApplicationPhase = "running"
|
||||
// ApplicationUnhealthy means the app finished rendering and applied result to the cluster, but still unhealthy
|
||||
ApplicationUnhealthy ApplicationPhase = "unhealthy"
|
||||
// ApplicationDeleting means application is being deleted
|
||||
ApplicationDeleting ApplicationPhase = "deleting"
|
||||
)
|
||||
|
||||
// WorkflowState is a string that mark the workflow state
|
||||
type WorkflowState string
|
||||
|
||||
const (
|
||||
// WorkflowStateInitializing means the workflow is in initial state
|
||||
WorkflowStateInitializing WorkflowState = "Initializing"
|
||||
// WorkflowStateTerminated means workflow is terminated manually, and it won't be started unless the spec changed.
|
||||
WorkflowStateTerminated WorkflowState = "terminated"
|
||||
WorkflowStateTerminated WorkflowState = "Terminated"
|
||||
// WorkflowStateSuspended means workflow is suspended manually, and it can be resumed.
|
||||
WorkflowStateSuspended WorkflowState = "suspended"
|
||||
// WorkflowStateFinished means workflow is running successfully, all steps finished.
|
||||
WorkflowStateFinished WorkflowState = "finished"
|
||||
WorkflowStateSuspended WorkflowState = "Suspended"
|
||||
// WorkflowStateSucceeded means workflow is running successfully, all steps finished.
|
||||
WorkflowStateSucceeded WorkflowState = "Succeeded"
|
||||
// WorkflowStateFinished means workflow is end.
|
||||
WorkflowStateFinished WorkflowState = "Finished"
|
||||
// WorkflowStateExecuting means workflow is still running or waiting some steps.
|
||||
WorkflowStateExecuting WorkflowState = "executing"
|
||||
WorkflowStateExecuting WorkflowState = "Executing"
|
||||
// WorkflowStateSkipping means it will skip this reconcile and let next reconcile to handle it.
|
||||
WorkflowStateSkipping WorkflowState = "Skipping"
|
||||
)
|
||||
|
||||
// ApplicationComponentStatus record the health status of App component
|
||||
type ApplicationComponentStatus struct {
|
||||
Name string `json:"name"`
|
||||
Env string `json:"env,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
Cluster string `json:"cluster,omitempty"`
|
||||
Env string `json:"env,omitempty"`
|
||||
// WorkloadDefinition is the definition of a WorkloadDefinition, such as deployments/apps.v1
|
||||
WorkloadDefinition WorkloadGVK `json:"workloadDefinition,omitempty"`
|
||||
Healthy bool `json:"healthy"`
|
||||
@@ -232,21 +268,8 @@ type RawComponent struct {
|
||||
Raw runtime.RawExtension `json:"raw"`
|
||||
}
|
||||
|
||||
// WorkflowStepStatus record the status of a workflow step
|
||||
type WorkflowStepStatus struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Phase WorkflowStepPhase `json:"phase,omitempty"`
|
||||
// A human readable message indicating details about why the workflowStep is in this state.
|
||||
Message string `json:"message,omitempty"`
|
||||
// A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
SubSteps *SubStepsStatus `json:"subSteps,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowSubStepStatus record the status of a workflow step
|
||||
type WorkflowSubStepStatus struct {
|
||||
// StepStatus record the base status of workflow step, which could be workflow step or subStep
|
||||
type StepStatus struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
@@ -255,6 +278,21 @@ type WorkflowSubStepStatus struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
// A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
// FirstExecuteTime is the first time this step execution.
|
||||
FirstExecuteTime metav1.Time `json:"firstExecuteTime,omitempty"`
|
||||
// LastExecuteTime is the last time this step execution.
|
||||
LastExecuteTime metav1.Time `json:"lastExecuteTime,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStepStatus record the status of a workflow step, include step status and subStep status
|
||||
type WorkflowStepStatus struct {
|
||||
StepStatus `json:",inline"`
|
||||
SubStepsStatus []WorkflowSubStepStatus `json:"subSteps,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowSubStepStatus record the status of a workflow subStep
|
||||
type WorkflowSubStepStatus struct {
|
||||
StepStatus `json:",inline"`
|
||||
}
|
||||
|
||||
// AppStatus defines the observed state of Application
|
||||
@@ -267,8 +305,6 @@ type AppStatus struct {
|
||||
// +optional
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
Rollout AppRolloutStatus `json:"rollout,omitempty"`
|
||||
|
||||
Phase ApplicationPhase `json:"status,omitempty"`
|
||||
|
||||
// Components record the related Components created by Application Controller
|
||||
@@ -277,9 +313,6 @@ type AppStatus struct {
|
||||
// Services record the status of the application services
|
||||
Services []ApplicationComponentStatus `json:"services,omitempty"`
|
||||
|
||||
// ResourceTracker record the status of the ResourceTracker
|
||||
ResourceTracker *corev1.ObjectReference `json:"resourceTracker,omitempty"`
|
||||
|
||||
// Workflow record the status of workflow
|
||||
Workflow *WorkflowStatus `json:"workflow,omitempty"`
|
||||
|
||||
@@ -289,25 +322,88 @@ type AppStatus struct {
|
||||
|
||||
// AppliedResources record the resources that the workflow step apply.
|
||||
AppliedResources []ClusterObjectReference `json:"appliedResources,omitempty"`
|
||||
|
||||
// PolicyStatus records the status of policy
|
||||
PolicyStatus []PolicyStatus `json:"policy,omitempty"`
|
||||
}
|
||||
|
||||
// PolicyStatus records the status of policy
|
||||
type PolicyStatus struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Status *runtime.RawExtension `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStep defines how to execute a workflow step.
|
||||
type WorkflowStep struct {
|
||||
// Name is the unique name of the workflow step.
|
||||
Name string `json:"name"`
|
||||
|
||||
Type string `json:"type"`
|
||||
|
||||
Meta *WorkflowStepMeta `json:"meta,omitempty"`
|
||||
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
|
||||
SubSteps []WorkflowSubStep `json:"subSteps,omitempty"`
|
||||
|
||||
If string `json:"if,omitempty"`
|
||||
|
||||
Timeout string `json:"timeout,omitempty"`
|
||||
|
||||
DependsOn []string `json:"dependsOn,omitempty"`
|
||||
|
||||
Inputs StepInputs `json:"inputs,omitempty"`
|
||||
|
||||
Outputs StepOutputs `json:"outputs,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStepMeta contains the meta data of a workflow step
|
||||
type WorkflowStepMeta struct {
|
||||
Alias string `json:"alias,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowSubStep defines how to execute a workflow subStep.
|
||||
type WorkflowSubStep struct {
|
||||
// Name is the unique name of the workflow step.
|
||||
Name string `json:"name"`
|
||||
|
||||
Type string `json:"type"`
|
||||
|
||||
Meta *WorkflowStepMeta `json:"meta,omitempty"`
|
||||
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
|
||||
If string `json:"if,omitempty"`
|
||||
|
||||
Timeout string `json:"timeout,omitempty"`
|
||||
|
||||
DependsOn []string `json:"dependsOn,omitempty"`
|
||||
|
||||
Inputs StepInputs `json:"inputs,omitempty"`
|
||||
|
||||
Outputs StepOutputs `json:"outputs,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStatus record the status of workflow
|
||||
type WorkflowStatus struct {
|
||||
AppRevision string `json:"appRevision,omitempty"`
|
||||
Mode WorkflowMode `json:"mode"`
|
||||
Message string `json:"message,omitempty"`
|
||||
|
||||
SuspendState string `json:"suspendState,omitempty"`
|
||||
|
||||
Suspend bool `json:"suspend"`
|
||||
Terminated bool `json:"terminated"`
|
||||
Finished bool `json:"finished"`
|
||||
|
||||
ContextBackend *corev1.ObjectReference `json:"contextBackend,omitempty"`
|
||||
Steps []WorkflowStepStatus `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// SubStepsStatus record the status of workflow steps.
|
||||
type SubStepsStatus struct {
|
||||
StepIndex int `json:"stepIndex,omitempty"`
|
||||
Mode WorkflowMode `json:"mode,omitempty"`
|
||||
Steps []WorkflowSubStepStatus `json:"steps,omitempty"`
|
||||
StartTime metav1.Time `json:"startTime,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStepPhase describes the phase of a workflow step.
|
||||
@@ -316,12 +412,16 @@ type WorkflowStepPhase string
|
||||
const (
|
||||
// WorkflowStepPhaseSucceeded will make the controller run the next step.
|
||||
WorkflowStepPhaseSucceeded WorkflowStepPhase = "succeeded"
|
||||
// WorkflowStepPhaseFailed will make the controller stop the workflow and report error in `message`.
|
||||
// WorkflowStepPhaseFailed will report error in `message`.
|
||||
WorkflowStepPhaseFailed WorkflowStepPhase = "failed"
|
||||
// WorkflowStepPhaseSkipped will make the controller skip the step.
|
||||
WorkflowStepPhaseSkipped WorkflowStepPhase = "skipped"
|
||||
// WorkflowStepPhaseStopped will make the controller stop the workflow.
|
||||
WorkflowStepPhaseStopped WorkflowStepPhase = "stopped"
|
||||
// WorkflowStepPhaseRunning will make the controller continue the workflow.
|
||||
WorkflowStepPhaseRunning WorkflowStepPhase = "running"
|
||||
// WorkflowStepPhasePending will make the controller wait for the step to run.
|
||||
WorkflowStepPhasePending WorkflowStepPhase = "pending"
|
||||
)
|
||||
|
||||
// DefinitionType describes the type of DefinitionRevision.
|
||||
@@ -369,7 +469,7 @@ type AppRolloutStatus struct {
|
||||
type ApplicationTrait struct {
|
||||
Type string `json:"type"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationComponent describe the component of application
|
||||
@@ -379,7 +479,7 @@ type ApplicationComponent struct {
|
||||
// ExternalRevision specified the component revisionName
|
||||
ExternalRevision string `json:"externalRevision,omitempty"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
|
||||
DependsOn []string `json:"dependsOn,omitempty"`
|
||||
Inputs StepInputs `json:"inputs,omitempty"`
|
||||
@@ -444,11 +544,145 @@ const (
|
||||
PolicyResourceCreator ResourceCreatorRole = "policy"
|
||||
// WorkflowResourceCreator create the resource in workflow.
|
||||
WorkflowResourceCreator ResourceCreatorRole = "workflow"
|
||||
// DebugResourceCreator create the debug resource.
|
||||
DebugResourceCreator ResourceCreatorRole = "debug"
|
||||
)
|
||||
|
||||
// OAMObjectReference defines the object reference for an oam resource
|
||||
type OAMObjectReference struct {
|
||||
Component string `json:"component,omitempty"`
|
||||
Trait string `json:"trait,omitempty"`
|
||||
Env string `json:"env,omitempty"`
|
||||
}
|
||||
|
||||
// Equal check if two references are equal
|
||||
func (in OAMObjectReference) Equal(r OAMObjectReference) bool {
|
||||
return in.Component == r.Component && in.Trait == r.Trait && in.Env == r.Env
|
||||
}
|
||||
|
||||
// AddLabelsToObject add labels to object if properties are not empty
|
||||
func (in OAMObjectReference) AddLabelsToObject(obj client.Object) {
|
||||
labels := obj.GetLabels()
|
||||
if labels == nil {
|
||||
labels = map[string]string{}
|
||||
}
|
||||
if in.Component != "" {
|
||||
labels[oam.LabelAppComponent] = in.Component
|
||||
}
|
||||
if in.Trait != "" {
|
||||
labels[oam.TraitTypeLabel] = in.Trait
|
||||
}
|
||||
if in.Env != "" {
|
||||
labels[oam.LabelAppEnv] = in.Env
|
||||
}
|
||||
obj.SetLabels(labels)
|
||||
}
|
||||
|
||||
// NewOAMObjectReferenceFromObject create OAMObjectReference from object
|
||||
func NewOAMObjectReferenceFromObject(obj client.Object) OAMObjectReference {
|
||||
if labels := obj.GetLabels(); labels != nil {
|
||||
return OAMObjectReference{
|
||||
Component: labels[oam.LabelAppComponent],
|
||||
Trait: labels[oam.TraitTypeLabel],
|
||||
Env: labels[oam.LabelAppEnv],
|
||||
}
|
||||
}
|
||||
return OAMObjectReference{}
|
||||
}
|
||||
|
||||
// ClusterObjectReference defines the object reference with cluster.
|
||||
type ClusterObjectReference struct {
|
||||
Cluster string `json:"cluster,omitempty"`
|
||||
Creator ResourceCreatorRole `json:"creator,omitempty"`
|
||||
corev1.ObjectReference `json:",inline"`
|
||||
}
|
||||
|
||||
// Equal check if two references are equal
|
||||
func (in ClusterObjectReference) Equal(r ClusterObjectReference) bool {
|
||||
return in.APIVersion == r.APIVersion && in.Kind == r.Kind && in.Name == r.Name && in.Namespace == r.Namespace && in.UID == r.UID && in.Creator == r.Creator && in.Cluster == r.Cluster
|
||||
}
|
||||
|
||||
// RawExtensionPointer is the pointer of raw extension
|
||||
type RawExtensionPointer struct {
|
||||
RawExtension *runtime.RawExtension
|
||||
}
|
||||
|
||||
// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.
|
||||
// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
|
||||
func (re RawExtensionPointer) MarshalJSON() ([]byte, error) {
|
||||
if re.RawExtension == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if re.RawExtension.Raw == nil {
|
||||
// TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which
|
||||
// expect to call json.Marshal on arbitrary versioned objects (even those not in
|
||||
// the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction with
|
||||
// kubectl get on objects not in the scheme needs to be updated to ensure that the
|
||||
// objects that are not part of the scheme are correctly put into the right form.
|
||||
if re.RawExtension.Object != nil {
|
||||
return json.Marshal(re.RawExtension.Object)
|
||||
}
|
||||
return []byte("null"), nil
|
||||
}
|
||||
// TODO: Check whether ContentType is actually JSON before returning it.
|
||||
return re.RawExtension.Raw, nil
|
||||
}
|
||||
|
||||
// ApplicationConditionType is a valid value for ApplicationCondition.Type
|
||||
type ApplicationConditionType int
|
||||
|
||||
const (
|
||||
// ParsedCondition indicates whether the parsing is successful.
|
||||
ParsedCondition ApplicationConditionType = iota
|
||||
// RevisionCondition indicates whether the generated revision is successful.
|
||||
RevisionCondition
|
||||
// PolicyCondition indicates whether policy processing is successful.
|
||||
PolicyCondition
|
||||
// RenderCondition indicates whether render processing is successful.
|
||||
RenderCondition
|
||||
// WorkflowCondition indicates whether workflow processing is successful.
|
||||
WorkflowCondition
|
||||
// RolloutCondition indicates whether rollout processing is successful.
|
||||
RolloutCondition
|
||||
// ReadyCondition indicates whether whole application processing is successful.
|
||||
ReadyCondition
|
||||
)
|
||||
|
||||
var conditions = map[ApplicationConditionType]string{
|
||||
ParsedCondition: "Parsed",
|
||||
RevisionCondition: "Revision",
|
||||
PolicyCondition: "Policy",
|
||||
RenderCondition: "Render",
|
||||
WorkflowCondition: "Workflow",
|
||||
RolloutCondition: "Rollout",
|
||||
ReadyCondition: "Ready",
|
||||
}
|
||||
|
||||
// String returns the string corresponding to the condition type.
|
||||
func (ct ApplicationConditionType) String() string {
|
||||
return conditions[ct]
|
||||
}
|
||||
|
||||
// ParseApplicationConditionType parse ApplicationCondition Type.
|
||||
func ParseApplicationConditionType(s string) (ApplicationConditionType, error) {
|
||||
for k, v := range conditions {
|
||||
if v == s {
|
||||
return k, nil
|
||||
}
|
||||
}
|
||||
return -1, errors.New("unknown condition type")
|
||||
}
|
||||
|
||||
// ReferredObject the referred Kubernetes object
|
||||
type ReferredObject struct {
|
||||
// +kubebuilder:validation:EmbeddedResource
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
runtime.RawExtension `json:",inline"`
|
||||
}
|
||||
|
||||
// ReferredObjectList a list of referred Kubernetes objects
|
||||
type ReferredObjectList struct {
|
||||
// Objects a list of Kubernetes objects.
|
||||
// +optional
|
||||
Objects []ReferredObject `json:"objects,omitempty"`
|
||||
}
|
||||
|
||||
60
apis/core.oam.dev/common/types_test.go
Normal file
60
apis/core.oam.dev/common/types_test.go
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
)
|
||||
|
||||
func TestOAMObjectReference(t *testing.T) {
|
||||
r := require.New(t)
|
||||
o1 := OAMObjectReference{
|
||||
Component: "component",
|
||||
Trait: "trait",
|
||||
Env: "env",
|
||||
}
|
||||
obj := &unstructured.Unstructured{}
|
||||
o2 := NewOAMObjectReferenceFromObject(obj)
|
||||
r.False(o2.Equal(o1))
|
||||
o1.AddLabelsToObject(obj)
|
||||
r.Equal(3, len(obj.GetLabels()))
|
||||
o3 := NewOAMObjectReferenceFromObject(obj)
|
||||
r.True(o1.Equal(o3))
|
||||
o3.Component = "comp"
|
||||
r.False(o3.Equal(o1))
|
||||
|
||||
r.True(o1.Equal(*o1.DeepCopy()))
|
||||
o4 := OAMObjectReference{}
|
||||
o1.DeepCopyInto(&o4)
|
||||
r.True(o4.Equal(o1))
|
||||
}
|
||||
|
||||
func TestClusterObjectReference(t *testing.T) {
|
||||
r := require.New(t)
|
||||
o1 := ClusterObjectReference{
|
||||
Cluster: "cluster",
|
||||
ObjectReference: v1.ObjectReference{Kind: "kind"},
|
||||
}
|
||||
o2 := *o1.DeepCopy()
|
||||
r.True(o1.Equal(o2))
|
||||
o2.Cluster = "c"
|
||||
r.False(o2.Equal(o1))
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
@@ -21,7 +22,9 @@ limitations under the License.
|
||||
package common
|
||||
|
||||
import (
|
||||
crossplane_runtime "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
@@ -44,7 +47,6 @@ func (in *AppRolloutStatus) DeepCopy() *AppRolloutStatus {
|
||||
func (in *AppStatus) DeepCopyInto(out *AppStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
in.Rollout.DeepCopyInto(&out.Rollout)
|
||||
if in.Components != nil {
|
||||
in, out := &in.Components, &out.Components
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
@@ -57,11 +59,6 @@ func (in *AppStatus) DeepCopyInto(out *AppStatus) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.ResourceTracker != nil {
|
||||
in, out := &in.ResourceTracker, &out.ResourceTracker
|
||||
*out = new(v1.ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
if in.Workflow != nil {
|
||||
in, out := &in.Workflow, &out.Workflow
|
||||
*out = new(WorkflowStatus)
|
||||
@@ -77,6 +74,13 @@ func (in *AppStatus) DeepCopyInto(out *AppStatus) {
|
||||
*out = make([]ClusterObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.PolicyStatus != nil {
|
||||
in, out := &in.PolicyStatus, &out.PolicyStatus
|
||||
*out = make([]PolicyStatus, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
|
||||
@@ -92,7 +96,11 @@ func (in *AppStatus) DeepCopy() *AppStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationComponent) DeepCopyInto(out *ApplicationComponent) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.DependsOn != nil {
|
||||
in, out := &in.DependsOn, &out.DependsOn
|
||||
*out = make([]string, len(*in))
|
||||
@@ -163,7 +171,11 @@ func (in *ApplicationComponentStatus) DeepCopy() *ApplicationComponentStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationTrait) DeepCopyInto(out *ApplicationTrait) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationTrait.
|
||||
@@ -387,6 +399,41 @@ func (in *KubeParameter) DeepCopy() *KubeParameter {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *OAMObjectReference) DeepCopyInto(out *OAMObjectReference) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAMObjectReference.
|
||||
func (in *OAMObjectReference) DeepCopy() *OAMObjectReference {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(OAMObjectReference)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PolicyStatus) DeepCopyInto(out *PolicyStatus) {
|
||||
*out = *in
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStatus.
|
||||
func (in *PolicyStatus) DeepCopy() *PolicyStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PolicyStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RawComponent) DeepCopyInto(out *RawComponent) {
|
||||
*out = *in
|
||||
@@ -403,6 +450,64 @@ func (in *RawComponent) DeepCopy() *RawComponent {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RawExtensionPointer) DeepCopyInto(out *RawExtensionPointer) {
|
||||
*out = *in
|
||||
if in.RawExtension != nil {
|
||||
in, out := &in.RawExtension, &out.RawExtension
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawExtensionPointer.
|
||||
func (in *RawExtensionPointer) DeepCopy() *RawExtensionPointer {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RawExtensionPointer)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ReferredObject) DeepCopyInto(out *ReferredObject) {
|
||||
*out = *in
|
||||
in.RawExtension.DeepCopyInto(&out.RawExtension)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReferredObject.
|
||||
func (in *ReferredObject) DeepCopy() *ReferredObject {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ReferredObject)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ReferredObjectList) DeepCopyInto(out *ReferredObjectList) {
|
||||
*out = *in
|
||||
if in.Objects != nil {
|
||||
in, out := &in.Objects, &out.Objects
|
||||
*out = make([]ReferredObject, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReferredObjectList.
|
||||
func (in *ReferredObjectList) DeepCopy() *ReferredObjectList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ReferredObjectList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Revision) DeepCopyInto(out *Revision) {
|
||||
*out = *in
|
||||
@@ -439,7 +544,7 @@ func (in *Schematic) DeepCopyInto(out *Schematic) {
|
||||
if in.Terraform != nil {
|
||||
in, out := &in.Terraform, &out.Terraform
|
||||
*out = new(Terraform)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,21 +612,18 @@ func (in StepOutputs) DeepCopy() StepOutputs {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SubStepsStatus) DeepCopyInto(out *SubStepsStatus) {
|
||||
func (in *StepStatus) DeepCopyInto(out *StepStatus) {
|
||||
*out = *in
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowSubStepStatus, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.FirstExecuteTime.DeepCopyInto(&out.FirstExecuteTime)
|
||||
in.LastExecuteTime.DeepCopyInto(&out.LastExecuteTime)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubStepsStatus.
|
||||
func (in *SubStepsStatus) DeepCopy() *SubStepsStatus {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepStatus.
|
||||
func (in *StepStatus) DeepCopy() *StepStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(SubStepsStatus)
|
||||
out := new(StepStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
@@ -529,6 +631,16 @@ func (in *SubStepsStatus) DeepCopy() *SubStepsStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Terraform) DeepCopyInto(out *Terraform) {
|
||||
*out = *in
|
||||
if in.WriteConnectionSecretToReference != nil {
|
||||
in, out := &in.WriteConnectionSecretToReference, &out.WriteConnectionSecretToReference
|
||||
*out = new(crossplane_runtime.SecretReference)
|
||||
**out = **in
|
||||
}
|
||||
if in.ProviderReference != nil {
|
||||
in, out := &in.ProviderReference, &out.ProviderReference
|
||||
*out = new(crossplane_runtime.Reference)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terraform.
|
||||
@@ -556,6 +668,7 @@ func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
in.StartTime.DeepCopyInto(&out.StartTime)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.
|
||||
@@ -569,12 +682,77 @@ func (in *WorkflowStatus) DeepCopy() *WorkflowStatus {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
|
||||
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
|
||||
*out = *in
|
||||
if in.Meta != nil {
|
||||
in, out := &in.Meta, &out.Meta
|
||||
*out = new(WorkflowStepMeta)
|
||||
**out = **in
|
||||
}
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.SubSteps != nil {
|
||||
in, out := &in.SubSteps, &out.SubSteps
|
||||
*out = new(SubStepsStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
*out = make([]WorkflowSubStep, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.DependsOn != nil {
|
||||
in, out := &in.DependsOn, &out.DependsOn
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Inputs != nil {
|
||||
in, out := &in.Inputs, &out.Inputs
|
||||
*out = make(StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Outputs != nil {
|
||||
in, out := &in.Outputs, &out.Outputs
|
||||
*out = make(StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStep.
|
||||
func (in *WorkflowStep) DeepCopy() *WorkflowStep {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStep)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStepMeta) DeepCopyInto(out *WorkflowStepMeta) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepMeta.
|
||||
func (in *WorkflowStepMeta) DeepCopy() *WorkflowStepMeta {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStepMeta)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
|
||||
*out = *in
|
||||
in.StepStatus.DeepCopyInto(&out.StepStatus)
|
||||
if in.SubStepsStatus != nil {
|
||||
in, out := &in.SubStepsStatus, &out.SubStepsStatus
|
||||
*out = make([]WorkflowSubStepStatus, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,9 +766,50 @@ func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowSubStep) DeepCopyInto(out *WorkflowSubStep) {
|
||||
*out = *in
|
||||
if in.Meta != nil {
|
||||
in, out := &in.Meta, &out.Meta
|
||||
*out = new(WorkflowStepMeta)
|
||||
**out = **in
|
||||
}
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.DependsOn != nil {
|
||||
in, out := &in.DependsOn, &out.DependsOn
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Inputs != nil {
|
||||
in, out := &in.Inputs, &out.Inputs
|
||||
*out = make(StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Outputs != nil {
|
||||
in, out := &in.Outputs, &out.Outputs
|
||||
*out = make(StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSubStep.
|
||||
func (in *WorkflowSubStep) DeepCopy() *WorkflowSubStep {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowSubStep)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowSubStepStatus) DeepCopyInto(out *WorkflowSubStepStatus) {
|
||||
*out = *in
|
||||
in.StepStatus.DeepCopyInto(&out.StepStatus)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSubStepStatus.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
|
||||
61
apis/core.oam.dev/v1alpha1/applyonce_types.go
Normal file
61
apis/core.oam.dev/v1alpha1/applyonce_types.go
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
)
|
||||
|
||||
const (
|
||||
// ApplyOncePolicyType refers to the type of configuration drift policy
|
||||
ApplyOncePolicyType = "apply-once"
|
||||
)
|
||||
|
||||
// ApplyOncePolicySpec defines the spec of preventing configuration drift
|
||||
type ApplyOncePolicySpec struct {
|
||||
Enable bool `json:"enable"`
|
||||
// +optional
|
||||
Rules []ApplyOncePolicyRule `json:"rules,omitempty"`
|
||||
}
|
||||
|
||||
// ApplyOncePolicyRule defines a single apply-once policy rule
|
||||
type ApplyOncePolicyRule struct {
|
||||
// +optional
|
||||
Selector ResourcePolicyRuleSelector `json:"selector,omitempty"`
|
||||
// +optional
|
||||
Strategy *ApplyOnceStrategy `json:"strategy,omitempty"`
|
||||
}
|
||||
|
||||
// ApplyOnceStrategy the strategy for resource path to allow configuration drift
|
||||
type ApplyOnceStrategy struct {
|
||||
// Path the specified path that allow configuration drift
|
||||
// like 'spec.template.spec.containers[0].resources' and '*' means the whole target allow configuration drift
|
||||
Path []string `json:"path"`
|
||||
}
|
||||
|
||||
// FindStrategy find apply-once strategy for target resource
|
||||
func (in ApplyOncePolicySpec) FindStrategy(manifest *unstructured.Unstructured) *ApplyOnceStrategy {
|
||||
if !in.Enable {
|
||||
return nil
|
||||
}
|
||||
for _, rule := range in.Rules {
|
||||
if rule.Selector.Match(manifest) {
|
||||
return rule.Strategy
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
76
apis/core.oam.dev/v1alpha1/component_types.go
Normal file
76
apis/core.oam.dev/v1alpha1/component_types.go
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
const (
|
||||
// RefObjectsComponentType refers to the type of ref-objects
|
||||
RefObjectsComponentType = "ref-objects"
|
||||
)
|
||||
|
||||
// RefObjectsComponentSpec defines the spec of ref-objects component
|
||||
type RefObjectsComponentSpec struct {
|
||||
// Objects the referrers to the Kubernetes objects
|
||||
Objects []ObjectReferrer `json:"objects,omitempty"`
|
||||
// URLs are the links that stores the referred objects
|
||||
URLs []string `json:"urls,omitempty"`
|
||||
}
|
||||
|
||||
// ObjectReferrer selects Kubernetes objects
|
||||
type ObjectReferrer struct {
|
||||
// ObjectTypeIdentifier identifies the type of referred objects
|
||||
ObjectTypeIdentifier `json:",inline"`
|
||||
// ObjectSelector select object by name or labelSelector
|
||||
ObjectSelector `json:",inline"`
|
||||
}
|
||||
|
||||
// ObjectTypeIdentifier identifies the scheme of Kubernetes object
|
||||
type ObjectTypeIdentifier struct {
|
||||
// Resource is the resource name of the Kubernetes object.
|
||||
Resource string `json:"resource"`
|
||||
// Group is the API Group of the Kubernetes object.
|
||||
Group string `json:"group"`
|
||||
// LegacyObjectTypeIdentifier is the legacy identifier
|
||||
// Deprecated: use resource/group instead
|
||||
LegacyObjectTypeIdentifier `json:",inline"`
|
||||
}
|
||||
|
||||
// LegacyObjectTypeIdentifier legacy object type identifier
|
||||
type LegacyObjectTypeIdentifier struct {
|
||||
// APIVersion is the APIVersion of the Kubernetes object.
|
||||
APIVersion string `json:"apiVersion"`
|
||||
// APIVersion is the Kind of the Kubernetes object.
|
||||
Kind string `json:"kind"`
|
||||
}
|
||||
|
||||
// ObjectSelector selector for Kubernetes object
|
||||
type ObjectSelector struct {
|
||||
// Name is the name of the Kubernetes object.
|
||||
// If empty, it will inherit the application component's name.
|
||||
Name string `json:"name,omitempty"`
|
||||
// Namespace is the namespace for selecting Kubernetes objects.
|
||||
// If empty, it will inherit the application's namespace.
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
// Cluster is the cluster for selecting Kubernetes objects.
|
||||
// If empty, it will use the local cluster
|
||||
Cluster string `json:"cluster,omitempty"`
|
||||
// LabelSelector selects Kubernetes objects by labels
|
||||
// Exclusive to "name"
|
||||
LabelSelector map[string]string `json:"labelSelector,omitempty"`
|
||||
// DeprecatedLabelSelector a deprecated alias to LabelSelector
|
||||
// Deprecated: use labelSelector instead.
|
||||
DeprecatedLabelSelector map[string]string `json:"selector,omitempty"`
|
||||
}
|
||||
@@ -17,48 +17,63 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
)
|
||||
|
||||
// ClusterManagementEngine represents a multi-cluster management solution
|
||||
type ClusterManagementEngine string
|
||||
|
||||
const (
|
||||
// OCMEngine represents Open-Cluster-Management multi-cluster management solution
|
||||
OCMEngine ClusterManagementEngine = "ocm"
|
||||
|
||||
// SingleClusterEngine represents single cluster ClusterManagerEngine
|
||||
SingleClusterEngine ClusterManagementEngine = "single-cluster"
|
||||
|
||||
// ClusterGatewayEngine represents multi-cluster management solution with cluster-gateway
|
||||
ClusterGatewayEngine ClusterManagementEngine = "cluster-gateway"
|
||||
// EnvBindingPolicyType refers to the type of EnvBinding
|
||||
EnvBindingPolicyType = "env-binding"
|
||||
)
|
||||
|
||||
// EnvBindingPhase is a label for the condition of a EnvBinding at the current time
|
||||
type EnvBindingPhase string
|
||||
// EnvTraitPatch is the patch to trait
|
||||
type EnvTraitPatch struct {
|
||||
Type string `json:"type"`
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
Disable bool `json:"disable,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
// EnvBindingPrepare means EnvBinding is preparing the pre-work for cluster scheduling
|
||||
EnvBindingPrepare EnvBindingPhase = "preparing"
|
||||
// ToApplicationTrait convert EnvTraitPatch into ApplicationTrait
|
||||
func (in *EnvTraitPatch) ToApplicationTrait() *common.ApplicationTrait {
|
||||
out := &common.ApplicationTrait{Type: in.Type}
|
||||
if in.Properties != nil {
|
||||
out.Properties = in.Properties.DeepCopy()
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// EnvBindingRendering means EnvBinding is rendering the apps in different envs
|
||||
EnvBindingRendering EnvBindingPhase = "rendering"
|
||||
// EnvComponentPatch is the patch to component
|
||||
type EnvComponentPatch struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
Traits []EnvTraitPatch `json:"traits,omitempty"`
|
||||
ExternalRevision string `json:"externalRevision,omitempty"`
|
||||
}
|
||||
|
||||
// EnvBindingScheduling means EnvBinding is deciding which cluster the apps is scheduled to.
|
||||
EnvBindingScheduling EnvBindingPhase = "scheduling"
|
||||
|
||||
// EnvBindingFinished means EnvBinding finished env binding
|
||||
EnvBindingFinished EnvBindingPhase = "finished"
|
||||
)
|
||||
// ToApplicationComponent convert EnvComponentPatch into ApplicationComponent
|
||||
func (in *EnvComponentPatch) ToApplicationComponent() *common.ApplicationComponent {
|
||||
out := &common.ApplicationComponent{
|
||||
Name: in.Name,
|
||||
Type: in.Type,
|
||||
}
|
||||
if in.Properties != nil {
|
||||
out.Properties = in.Properties.DeepCopy()
|
||||
}
|
||||
if in.Traits != nil {
|
||||
for _, trait := range in.Traits {
|
||||
if !trait.Disable {
|
||||
out.Traits = append(out.Traits, *trait.ToApplicationTrait())
|
||||
}
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// EnvPatch specify the parameter configuration for different environments
|
||||
type EnvPatch struct {
|
||||
Components []common.ApplicationComponent `json:"components"`
|
||||
Components []EnvComponentPatch `json:"components,omitempty"`
|
||||
}
|
||||
|
||||
// NamespaceSelector defines the rules to select a Namespace resource.
|
||||
@@ -86,90 +101,42 @@ type EnvConfig struct {
|
||||
Name string `json:"name"`
|
||||
Placement EnvPlacement `json:"placement,omitempty"`
|
||||
Selector *EnvSelector `json:"selector,omitempty"`
|
||||
Patch EnvPatch `json:"patch"`
|
||||
Patch EnvPatch `json:"patch,omitempty"`
|
||||
}
|
||||
|
||||
// AppTemplate represents a application to be configured.
|
||||
type AppTemplate struct {
|
||||
// +kubebuilder:validation:EmbeddedResource
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
runtime.RawExtension `json:",inline"`
|
||||
}
|
||||
|
||||
// ClusterDecision recorded the mapping of environment and cluster
|
||||
type ClusterDecision struct {
|
||||
Env string `json:"env"`
|
||||
Cluster string `json:"cluster,omitempty"`
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
}
|
||||
|
||||
// A ConfigMapReference is a reference to a configMap in an arbitrary namespace.
|
||||
type ConfigMapReference struct {
|
||||
// Name of the secret.
|
||||
Name string `json:"name"`
|
||||
|
||||
// Namespace of the secret.
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
}
|
||||
|
||||
// A EnvBindingSpec defines the desired state of a EnvBinding.
|
||||
// EnvBindingSpec defines a list of envs
|
||||
type EnvBindingSpec struct {
|
||||
Engine ClusterManagementEngine `json:"engine,omitempty"`
|
||||
|
||||
// AppTemplate indicates the application template.
|
||||
AppTemplate AppTemplate `json:"appTemplate"`
|
||||
|
||||
Envs []EnvConfig `json:"envs"`
|
||||
|
||||
// OutputResourcesTo specifies the namespace and name of a ConfigMap
|
||||
// which store the resources rendered after differentiated configuration
|
||||
// +optional
|
||||
OutputResourcesTo *ConfigMapReference `json:"outputResourcesTo,omitempty"`
|
||||
}
|
||||
|
||||
// A EnvBindingStatus is the status of EnvBinding
|
||||
// PlacementDecision describes the placement of one application instance
|
||||
type PlacementDecision struct {
|
||||
Cluster string `json:"cluster"`
|
||||
Namespace string `json:"namespace"`
|
||||
}
|
||||
|
||||
// String encode placement decision
|
||||
func (in PlacementDecision) String() string {
|
||||
if in.Namespace == "" {
|
||||
return in.Cluster
|
||||
}
|
||||
return in.Cluster + "/" + in.Namespace
|
||||
}
|
||||
|
||||
// EnvStatus records the status of one env
|
||||
type EnvStatus struct {
|
||||
Env string `json:"env"`
|
||||
Placements []PlacementDecision `json:"placements"`
|
||||
}
|
||||
|
||||
// ClusterConnection records the connection with clusters and the last active app revision when they are active (still be used)
|
||||
type ClusterConnection struct {
|
||||
ClusterName string `json:"clusterName"`
|
||||
LastActiveRevision string `json:"lastActiveRevision"`
|
||||
}
|
||||
|
||||
// EnvBindingStatus records the status of all env
|
||||
type EnvBindingStatus struct {
|
||||
// ConditionedStatus reflects the observed status of a resource
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
Phase EnvBindingPhase `json:"phase,omitempty"`
|
||||
|
||||
ClusterDecisions []ClusterDecision `json:"clusterDecisions,omitempty"`
|
||||
|
||||
// ResourceTracker record the status of the ResourceTracker
|
||||
ResourceTracker *corev1.ObjectReference `json:"resourceTracker,omitempty"`
|
||||
}
|
||||
|
||||
// EnvBinding is the Schema for the EnvBinding API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=envbind
|
||||
// +kubebuilder:printcolumn:name="ENGINE",type=string,JSONPath=`.spec.engine`
|
||||
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.phase`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
type EnvBinding struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec EnvBindingSpec `json:"spec,omitempty"`
|
||||
Status EnvBindingStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// EnvBindingList contains a list of EnvBinding.
|
||||
type EnvBindingList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []EnvBinding `json:"items"`
|
||||
}
|
||||
|
||||
// SetConditions set condition for EnvBinding
|
||||
func (e *EnvBinding) SetConditions(c ...condition.Condition) {
|
||||
e.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition gets condition from EnvBinding
|
||||
func (e *EnvBinding) GetCondition(conditionType condition.ConditionType) condition.Condition {
|
||||
return e.Status.GetCondition(conditionType)
|
||||
Envs []EnvStatus `json:"envs"`
|
||||
ClusterConnections []ClusterConnection `json:"clusterConnections"`
|
||||
}
|
||||
|
||||
75
apis/core.oam.dev/v1alpha1/external_types.go
Normal file
75
apis/core.oam.dev/v1alpha1/external_types.go
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
)
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// Policy is the Schema for the policy API
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:resource:categories={oam}
|
||||
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.type`
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type Policy struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Type string `json:"type"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// PolicyList contains a list of Policy
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type PolicyList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Policy `json:"items"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// Workflow is the Schema for the policy API
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:resource:categories={oam}
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type Workflow struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Steps []common.WorkflowStep `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WorkflowList contains a list of Workflow
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type WorkflowList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Workflow `json:"items"`
|
||||
}
|
||||
134
apis/core.oam.dev/v1alpha1/garbagecollect_types.go
Normal file
134
apis/core.oam.dev/v1alpha1/garbagecollect_types.go
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/utils/pointer"
|
||||
"k8s.io/utils/strings/slices"
|
||||
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
)
|
||||
|
||||
const (
|
||||
// GarbageCollectPolicyType refers to the type of garbage-collect
|
||||
GarbageCollectPolicyType = "garbage-collect"
|
||||
)
|
||||
|
||||
// GarbageCollectPolicySpec defines the spec of configuration drift
|
||||
type GarbageCollectPolicySpec struct {
|
||||
// KeepLegacyResource if is set, outdated versioned resourcetracker will not be recycled automatically
|
||||
// outdated resources will be kept until resourcetracker be deleted manually
|
||||
KeepLegacyResource bool `json:"keepLegacyResource,omitempty"`
|
||||
|
||||
// Order defines the order of garbage collect
|
||||
Order GarbageCollectOrder `json:"order,omitempty"`
|
||||
|
||||
// Rules defines list of rules to control gc strategy at resource level
|
||||
// if one resource is controlled by multiple rules, first rule will be used
|
||||
Rules []GarbageCollectPolicyRule `json:"rules,omitempty"`
|
||||
}
|
||||
|
||||
// GarbageCollectOrder is the order of garbage collect
|
||||
type GarbageCollectOrder string
|
||||
|
||||
const (
|
||||
// OrderDependency is the order of dependency
|
||||
OrderDependency GarbageCollectOrder = "dependency"
|
||||
)
|
||||
|
||||
// GarbageCollectPolicyRule defines a single garbage-collect policy rule
|
||||
type GarbageCollectPolicyRule struct {
|
||||
Selector ResourcePolicyRuleSelector `json:"selector"`
|
||||
Strategy GarbageCollectStrategy `json:"strategy"`
|
||||
}
|
||||
|
||||
// ResourcePolicyRuleSelector select the targets of the rule
|
||||
// if multiple conditions are specified, combination logic is AND
|
||||
type ResourcePolicyRuleSelector struct {
|
||||
CompNames []string `json:"componentNames,omitempty"`
|
||||
CompTypes []string `json:"componentTypes,omitempty"`
|
||||
OAMResourceTypes []string `json:"oamTypes,omitempty"`
|
||||
TraitTypes []string `json:"traitTypes,omitempty"`
|
||||
ResourceTypes []string `json:"resourceTypes,omitempty"`
|
||||
ResourceNames []string `json:"resourceNames,omitempty"`
|
||||
}
|
||||
|
||||
// Match check if current rule selector match the target resource
|
||||
// If at least one condition is matched and no other condition failed (could be empty), return true
|
||||
// Otherwise, return false
|
||||
func (in *ResourcePolicyRuleSelector) Match(manifest *unstructured.Unstructured) bool {
|
||||
var compName, compType, oamType, traitType, resourceType, resourceName string
|
||||
if labels := manifest.GetLabels(); labels != nil {
|
||||
compName = labels[oam.LabelAppComponent]
|
||||
compType = labels[oam.WorkloadTypeLabel]
|
||||
oamType = labels[oam.LabelOAMResourceType]
|
||||
traitType = labels[oam.TraitTypeLabel]
|
||||
}
|
||||
resourceType = manifest.GetKind()
|
||||
resourceName = manifest.GetName()
|
||||
match := func(src []string, val string) (found *bool) {
|
||||
if len(src) == 0 {
|
||||
return nil
|
||||
}
|
||||
return pointer.Bool(val != "" && slices.Contains(src, val))
|
||||
}
|
||||
conditions := []*bool{
|
||||
match(in.CompNames, compName),
|
||||
match(in.CompTypes, compType),
|
||||
match(in.OAMResourceTypes, oamType),
|
||||
match(in.TraitTypes, traitType),
|
||||
match(in.ResourceTypes, resourceType),
|
||||
match(in.ResourceNames, resourceName),
|
||||
}
|
||||
hasMatched := false
|
||||
for _, cond := range conditions {
|
||||
// if any non-empty condition failed, return false
|
||||
if cond != nil && !*cond {
|
||||
return false
|
||||
}
|
||||
// if condition succeed, record it
|
||||
if cond != nil && *cond {
|
||||
hasMatched = true
|
||||
}
|
||||
}
|
||||
// if at least one condition is met, return true
|
||||
return hasMatched
|
||||
}
|
||||
|
||||
// GarbageCollectStrategy the strategy for target resource to recycle
|
||||
type GarbageCollectStrategy string
|
||||
|
||||
const (
|
||||
// GarbageCollectStrategyNever do not recycle target resource, leave it
|
||||
GarbageCollectStrategyNever GarbageCollectStrategy = "never"
|
||||
// GarbageCollectStrategyOnAppDelete do not recycle target resource until application is deleted
|
||||
// this means the resource will be kept even it is not used in the latest version
|
||||
GarbageCollectStrategyOnAppDelete GarbageCollectStrategy = "onAppDelete"
|
||||
// GarbageCollectStrategyOnAppUpdate recycle target resource when it is not inUse
|
||||
GarbageCollectStrategyOnAppUpdate GarbageCollectStrategy = "onAppUpdate"
|
||||
)
|
||||
|
||||
// FindStrategy find gc strategy for target resource
|
||||
func (in GarbageCollectPolicySpec) FindStrategy(manifest *unstructured.Unstructured) *GarbageCollectStrategy {
|
||||
for _, rule := range in.Rules {
|
||||
if rule.Selector.Match(manifest) {
|
||||
return &rule.Strategy
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
137
apis/core.oam.dev/v1alpha1/garbagecollect_types_test.go
Normal file
137
apis/core.oam.dev/v1alpha1/garbagecollect_types_test.go
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
)
|
||||
|
||||
func TestGarbageCollectPolicySpec_FindStrategy(t *testing.T) {
|
||||
testCases := map[string]struct {
|
||||
rules []GarbageCollectPolicyRule
|
||||
input *unstructured.Unstructured
|
||||
notFound bool
|
||||
expectStrategy GarbageCollectStrategy
|
||||
}{
|
||||
"trait type rule match": {
|
||||
rules: []GarbageCollectPolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
|
||||
Strategy: GarbageCollectStrategyNever,
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]interface{}{oam.TraitTypeLabel: "a"},
|
||||
},
|
||||
}},
|
||||
expectStrategy: GarbageCollectStrategyNever,
|
||||
},
|
||||
"trait type rule mismatch": {
|
||||
rules: []GarbageCollectPolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
|
||||
Strategy: GarbageCollectStrategyNever,
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{}},
|
||||
notFound: true,
|
||||
},
|
||||
"trait type rule multiple match": {
|
||||
rules: []GarbageCollectPolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
|
||||
Strategy: GarbageCollectStrategyOnAppDelete,
|
||||
}, {
|
||||
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
|
||||
Strategy: GarbageCollectStrategyNever,
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]interface{}{oam.TraitTypeLabel: "a"},
|
||||
},
|
||||
}},
|
||||
expectStrategy: GarbageCollectStrategyOnAppDelete,
|
||||
},
|
||||
"component type rule match": {
|
||||
rules: []GarbageCollectPolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{CompTypes: []string{"comp"}},
|
||||
Strategy: GarbageCollectStrategyNever,
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]interface{}{oam.WorkloadTypeLabel: "comp"},
|
||||
},
|
||||
}},
|
||||
expectStrategy: GarbageCollectStrategyNever,
|
||||
},
|
||||
"rule match both component type and trait type, component type first": {
|
||||
rules: []GarbageCollectPolicyRule{
|
||||
{
|
||||
Selector: ResourcePolicyRuleSelector{CompTypes: []string{"comp"}},
|
||||
Strategy: GarbageCollectStrategyNever,
|
||||
},
|
||||
{
|
||||
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"trait"}},
|
||||
Strategy: GarbageCollectStrategyOnAppDelete,
|
||||
},
|
||||
},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]interface{}{oam.WorkloadTypeLabel: "comp", oam.TraitTypeLabel: "trait"},
|
||||
},
|
||||
}},
|
||||
expectStrategy: GarbageCollectStrategyNever,
|
||||
},
|
||||
"component name rule match": {
|
||||
rules: []GarbageCollectPolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{CompNames: []string{"comp-name"}},
|
||||
Strategy: GarbageCollectStrategyNever,
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]interface{}{oam.LabelAppComponent: "comp-name"},
|
||||
},
|
||||
}},
|
||||
expectStrategy: GarbageCollectStrategyNever,
|
||||
},
|
||||
"resource type rule match": {
|
||||
rules: []GarbageCollectPolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{OAMResourceTypes: []string{"TRAIT"}},
|
||||
Strategy: GarbageCollectStrategyNever,
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]interface{}{oam.LabelOAMResourceType: "TRAIT"},
|
||||
},
|
||||
}},
|
||||
expectStrategy: GarbageCollectStrategyNever,
|
||||
},
|
||||
}
|
||||
for name, tc := range testCases {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
r := require.New(t)
|
||||
spec := GarbageCollectPolicySpec{Rules: tc.rules}
|
||||
strategy := spec.FindStrategy(tc.input)
|
||||
if tc.notFound {
|
||||
r.Nil(strategy)
|
||||
} else {
|
||||
r.Equal(tc.expectStrategy, *strategy)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
79
apis/core.oam.dev/v1alpha1/policy_types.go
Normal file
79
apis/core.oam.dev/v1alpha1/policy_types.go
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
const (
|
||||
// TopologyPolicyType refers to the type of topology policy
|
||||
TopologyPolicyType = "topology"
|
||||
// OverridePolicyType refers to the type of override policy
|
||||
OverridePolicyType = "override"
|
||||
// DebugPolicyType refers to the type of debug policy
|
||||
DebugPolicyType = "debug"
|
||||
// SharedResourcePolicyType refers to the type of shared resource policy
|
||||
SharedResourcePolicyType = "shared-resource"
|
||||
)
|
||||
|
||||
// TopologyPolicySpec defines the spec of topology policy
|
||||
type TopologyPolicySpec struct {
|
||||
// Placement embeds the selectors for choosing cluster
|
||||
Placement `json:",inline"`
|
||||
// Namespace is the target namespace to deploy in the selected clusters.
|
||||
// +optional
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
}
|
||||
|
||||
// Placement describes which clusters to be selected in this topology
|
||||
type Placement struct {
|
||||
// Clusters is the names of the clusters to select.
|
||||
Clusters []string `json:"clusters,omitempty"`
|
||||
|
||||
// ClusterLabelSelector is the label selector for clusters.
|
||||
// Exclusive to "clusters"
|
||||
ClusterLabelSelector map[string]string `json:"clusterLabelSelector,omitempty"`
|
||||
|
||||
// DeprecatedClusterSelector is a depreciated alias for ClusterLabelSelector.
|
||||
// Deprecated: Use clusterLabelSelector instead.
|
||||
DeprecatedClusterSelector map[string]string `json:"clusterSelector,omitempty"`
|
||||
}
|
||||
|
||||
// OverridePolicySpec defines the spec of override policy
|
||||
type OverridePolicySpec struct {
|
||||
Components []EnvComponentPatch `json:"components,omitempty"`
|
||||
Selector []string `json:"selector,omitempty"`
|
||||
}
|
||||
|
||||
// SharedResourcePolicySpec defines the spec of shared-resource policy
|
||||
type SharedResourcePolicySpec struct {
|
||||
Rules []SharedResourcePolicyRule `json:"rules"`
|
||||
}
|
||||
|
||||
// SharedResourcePolicyRule defines the rule for sharing resources
|
||||
type SharedResourcePolicyRule struct {
|
||||
Selector ResourcePolicyRuleSelector `json:"selector"`
|
||||
}
|
||||
|
||||
// FindStrategy return if the target resource should be shared
|
||||
func (in SharedResourcePolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool {
|
||||
for _, rule := range in.Rules {
|
||||
if rule.Selector.Match(manifest) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
69
apis/core.oam.dev/v1alpha1/policy_types_test.go
Normal file
69
apis/core.oam.dev/v1alpha1/policy_types_test.go
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
Copyright 2022 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
)
|
||||
|
||||
func TestSharedResourcePolicySpec_FindStrategy(t *testing.T) {
|
||||
testCases := map[string]struct {
|
||||
rules []SharedResourcePolicyRule
|
||||
input *unstructured.Unstructured
|
||||
matched bool
|
||||
}{
|
||||
"shared resource rule resourceName match": {
|
||||
rules: []SharedResourcePolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{ResourceNames: []string{"example"}},
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"name": "example",
|
||||
},
|
||||
}},
|
||||
matched: true,
|
||||
},
|
||||
"shared resource rule resourceType match": {
|
||||
rules: []SharedResourcePolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{ResourceTypes: []string{"ConfigMap", "Namespace"}},
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"kind": "Namespace",
|
||||
}},
|
||||
matched: true,
|
||||
},
|
||||
"shared resource rule mismatch": {
|
||||
rules: []SharedResourcePolicyRule{{
|
||||
Selector: ResourcePolicyRuleSelector{ResourceNames: []string{"mismatch"}},
|
||||
}},
|
||||
input: &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"kind": "Namespace",
|
||||
}},
|
||||
matched: false,
|
||||
},
|
||||
}
|
||||
for name, tc := range testCases {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
r := require.New(t)
|
||||
spec := SharedResourcePolicySpec{Rules: tc.rules}
|
||||
r.Equal(tc.matched, spec.FindStrategy(tc.input))
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,15 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
)
|
||||
|
||||
// Package type metadata.
|
||||
const (
|
||||
Group = "core.oam.dev"
|
||||
Group = common.Group
|
||||
Version = "v1alpha1"
|
||||
)
|
||||
|
||||
@@ -35,16 +35,24 @@ var (
|
||||
|
||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
||||
|
||||
// AddToScheme is a global function that registers this API group & version to a scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// EnvBinding type metadata.
|
||||
// Policy meta
|
||||
var (
|
||||
EnvBindingKind = reflect.TypeOf(EnvBinding{}).Name()
|
||||
EnvBindingGroupKind = schema.GroupKind{Group: Group, Kind: EnvBindingKind}.String()
|
||||
EnvBindingKindAPIVersion = EnvBindingKind + "." + SchemeGroupVersion.String()
|
||||
EnvBindingKindVersionKind = SchemeGroupVersion.WithKind(EnvBindingKind)
|
||||
PolicyKind = "Policy"
|
||||
PolicyGroupVersionKind = SchemeGroupVersion.WithKind(PolicyKind)
|
||||
)
|
||||
|
||||
// Workflow meta
|
||||
var (
|
||||
WorkflowKind = "Workflow"
|
||||
WorkflowGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowKind)
|
||||
)
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&EnvBinding{}, &EnvBindingList{})
|
||||
SchemeBuilder.Register(&Policy{}, &PolicyList{})
|
||||
SchemeBuilder.Register(&Workflow{}, &WorkflowList{})
|
||||
}
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
Copyright 2021. The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
)
|
||||
|
||||
// WorkflowStepPhase describes the phase of a workflow step.
|
||||
type WorkflowStepPhase string
|
||||
|
||||
const (
|
||||
// WorkflowStepPhaseSucceeded will make the controller run the next step.
|
||||
WorkflowStepPhaseSucceeded WorkflowStepPhase = "succeeded"
|
||||
// WorkflowStepPhaseFailed will make the controller stop the workflow and report error in `message`.
|
||||
WorkflowStepPhaseFailed WorkflowStepPhase = "failed"
|
||||
// WorkflowStepPhaseTerminated will make the controller terminate the workflow.
|
||||
WorkflowStepPhaseTerminated WorkflowStepPhase = "terminated"
|
||||
// WorkflowStepPhaseSuspending will make the controller suspend the workflow.
|
||||
WorkflowStepPhaseSuspending WorkflowStepPhase = "suspending"
|
||||
// WorkflowStepPhaseRunning will make the controller continue the workflow.
|
||||
WorkflowStepPhaseRunning WorkflowStepPhase = "running"
|
||||
)
|
||||
|
||||
// WorkflowStep defines how to execute a workflow step.
|
||||
type WorkflowStep struct {
|
||||
// Name is the unique name of the workflow step.
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
Inputs common.StepInputs `json:"inputs,omitempty"`
|
||||
Outputs common.StepOutputs `json:"outputs,omitempty"`
|
||||
}
|
||||
|
||||
// A WorkflowSpec defines the desired state of a Workflow.
|
||||
type WorkflowSpec struct {
|
||||
Steps []WorkflowStep `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// A WorkflowStatus is the status of Workflow
|
||||
type WorkflowStatus struct {
|
||||
// ConditionedStatus reflects the observed status of a resource
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
StepIndex int `json:"stepIndex,omitempty"`
|
||||
Suspend bool `json:"suspend"`
|
||||
Terminated bool `json:"terminated"`
|
||||
ContextBackend *corev1.ObjectReference `json:"contextBackend"`
|
||||
Steps []WorkflowStepStatus `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStepStatus record the status of a workflow step
|
||||
type WorkflowStepStatus struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Phase WorkflowStepPhase `json:"phase,omitempty"`
|
||||
// A human readable message indicating details about why the workflowStep is in this state.
|
||||
Message string `json:"message,omitempty"`
|
||||
// A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
ResourceRef corev1.ObjectReference `json:"resourceRef,omitempty"`
|
||||
}
|
||||
|
||||
// Workflow is the Schema for the Workflow API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workflow
|
||||
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.phase`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
type Workflow struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec WorkflowSpec `json:"spec,omitempty"`
|
||||
Status WorkflowStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WorkflowList contains a list of Workflow.
|
||||
type WorkflowList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Workflow `json:"items"`
|
||||
}
|
||||
|
||||
// SetConditions set condition for Workflow
|
||||
func (w *Workflow) SetConditions(c ...condition.Condition) {
|
||||
w.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition gets condition from Workflow
|
||||
func (w *Workflow) GetCondition(conditionType condition.ConditionType) condition.Condition {
|
||||
return w.Status.GetCondition(conditionType)
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
@@ -21,121 +22,92 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppTemplate) DeepCopyInto(out *AppTemplate) {
|
||||
func (in *ApplyOncePolicyRule) DeepCopyInto(out *ApplyOncePolicyRule) {
|
||||
*out = *in
|
||||
in.RawExtension.DeepCopyInto(&out.RawExtension)
|
||||
in.Selector.DeepCopyInto(&out.Selector)
|
||||
if in.Strategy != nil {
|
||||
in, out := &in.Strategy, &out.Strategy
|
||||
*out = new(ApplyOnceStrategy)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppTemplate.
|
||||
func (in *AppTemplate) DeepCopy() *AppTemplate {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOncePolicyRule.
|
||||
func (in *ApplyOncePolicyRule) DeepCopy() *ApplyOncePolicyRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppTemplate)
|
||||
out := new(ApplyOncePolicyRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterDecision) DeepCopyInto(out *ClusterDecision) {
|
||||
func (in *ApplyOncePolicySpec) DeepCopyInto(out *ApplyOncePolicySpec) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDecision.
|
||||
func (in *ClusterDecision) DeepCopy() *ClusterDecision {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterDecision)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ConfigMapReference) DeepCopyInto(out *ConfigMapReference) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapReference.
|
||||
func (in *ConfigMapReference) DeepCopy() *ConfigMapReference {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConfigMapReference)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvBinding) DeepCopyInto(out *EnvBinding) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBinding.
|
||||
func (in *EnvBinding) DeepCopy() *EnvBinding {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EnvBinding)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *EnvBinding) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvBindingList) DeepCopyInto(out *EnvBindingList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]EnvBinding, len(*in))
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]ApplyOncePolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingList.
|
||||
func (in *EnvBindingList) DeepCopy() *EnvBindingList {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOncePolicySpec.
|
||||
func (in *ApplyOncePolicySpec) DeepCopy() *ApplyOncePolicySpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EnvBindingList)
|
||||
out := new(ApplyOncePolicySpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *EnvBindingList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplyOnceStrategy) DeepCopyInto(out *ApplyOnceStrategy) {
|
||||
*out = *in
|
||||
if in.Path != nil {
|
||||
in, out := &in.Path, &out.Path
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOnceStrategy.
|
||||
func (in *ApplyOnceStrategy) DeepCopy() *ApplyOnceStrategy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ApplyOnceStrategy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterConnection) DeepCopyInto(out *ClusterConnection) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnection.
|
||||
func (in *ClusterConnection) DeepCopy() *ClusterConnection {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterConnection)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvBindingSpec) DeepCopyInto(out *EnvBindingSpec) {
|
||||
*out = *in
|
||||
in.AppTemplate.DeepCopyInto(&out.AppTemplate)
|
||||
if in.Envs != nil {
|
||||
in, out := &in.Envs, &out.Envs
|
||||
*out = make([]EnvConfig, len(*in))
|
||||
@@ -143,11 +115,6 @@ func (in *EnvBindingSpec) DeepCopyInto(out *EnvBindingSpec) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.OutputResourcesTo != nil {
|
||||
in, out := &in.OutputResourcesTo, &out.OutputResourcesTo
|
||||
*out = new(ConfigMapReference)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingSpec.
|
||||
@@ -163,16 +130,17 @@ func (in *EnvBindingSpec) DeepCopy() *EnvBindingSpec {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvBindingStatus) DeepCopyInto(out *EnvBindingStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
if in.ClusterDecisions != nil {
|
||||
in, out := &in.ClusterDecisions, &out.ClusterDecisions
|
||||
*out = make([]ClusterDecision, len(*in))
|
||||
copy(*out, *in)
|
||||
if in.Envs != nil {
|
||||
in, out := &in.Envs, &out.Envs
|
||||
*out = make([]EnvStatus, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.ResourceTracker != nil {
|
||||
in, out := &in.ResourceTracker, &out.ResourceTracker
|
||||
*out = new(v1.ObjectReference)
|
||||
**out = **in
|
||||
if in.ClusterConnections != nil {
|
||||
in, out := &in.ClusterConnections, &out.ClusterConnections
|
||||
*out = make([]ClusterConnection, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +154,33 @@ func (in *EnvBindingStatus) DeepCopy() *EnvBindingStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvComponentPatch) DeepCopyInto(out *EnvComponentPatch) {
|
||||
*out = *in
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Traits != nil {
|
||||
in, out := &in.Traits, &out.Traits
|
||||
*out = make([]EnvTraitPatch, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvComponentPatch.
|
||||
func (in *EnvComponentPatch) DeepCopy() *EnvComponentPatch {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EnvComponentPatch)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvConfig) DeepCopyInto(out *EnvConfig) {
|
||||
*out = *in
|
||||
@@ -213,7 +208,7 @@ func (in *EnvPatch) DeepCopyInto(out *EnvPatch) {
|
||||
*out = *in
|
||||
if in.Components != nil {
|
||||
in, out := &in.Components, &out.Components
|
||||
*out = make([]common.ApplicationComponent, len(*in))
|
||||
*out = make([]EnvComponentPatch, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
@@ -275,6 +270,99 @@ func (in *EnvSelector) DeepCopy() *EnvSelector {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvStatus) DeepCopyInto(out *EnvStatus) {
|
||||
*out = *in
|
||||
if in.Placements != nil {
|
||||
in, out := &in.Placements, &out.Placements
|
||||
*out = make([]PlacementDecision, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvStatus.
|
||||
func (in *EnvStatus) DeepCopy() *EnvStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EnvStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvTraitPatch) DeepCopyInto(out *EnvTraitPatch) {
|
||||
*out = *in
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvTraitPatch.
|
||||
func (in *EnvTraitPatch) DeepCopy() *EnvTraitPatch {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EnvTraitPatch)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *GarbageCollectPolicyRule) DeepCopyInto(out *GarbageCollectPolicyRule) {
|
||||
*out = *in
|
||||
in.Selector.DeepCopyInto(&out.Selector)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GarbageCollectPolicyRule.
|
||||
func (in *GarbageCollectPolicyRule) DeepCopy() *GarbageCollectPolicyRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(GarbageCollectPolicyRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *GarbageCollectPolicySpec) DeepCopyInto(out *GarbageCollectPolicySpec) {
|
||||
*out = *in
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]GarbageCollectPolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GarbageCollectPolicySpec.
|
||||
func (in *GarbageCollectPolicySpec) DeepCopy() *GarbageCollectPolicySpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(GarbageCollectPolicySpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *LegacyObjectTypeIdentifier) DeepCopyInto(out *LegacyObjectTypeIdentifier) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyObjectTypeIdentifier.
|
||||
func (in *LegacyObjectTypeIdentifier) DeepCopy() *LegacyObjectTypeIdentifier {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(LegacyObjectTypeIdentifier)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector) {
|
||||
*out = *in
|
||||
@@ -297,13 +385,344 @@ func (in *NamespaceSelector) DeepCopy() *NamespaceSelector {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ObjectReferrer) DeepCopyInto(out *ObjectReferrer) {
|
||||
*out = *in
|
||||
out.ObjectTypeIdentifier = in.ObjectTypeIdentifier
|
||||
in.ObjectSelector.DeepCopyInto(&out.ObjectSelector)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReferrer.
|
||||
func (in *ObjectReferrer) DeepCopy() *ObjectReferrer {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ObjectReferrer)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ObjectSelector) DeepCopyInto(out *ObjectSelector) {
|
||||
*out = *in
|
||||
if in.LabelSelector != nil {
|
||||
in, out := &in.LabelSelector, &out.LabelSelector
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.DeprecatedLabelSelector != nil {
|
||||
in, out := &in.DeprecatedLabelSelector, &out.DeprecatedLabelSelector
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSelector.
|
||||
func (in *ObjectSelector) DeepCopy() *ObjectSelector {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ObjectSelector)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ObjectTypeIdentifier) DeepCopyInto(out *ObjectTypeIdentifier) {
|
||||
*out = *in
|
||||
out.LegacyObjectTypeIdentifier = in.LegacyObjectTypeIdentifier
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectTypeIdentifier.
|
||||
func (in *ObjectTypeIdentifier) DeepCopy() *ObjectTypeIdentifier {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ObjectTypeIdentifier)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *OverridePolicySpec) DeepCopyInto(out *OverridePolicySpec) {
|
||||
*out = *in
|
||||
if in.Components != nil {
|
||||
in, out := &in.Components, &out.Components
|
||||
*out = make([]EnvComponentPatch, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OverridePolicySpec.
|
||||
func (in *OverridePolicySpec) DeepCopy() *OverridePolicySpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(OverridePolicySpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Placement) DeepCopyInto(out *Placement) {
|
||||
*out = *in
|
||||
if in.Clusters != nil {
|
||||
in, out := &in.Clusters, &out.Clusters
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.ClusterLabelSelector != nil {
|
||||
in, out := &in.ClusterLabelSelector, &out.ClusterLabelSelector
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.DeprecatedClusterSelector != nil {
|
||||
in, out := &in.DeprecatedClusterSelector, &out.DeprecatedClusterSelector
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
|
||||
func (in *Placement) DeepCopy() *Placement {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Placement)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PlacementDecision) DeepCopyInto(out *PlacementDecision) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDecision.
|
||||
func (in *PlacementDecision) DeepCopy() *PlacementDecision {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PlacementDecision)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Policy) DeepCopyInto(out *Policy) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
|
||||
func (in *Policy) DeepCopy() *Policy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Policy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Policy) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PolicyList) DeepCopyInto(out *PolicyList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Policy, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList.
|
||||
func (in *PolicyList) DeepCopy() *PolicyList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PolicyList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PolicyList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RefObjectsComponentSpec) DeepCopyInto(out *RefObjectsComponentSpec) {
|
||||
*out = *in
|
||||
if in.Objects != nil {
|
||||
in, out := &in.Objects, &out.Objects
|
||||
*out = make([]ObjectReferrer, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.URLs != nil {
|
||||
in, out := &in.URLs, &out.URLs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RefObjectsComponentSpec.
|
||||
func (in *RefObjectsComponentSpec) DeepCopy() *RefObjectsComponentSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RefObjectsComponentSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourcePolicyRuleSelector) DeepCopyInto(out *ResourcePolicyRuleSelector) {
|
||||
*out = *in
|
||||
if in.CompNames != nil {
|
||||
in, out := &in.CompNames, &out.CompNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.CompTypes != nil {
|
||||
in, out := &in.CompTypes, &out.CompTypes
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.OAMResourceTypes != nil {
|
||||
in, out := &in.OAMResourceTypes, &out.OAMResourceTypes
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.TraitTypes != nil {
|
||||
in, out := &in.TraitTypes, &out.TraitTypes
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.ResourceTypes != nil {
|
||||
in, out := &in.ResourceTypes, &out.ResourceTypes
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.ResourceNames != nil {
|
||||
in, out := &in.ResourceNames, &out.ResourceNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePolicyRuleSelector.
|
||||
func (in *ResourcePolicyRuleSelector) DeepCopy() *ResourcePolicyRuleSelector {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourcePolicyRuleSelector)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SharedResourcePolicyRule) DeepCopyInto(out *SharedResourcePolicyRule) {
|
||||
*out = *in
|
||||
in.Selector.DeepCopyInto(&out.Selector)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicyRule.
|
||||
func (in *SharedResourcePolicyRule) DeepCopy() *SharedResourcePolicyRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(SharedResourcePolicyRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SharedResourcePolicySpec) DeepCopyInto(out *SharedResourcePolicySpec) {
|
||||
*out = *in
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]SharedResourcePolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicySpec.
|
||||
func (in *SharedResourcePolicySpec) DeepCopy() *SharedResourcePolicySpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(SharedResourcePolicySpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TopologyPolicySpec) DeepCopyInto(out *TopologyPolicySpec) {
|
||||
*out = *in
|
||||
in.Placement.DeepCopyInto(&out.Placement)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyPolicySpec.
|
||||
func (in *TopologyPolicySpec) DeepCopy() *TopologyPolicySpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TopologyPolicySpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Workflow) DeepCopyInto(out *Workflow) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]common.WorkflowStep, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.
|
||||
@@ -355,93 +774,3 @@ func (in *WorkflowList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec) {
|
||||
*out = *in
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowStep, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSpec.
|
||||
func (in *WorkflowSpec) DeepCopy() *WorkflowSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
if in.ContextBackend != nil {
|
||||
in, out := &in.ContextBackend, &out.ContextBackend
|
||||
*out = new(v1.ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowStepStatus, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.
|
||||
func (in *WorkflowStatus) DeepCopy() *WorkflowStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.Inputs != nil {
|
||||
in, out := &in.Inputs, &out.Inputs
|
||||
*out = make(common.StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Outputs != nil {
|
||||
in, out := &in.Outputs, &out.Outputs
|
||||
*out = make(common.StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStep.
|
||||
func (in *WorkflowStep) DeepCopy() *WorkflowStep {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStep)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
|
||||
*out = *in
|
||||
out.ResourceRef = in.ResourceRef
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepStatus.
|
||||
func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStepStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ type AppStatus struct {
|
||||
type ApplicationTrait struct {
|
||||
Name string `json:"name"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationComponent describe the component of application
|
||||
@@ -87,7 +87,7 @@ type ApplicationSpec struct {
|
||||
|
||||
// Application is the Schema for the applications API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:categories={oam},shortName=app
|
||||
// +kubebuilder:resource:categories={oam},shortName={app,velaapp}
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:printcolumn:name="COMPONENT",type=string,JSONPath=`.spec.components[*].name`
|
||||
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.spec.components[*].type`
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
|
||||
)
|
||||
|
||||
// AppRolloutSpec defines how to describe an upgrade between different apps
|
||||
type AppRolloutSpec struct {
|
||||
// TargetAppRevisionName contains the name of the applicationRevision that we need to upgrade to.
|
||||
TargetAppRevisionName string `json:"targetAppRevisionName"`
|
||||
|
||||
// SourceAppRevisionName contains the name of the applicationRevision that we need to upgrade from.
|
||||
// it can be empty only when the rolling is only a scale event
|
||||
SourceAppRevisionName string `json:"sourceAppRevisionName,omitempty"`
|
||||
|
||||
// The list of component to upgrade in the application.
|
||||
// We only support single component application so far
|
||||
// TODO: (RZ) Support multiple components in an application
|
||||
// +optional
|
||||
ComponentList []string `json:"componentList,omitempty"`
|
||||
|
||||
// RolloutPlan is the details on how to rollout the resources
|
||||
RolloutPlan v1alpha1.RolloutPlan `json:"rolloutPlan"`
|
||||
|
||||
// RevertOnDelete revert the rollout when the rollout CR is deleted
|
||||
// It will remove the target app from the kubernetes if it's set to true
|
||||
// +optional
|
||||
RevertOnDelete *bool `json:"revertOnDelete,omitempty"`
|
||||
}
|
||||
|
||||
// AppRolloutStatus defines the observed state of AppRollout
|
||||
type AppRolloutStatus struct {
|
||||
v1alpha1.RolloutStatus `json:",inline"`
|
||||
|
||||
// LastUpgradedTargetAppRevision contains the name of the app that we upgraded to
|
||||
// We will restart the rollout if this is not the same as the spec
|
||||
LastUpgradedTargetAppRevision string `json:"lastTargetAppRevision"`
|
||||
|
||||
// LastSourceAppRevision contains the name of the app that we need to upgrade from.
|
||||
// We will restart the rollout if this is not the same as the spec
|
||||
LastSourceAppRevision string `json:"LastSourceAppRevision,omitempty"`
|
||||
}
|
||||
|
||||
// AppRollout is the Schema for the AppRollout API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:categories={oam},shortName=approllout
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:printcolumn:name="TARGET",type=string,JSONPath=`.status.rolloutStatus.rolloutTargetSize`
|
||||
// +kubebuilder:printcolumn:name="UPGRADED",type=string,JSONPath=`.status.rolloutStatus.upgradedReplicas`
|
||||
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=`.status.rolloutStatus.upgradedReadyReplicas`
|
||||
// +kubebuilder:printcolumn:name="BATCH-STATE",type=string,JSONPath=`.status.rolloutStatus.batchRollingState`
|
||||
// +kubebuilder:printcolumn:name="ROLLING-STATE",type=string,JSONPath=`.status.rolloutStatus.rollingState`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
type AppRollout struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec AppRolloutSpec `json:"spec,omitempty"`
|
||||
Status AppRolloutStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// AppRolloutList contains a list of AppRollout
|
||||
// +kubebuilder:object:root=true
|
||||
type AppRolloutList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []AppRollout `json:"items"`
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/klog/v2"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
@@ -44,7 +45,7 @@ func ApplicationV1alpha2ToV1beta1(v1a2 *Application, v1b1 *v1beta1.Application)
|
||||
for j, trait := range comp.Traits {
|
||||
traits[j] = common.ApplicationTrait{
|
||||
Type: trait.Name,
|
||||
Properties: *trait.Properties.DeepCopy(),
|
||||
Properties: trait.Properties.DeepCopy(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,13 +59,11 @@ func ApplicationV1alpha2ToV1beta1(v1a2 *Application, v1b1 *v1beta1.Application)
|
||||
v1b1.Spec.Components = append(v1b1.Spec.Components, common.ApplicationComponent{
|
||||
Name: comp.Name,
|
||||
Type: comp.WorkloadType,
|
||||
Properties: *comp.Settings.DeepCopy(),
|
||||
Properties: comp.Settings.DeepCopy(),
|
||||
Traits: traits,
|
||||
Scopes: scopes,
|
||||
})
|
||||
}
|
||||
// 3.2) convert Spec.RolloutPlan
|
||||
v1b1.Spec.RolloutPlan = v1a2.Spec.RolloutPlan.DeepCopy()
|
||||
|
||||
// 4) convert Status common.AppStatus
|
||||
v1b1.Status = *v1a2.Status.DeepCopy()
|
||||
@@ -104,7 +103,7 @@ func (app *Application) ConvertFrom(src conversion.Hub) error {
|
||||
for j, trait := range comp.Traits {
|
||||
traits[j] = ApplicationTrait{
|
||||
Name: trait.Type,
|
||||
Properties: *trait.Properties.DeepCopy(),
|
||||
Properties: trait.Properties.DeepCopy(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,16 +114,21 @@ func (app *Application) ConvertFrom(src conversion.Hub) error {
|
||||
}
|
||||
// convert component
|
||||
// `.properties` -> `.settings`
|
||||
|
||||
var compProperties runtime.RawExtension
|
||||
|
||||
if comp.Properties != nil {
|
||||
compProperties = *comp.Properties.DeepCopy()
|
||||
}
|
||||
|
||||
app.Spec.Components = append(app.Spec.Components, ApplicationComponent{
|
||||
Name: comp.Name,
|
||||
WorkloadType: comp.Type,
|
||||
Settings: *comp.Properties.DeepCopy(),
|
||||
Settings: compProperties,
|
||||
Traits: traits,
|
||||
Scopes: scopes,
|
||||
})
|
||||
}
|
||||
// 3.2) convert Spec.RolloutPlan
|
||||
app.Spec.RolloutPlan = sourceApp.Spec.RolloutPlan.DeepCopy()
|
||||
|
||||
// 4) convert Status common.AppStatus
|
||||
app.Status = *sourceApp.Status.DeepCopy()
|
||||
|
||||
117
apis/core.oam.dev/v1alpha2/conversion_test.go
Normal file
117
apis/core.oam.dev/v1alpha2/conversion_test.go
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
|
||||
)
|
||||
|
||||
var app = Application{
|
||||
Spec: ApplicationSpec{
|
||||
Components: []ApplicationComponent{{
|
||||
Name: "test-component",
|
||||
WorkloadType: "worker",
|
||||
Traits: []ApplicationTrait{},
|
||||
Scopes: map[string]string{},
|
||||
}},
|
||||
},
|
||||
}
|
||||
|
||||
type errType struct {
|
||||
}
|
||||
|
||||
func (*errType) Hub() {}
|
||||
|
||||
func (*errType) DeepCopyObject() runtime.Object {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*errType) GetObjectKind() schema.ObjectKind {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestApplicationV1alpha2ToV1beta1(t *testing.T) {
|
||||
r := require.New(t)
|
||||
expected := &v1beta1.Application{}
|
||||
ApplicationV1alpha2ToV1beta1(&app, expected)
|
||||
|
||||
r.Equal(expected, &v1beta1.Application{
|
||||
Spec: v1beta1.ApplicationSpec{
|
||||
Components: []common.ApplicationComponent{{
|
||||
Name: "test-component",
|
||||
Type: "worker",
|
||||
Properties: &runtime.RawExtension{},
|
||||
Traits: []common.ApplicationTrait{},
|
||||
Scopes: map[string]string{},
|
||||
}},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestConvertTo(t *testing.T) {
|
||||
r := require.New(t)
|
||||
expected := &v1beta1.Application{}
|
||||
err := app.ConvertTo(expected)
|
||||
r.NoError(err)
|
||||
r.Equal(expected, &v1beta1.Application{
|
||||
Spec: v1beta1.ApplicationSpec{
|
||||
Components: []common.ApplicationComponent{{
|
||||
Name: "test-component",
|
||||
Type: "worker",
|
||||
Properties: &runtime.RawExtension{},
|
||||
Traits: []common.ApplicationTrait{},
|
||||
Scopes: map[string]string{},
|
||||
}},
|
||||
},
|
||||
})
|
||||
|
||||
errCase := &errType{}
|
||||
err = app.ConvertTo(errCase)
|
||||
r.Equal(err, fmt.Errorf("unsupported convertTo object *v1alpha2.errType"))
|
||||
}
|
||||
|
||||
func TestConvertFrom(t *testing.T) {
|
||||
r := require.New(t)
|
||||
to := &Application{}
|
||||
from := &v1beta1.Application{
|
||||
Spec: v1beta1.ApplicationSpec{
|
||||
Components: []common.ApplicationComponent{{
|
||||
Name: "test-component",
|
||||
Type: "worker",
|
||||
Properties: &runtime.RawExtension{},
|
||||
Traits: []common.ApplicationTrait{},
|
||||
Scopes: map[string]string{},
|
||||
}},
|
||||
},
|
||||
}
|
||||
err := to.ConvertFrom(from)
|
||||
r.NoError(err)
|
||||
r.Equal(to.Spec, app.Spec)
|
||||
|
||||
errCase := &errType{}
|
||||
err = app.ConvertFrom(errCase)
|
||||
r.Equal(err, fmt.Errorf("unsupported ConvertFrom object *v1alpha2.errType"))
|
||||
}
|
||||
@@ -19,14 +19,8 @@ limitations under the License.
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
)
|
||||
|
||||
// An OperatingSystem required by a containerised workload.
|
||||
@@ -359,53 +353,3 @@ type Container struct {
|
||||
// +optional
|
||||
ImagePullSecret *string `json:"imagePullSecret,omitempty"`
|
||||
}
|
||||
|
||||
// A ContainerizedWorkloadSpec defines the desired state of a
|
||||
// ContainerizedWorkload.
|
||||
type ContainerizedWorkloadSpec struct {
|
||||
// OperatingSystem required by this workload.
|
||||
// +kubebuilder:validation:Enum=linux;windows
|
||||
// +optional
|
||||
OperatingSystem *OperatingSystem `json:"osType,omitempty"`
|
||||
|
||||
// CPUArchitecture required by this workload.
|
||||
// +kubebuilder:validation:Enum=i386;amd64;arm;arm64
|
||||
// +optional
|
||||
CPUArchitecture *CPUArchitecture `json:"arch,omitempty"`
|
||||
|
||||
// Containers of which this workload consists.
|
||||
Containers []Container `json:"containers"`
|
||||
}
|
||||
|
||||
// A ContainerizedWorkloadStatus represents the observed state of a
|
||||
// ContainerizedWorkload.
|
||||
type ContainerizedWorkloadStatus struct {
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
// Resources managed by this containerised workload.
|
||||
Resources []corev1.ObjectReference `json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
var _ oam.Workload = &ContainerizedWorkload{}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// A ContainerizedWorkload is a workload that runs OCI containers.
|
||||
// +kubebuilder:resource:categories={oam}
|
||||
// +kubebuilder:subresource:status
|
||||
type ContainerizedWorkload struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ContainerizedWorkloadSpec `json:"spec,omitempty"`
|
||||
Status ContainerizedWorkloadStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// ContainerizedWorkloadList contains a list of ContainerizedWorkload.
|
||||
type ContainerizedWorkloadList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ContainerizedWorkload `json:"items"`
|
||||
}
|
||||
|
||||
@@ -64,16 +64,6 @@ func (cm *Component) SetConditions(c ...condition.Condition) {
|
||||
cm.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition of this ContainerizedWorkload.
|
||||
func (wl *ContainerizedWorkload) GetCondition(ct condition.ConditionType) condition.Condition {
|
||||
return wl.Status.GetCondition(ct)
|
||||
}
|
||||
|
||||
// SetConditions of this ContainerizedWorkload.
|
||||
func (wl *ContainerizedWorkload) SetConditions(c ...condition.Condition) {
|
||||
wl.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition of this HealthScope.
|
||||
func (hs *HealthScope) GetCondition(ct condition.ConditionType) condition.Condition {
|
||||
return hs.Status.GetCondition(ct)
|
||||
|
||||
@@ -21,11 +21,13 @@ import (
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
)
|
||||
|
||||
// Package type metadata.
|
||||
const (
|
||||
Group = "core.oam.dev"
|
||||
Group = common.Group
|
||||
Version = "v1alpha2"
|
||||
)
|
||||
|
||||
@@ -85,14 +87,6 @@ var (
|
||||
ApplicationConfigurationGroupVersionKind = SchemeGroupVersion.WithKind(ApplicationConfigurationKind)
|
||||
)
|
||||
|
||||
// ContainerizedWorkload type metadata.
|
||||
var (
|
||||
ContainerizedWorkloadKind = reflect.TypeOf(ContainerizedWorkload{}).Name()
|
||||
ContainerizedWorkloadGroupKind = schema.GroupKind{Group: Group, Kind: ContainerizedWorkloadKind}.String()
|
||||
ContainerizedWorkloadKindAPIVersion = ContainerizedWorkloadKind + "." + SchemeGroupVersion.String()
|
||||
ContainerizedWorkloadGroupVersionKind = SchemeGroupVersion.WithKind(ContainerizedWorkloadKind)
|
||||
)
|
||||
|
||||
// ManualScalerTrait type metadata.
|
||||
var (
|
||||
ManualScalerTraitKind = reflect.TypeOf(ManualScalerTrait{}).Name()
|
||||
@@ -117,14 +111,6 @@ var (
|
||||
ApplicationKindVersionKind = SchemeGroupVersion.WithKind(ApplicationKind)
|
||||
)
|
||||
|
||||
// AppRollout type metadata.
|
||||
var (
|
||||
AppRolloutKind = reflect.TypeOf(AppRollout{}).Name()
|
||||
AppRolloutGroupKind = schema.GroupKind{Group: Group, Kind: AppRolloutKind}.String()
|
||||
AppRolloutKindAPIVersion = ApplicationKind + "." + SchemeGroupVersion.String()
|
||||
AppRolloutKindVersionKind = SchemeGroupVersion.WithKind(AppRolloutKind)
|
||||
)
|
||||
|
||||
// ApplicationRevision type metadata
|
||||
var (
|
||||
ApplicationRevisionKind = reflect.TypeOf(ApplicationRevision{}).Name()
|
||||
@@ -140,10 +126,8 @@ func init() {
|
||||
SchemeBuilder.Register(&ScopeDefinition{}, &ScopeDefinitionList{})
|
||||
SchemeBuilder.Register(&Component{}, &ComponentList{})
|
||||
SchemeBuilder.Register(&ApplicationConfiguration{}, &ApplicationConfigurationList{})
|
||||
SchemeBuilder.Register(&ContainerizedWorkload{}, &ContainerizedWorkloadList{})
|
||||
SchemeBuilder.Register(&ManualScalerTrait{}, &ManualScalerTraitList{})
|
||||
SchemeBuilder.Register(&HealthScope{}, &HealthScopeList{})
|
||||
SchemeBuilder.Register(&Application{}, &ApplicationList{})
|
||||
SchemeBuilder.Register(&AppRollout{}, &AppRolloutList{})
|
||||
SchemeBuilder.Register(&ApplicationRevision{}, &ApplicationRevisionList{})
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
@@ -76,107 +77,6 @@ func (in *AppReference) DeepCopy() *AppReference {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRollout) DeepCopyInto(out *AppRollout) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRollout.
|
||||
func (in *AppRollout) DeepCopy() *AppRollout {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRollout)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppRollout) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRolloutList) DeepCopyInto(out *AppRolloutList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]AppRollout, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRolloutList.
|
||||
func (in *AppRolloutList) DeepCopy() *AppRolloutList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRolloutList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppRolloutList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRolloutSpec) DeepCopyInto(out *AppRolloutSpec) {
|
||||
*out = *in
|
||||
if in.ComponentList != nil {
|
||||
in, out := &in.ComponentList, &out.ComponentList
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.RolloutPlan.DeepCopyInto(&out.RolloutPlan)
|
||||
if in.RevertOnDelete != nil {
|
||||
in, out := &in.RevertOnDelete, &out.RevertOnDelete
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRolloutSpec.
|
||||
func (in *AppRolloutSpec) DeepCopy() *AppRolloutSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRolloutSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRolloutStatus) DeepCopyInto(out *AppRolloutStatus) {
|
||||
*out = *in
|
||||
in.RolloutStatus.DeepCopyInto(&out.RolloutStatus)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRolloutStatus.
|
||||
func (in *AppRolloutStatus) DeepCopy() *AppRolloutStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRolloutStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppStatus) DeepCopyInto(out *AppStatus) {
|
||||
*out = *in
|
||||
@@ -600,7 +500,11 @@ func (in *ApplicationSpec) DeepCopy() *ApplicationSpec {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationTrait) DeepCopyInto(out *ApplicationTrait) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationTrait.
|
||||
@@ -1209,118 +1113,6 @@ func (in *ContainerResources) DeepCopy() *ContainerResources {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ContainerizedWorkload) DeepCopyInto(out *ContainerizedWorkload) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerizedWorkload.
|
||||
func (in *ContainerizedWorkload) DeepCopy() *ContainerizedWorkload {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ContainerizedWorkload)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ContainerizedWorkload) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ContainerizedWorkloadList) DeepCopyInto(out *ContainerizedWorkloadList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ContainerizedWorkload, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerizedWorkloadList.
|
||||
func (in *ContainerizedWorkloadList) DeepCopy() *ContainerizedWorkloadList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ContainerizedWorkloadList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ContainerizedWorkloadList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ContainerizedWorkloadSpec) DeepCopyInto(out *ContainerizedWorkloadSpec) {
|
||||
*out = *in
|
||||
if in.OperatingSystem != nil {
|
||||
in, out := &in.OperatingSystem, &out.OperatingSystem
|
||||
*out = new(OperatingSystem)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUArchitecture != nil {
|
||||
in, out := &in.CPUArchitecture, &out.CPUArchitecture
|
||||
*out = new(CPUArchitecture)
|
||||
**out = **in
|
||||
}
|
||||
if in.Containers != nil {
|
||||
in, out := &in.Containers, &out.Containers
|
||||
*out = make([]Container, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerizedWorkloadSpec.
|
||||
func (in *ContainerizedWorkloadSpec) DeepCopy() *ContainerizedWorkloadSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ContainerizedWorkloadSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ContainerizedWorkloadStatus) DeepCopyInto(out *ContainerizedWorkloadStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerizedWorkloadStatus.
|
||||
func (in *ContainerizedWorkloadStatus) DeepCopy() *ContainerizedWorkloadStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ContainerizedWorkloadStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DataInput) DeepCopyInto(out *DataInput) {
|
||||
*out = *in
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
/*
|
||||
Copyright 2021. The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
)
|
||||
|
||||
// AppDeploymentPhase defines the phase that the AppDeployment is undergoing.
|
||||
type AppDeploymentPhase string
|
||||
|
||||
const (
|
||||
// PhaseRolling is the phase when the AppDeployment is rolling live instances from old revisions to new ones.
|
||||
PhaseRolling AppDeploymentPhase = "Rolling"
|
||||
|
||||
// PhaseCompleted is the phase when the AppDeployment is done with reconciliation.
|
||||
PhaseCompleted AppDeploymentPhase = "Completed"
|
||||
|
||||
// PhaseFailed is the phase when the AppDeployment has failed in reconciliation due to unexpected conditions.
|
||||
PhaseFailed AppDeploymentPhase = "Failed"
|
||||
)
|
||||
|
||||
// HTTPMatchRequest specifies a set of criterion to be met in order for the
|
||||
// rule to be applied to the HTTP request. For example, the following
|
||||
// restricts the rule to match only requests where the URL path
|
||||
// starts with /ratings/v2/ and the request contains a custom `end-user` header
|
||||
// with value `jason`.
|
||||
type HTTPMatchRequest struct {
|
||||
// URI defines how to match with an URI.
|
||||
URI *URIMatch `json:"uri,omitempty"`
|
||||
}
|
||||
|
||||
// URIMatch defines the rules to match with an URI.
|
||||
type URIMatch struct {
|
||||
Prefix string `json:"prefix,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPRule defines the rules to match and split http traffic across revisions.
|
||||
type HTTPRule struct {
|
||||
|
||||
// Match defines the conditions to be satisfied for the rule to be
|
||||
// activated. All conditions inside a single match block have AND
|
||||
// semantics, while the list of match blocks have OR semantics. The rule
|
||||
// is matched if any one of the match blocks succeed.
|
||||
Match []*HTTPMatchRequest `json:"match,omitempty"`
|
||||
|
||||
// WeightedTargets defines the revision targets to select and route traffic to.
|
||||
WeightedTargets []WeightedTarget `json:"weightedTargets,omitempty"`
|
||||
}
|
||||
|
||||
// WeightedTarget defines the revision target to select and route traffic to.
|
||||
type WeightedTarget struct {
|
||||
|
||||
// RevisionName is the name of the app revision.
|
||||
RevisionName string `json:"revisionName,omitempty"`
|
||||
|
||||
// ComponentName is the name of the component.
|
||||
// Note that it is the original component name in the Application. No need to append revision.
|
||||
ComponentName string `json:"componentName,omitempty"`
|
||||
|
||||
// Port is the port to route traffic towards.
|
||||
Port int `json:"port,omitempty"`
|
||||
|
||||
// Weight defines the proportion of traffic to be forwarded to the service
|
||||
// version. (0-100). Sum of weights across destinations SHOULD BE == 100.
|
||||
// If there is only one destination in a rule, the weight value is assumed to
|
||||
// be 100.
|
||||
Weight int `json:"weight,omitempty"`
|
||||
}
|
||||
|
||||
// Traffic defines the traffic rules to apply across revisions.
|
||||
type Traffic struct {
|
||||
// Hosts are the destination hosts to which traffic is being sent. Could
|
||||
// be a DNS name with wildcard prefix or an IP address.
|
||||
Hosts []string `json:"hosts,omitempty"`
|
||||
|
||||
// Gateways specifies the names of gateways that should apply these rules.
|
||||
// Gateways in other namespaces may be referred to by
|
||||
// `<gateway namespace>/<gateway name>`; specifying a gateway with no
|
||||
// namespace qualifier is the same as specifying the AppDeployment's namespace.
|
||||
Gateways []string `json:"gateways,omitempty"`
|
||||
|
||||
// HTTP defines the rules to match and split http traffoc across revisions.
|
||||
HTTP []HTTPRule `json:"http,omitempty"`
|
||||
}
|
||||
|
||||
// AppRevision specifies an AppRevision resource to and the rules to apply to it.
|
||||
type AppRevision struct {
|
||||
// RevisionName is the name of the AppRevision.
|
||||
RevisionName string `json:"revisionName,omitempty"`
|
||||
|
||||
// Placement defines the cluster placement rules for an app revision.
|
||||
Placement []common.ClusterPlacement `json:"placement,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterPlacementStatus shows the placement results of a cluster.
|
||||
type ClusterPlacementStatus struct {
|
||||
// ClusterName indicates the name of the cluster to deploy apps to.
|
||||
// If empty, it indicates the host cluster per se.
|
||||
ClusterName string `json:"clusterName,omitempty"`
|
||||
|
||||
// Replicas indicates the replica number of an app revision to deploy to a cluster.
|
||||
Replicas int `json:"replicas,omitempty"`
|
||||
}
|
||||
|
||||
// PlacementStatus shows the cluster placement results of an app revision.
|
||||
type PlacementStatus struct {
|
||||
// RevisionName is the name of the AppRevision.
|
||||
RevisionName string `json:"revisionName,omitempty"`
|
||||
|
||||
// Clusters shows cluster placement results.
|
||||
Clusters []ClusterPlacementStatus `json:"clusters,omitempty"`
|
||||
}
|
||||
|
||||
// AppDeploymentSpec defines how to describe an upgrade between different apps
|
||||
type AppDeploymentSpec struct {
|
||||
|
||||
// Traffic defines the traffic rules to apply across revisions.
|
||||
Traffic *Traffic `json:"traffic,omitempty"`
|
||||
|
||||
// AppRevision specifies AppRevision resources to and the rules to apply to them.
|
||||
AppRevisions []AppRevision `json:"appRevisions,omitempty"`
|
||||
}
|
||||
|
||||
// AppDeploymentStatus defines the observed state of AppDeployment
|
||||
type AppDeploymentStatus struct {
|
||||
// Conditions represents the latest available observations of a CloneSet's current state.
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
// Phase shows the phase that the AppDeployment is undergoing.
|
||||
// If Phase is Rolling, no update should be made to the spec.
|
||||
Phase AppDeploymentPhase `json:"phase,omitempty"`
|
||||
|
||||
// Placement shows the cluster placement results of the app revisions.
|
||||
Placement []PlacementStatus `json:"placement,omitempty"`
|
||||
}
|
||||
|
||||
// AppDeployment is the Schema for the AppDeployment API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:categories={oam},shortName=appdeploy
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppDeployment struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec AppDeploymentSpec `json:"spec,omitempty"`
|
||||
Status AppDeploymentStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// AppDeploymentList contains a list of AppDeployment
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppDeploymentList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []AppDeployment `json:"items"`
|
||||
}
|
||||
@@ -17,12 +17,14 @@
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -44,29 +46,23 @@ type AppPolicy struct {
|
||||
|
||||
Type string `json:"type"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
Properties *runtime.RawExtension `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStep defines how to execute a workflow step.
|
||||
type WorkflowStep struct {
|
||||
// Name is the unique name of the workflow step.
|
||||
Name string `json:"name"`
|
||||
|
||||
Type string `json:"type"`
|
||||
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
|
||||
DependsOn []string `json:"dependsOn,omitempty"`
|
||||
|
||||
Inputs common.StepInputs `json:"inputs,omitempty"`
|
||||
|
||||
Outputs common.StepOutputs `json:"outputs,omitempty"`
|
||||
}
|
||||
type WorkflowStep common.WorkflowStep
|
||||
|
||||
// Workflow defines workflow steps and other attributes
|
||||
type Workflow struct {
|
||||
Steps []WorkflowStep `json:"steps,omitempty"`
|
||||
Ref string `json:"ref,omitempty"`
|
||||
Mode *WorkflowExecuteMode `json:"mode,omitempty"`
|
||||
Steps []WorkflowStep `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowExecuteMode defines the mode of workflow execution
|
||||
type WorkflowExecuteMode struct {
|
||||
Steps common.WorkflowMode `json:"steps,omitempty"`
|
||||
SubSteps common.WorkflowMode `json:"subSteps,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationSpec is the spec of Application
|
||||
@@ -86,11 +82,6 @@ type ApplicationSpec struct {
|
||||
Workflow *Workflow `json:"workflow,omitempty"`
|
||||
|
||||
// TODO(wonderflow): we should have application level scopes supported here
|
||||
|
||||
// RolloutPlan is the details on how to rollout the resources
|
||||
// The controller simply replace the old resources with the new one if there is no rollout plan involved
|
||||
// +optional
|
||||
RolloutPlan *v1alpha1.RolloutPlan `json:"rolloutPlan,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
@@ -98,7 +89,7 @@ type ApplicationSpec struct {
|
||||
// Application is the Schema for the applications API
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:categories={oam},shortName=app
|
||||
// +kubebuilder:resource:categories={oam},shortName={app,velaapp}
|
||||
// +kubebuilder:printcolumn:name="COMPONENT",type=string,JSONPath=`.spec.components[*].name`
|
||||
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.spec.components[*].type`
|
||||
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.status`
|
||||
@@ -144,3 +135,36 @@ func (app *Application) GetComponent(workloadType string) *common.ApplicationCom
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Unstructured convert application to unstructured.Unstructured.
|
||||
func (app *Application) Unstructured() (*unstructured.Unstructured, error) {
|
||||
var obj = &unstructured.Unstructured{}
|
||||
app.SetGroupVersionKind(ApplicationKindVersionKind)
|
||||
bt, err := json.Marshal(app)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := obj.UnmarshalJSON(bt); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if app.Status.Services == nil {
|
||||
if err := unstructured.SetNestedSlice(obj.Object, []interface{}{}, "status", "services"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if app.Status.AppliedResources == nil {
|
||||
if err := unstructured.SetNestedSlice(obj.Object, []interface{}{}, "status", "appliedResources"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if wfStatus := app.Status.Workflow; wfStatus != nil && wfStatus.Steps == nil {
|
||||
if err := unstructured.SetNestedSlice(obj.Object, []interface{}{}, "status", "workflow", "steps"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return obj, nil
|
||||
}
|
||||
|
||||
@@ -17,11 +17,10 @@
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha1"
|
||||
)
|
||||
|
||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
||||
@@ -52,19 +51,23 @@ type ApplicationRevisionSpec struct {
|
||||
// ScopeGVK records the apiVersion to GVK mapping
|
||||
ScopeGVK map[string]metav1.GroupVersionKind `json:"scopeGVK,omitempty"`
|
||||
|
||||
// Components records the rendered components from Application, it will contains the whole K8s CR of workload in it.
|
||||
// +deprecated
|
||||
Components []common.RawComponent `json:"components,omitempty"`
|
||||
// Policies records the external policies
|
||||
Policies map[string]v1alpha1.Policy `json:"policies,omitempty"`
|
||||
|
||||
// ApplicationConfiguration records the rendered applicationConfiguration from Application,
|
||||
// it will contains the whole K8s CR of trait and the reference component in it.
|
||||
// +kubebuilder:validation:EmbeddedResource
|
||||
// Workflow records the external workflow
|
||||
Workflow *v1alpha1.Workflow `json:"workflow,omitempty"`
|
||||
|
||||
// ReferredObjects records the referred objects used in the ref-object typed components
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +deprecated
|
||||
ApplicationConfiguration runtime.RawExtension `json:"applicationConfiguration,omitempty"`
|
||||
ReferredObjects []common.ReferredObject `json:"referredObjects,omitempty"`
|
||||
}
|
||||
|
||||
// ResourcesConfigMap references the ConfigMap that's generated to contain all final rendered resources.
|
||||
ResourcesConfigMap corev1.LocalObjectReference `json:"resourcesConfigMap,omitempty"`
|
||||
// ApplicationRevisionStatus is the status of ApplicationRevision
|
||||
type ApplicationRevisionStatus struct {
|
||||
// Succeeded records if the workflow finished running with success
|
||||
Succeeded bool `json:"succeeded"`
|
||||
// Workflow the running status of the workflow
|
||||
Workflow *common.WorkflowStatus `json:"workflow,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
@@ -72,14 +75,18 @@ type ApplicationRevisionSpec struct {
|
||||
// ApplicationRevision is the Schema for the ApplicationRevision API
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:resource:categories={oam},shortName=apprev
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
// +kubebuilder:printcolumn:name="PUBLISH_VERSION",type=string,JSONPath=`.metadata.annotations['app\.oam\.dev\/publishVersion']`
|
||||
// +kubebuilder:printcolumn:name="SUCCEEDED",type=string,JSONPath=`.status.succeeded`
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type ApplicationRevision struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ApplicationRevisionSpec `json:"spec,omitempty"`
|
||||
Spec ApplicationRevisionSpec `json:"spec,omitempty"`
|
||||
Status ApplicationRevisionStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
Copyright 2021. The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
|
||||
)
|
||||
|
||||
// AppRolloutSpec defines how to describe an upgrade between different apps
|
||||
type AppRolloutSpec struct {
|
||||
// TargetAppRevisionName contains the name of the applicationConfiguration that we need to upgrade to.
|
||||
// Here we use an applicationConfiguration as a revision of an application, thus the name alone is suffice
|
||||
TargetAppRevisionName string `json:"targetAppRevisionName"`
|
||||
|
||||
// SourceAppRevisionName contains the name of the applicationConfiguration that we need to upgrade from.
|
||||
// it can be empty only when it's the first time to deploy the application
|
||||
SourceAppRevisionName string `json:"sourceAppRevisionName,omitempty"`
|
||||
|
||||
// The list of component to upgrade in the application.
|
||||
// We only support single component application so far
|
||||
// TODO: (RZ) Support multiple components in an application
|
||||
// +optional
|
||||
ComponentList []string `json:"componentList,omitempty"`
|
||||
|
||||
// RolloutPlan is the details on how to rollout the resources
|
||||
RolloutPlan v1alpha1.RolloutPlan `json:"rolloutPlan"`
|
||||
|
||||
// RevertOnDelete revert the failed rollout when the rollout CR is deleted
|
||||
// It will revert the change back to the source version at once (not in batches)
|
||||
// Default is false
|
||||
// +optional
|
||||
RevertOnDelete bool `json:"revertOnDelete,omitempty"`
|
||||
}
|
||||
|
||||
// AppRollout is the Schema for the AppRollout API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:categories={oam},shortName=approllout
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="TARGET",type=string,JSONPath=`.status.rolloutTargetSize`
|
||||
// +kubebuilder:printcolumn:name="UPGRADED",type=string,JSONPath=`.status.upgradedReplicas`
|
||||
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=`.status.upgradedReadyReplicas`
|
||||
// +kubebuilder:printcolumn:name="BATCH-STATE",type=string,JSONPath=`.status.batchRollingState`
|
||||
// +kubebuilder:printcolumn:name="ROLLING-STATE",type=string,JSONPath=`.status.rollingState`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppRollout struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec AppRolloutSpec `json:"spec,omitempty"`
|
||||
Status common.AppRolloutStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// AppRolloutList contains a list of AppRollout
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppRolloutList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []AppRollout `json:"items"`
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
||||
|
||||
// ClusterSpec defines the desired state of Cluster
|
||||
type ClusterSpec struct {
|
||||
// KubeconfigSecretRef specifies the reference to the secret
|
||||
// that contains the kubeconfig in field `config`.
|
||||
KubeconfigSecretRef LocalSecretReference `json:"kubeconfigSecretRef,omitempty"`
|
||||
}
|
||||
|
||||
// LocalSecretReference is a reference to a secret within the enclosing
|
||||
// namespace.
|
||||
type LocalSecretReference struct {
|
||||
// Name of a secret within the enclosing namespace.
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// ClusterStatus defines the observed state of Cluster
|
||||
type ClusterStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Cluster is the Schema for the clusters API
|
||||
type Cluster struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ClusterSpec `json:"spec,omitempty"`
|
||||
Status ClusterStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ClusterList contains a list of Cluster
|
||||
type ClusterList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Cluster `json:"items"`
|
||||
}
|
||||
@@ -17,7 +17,6 @@
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
@@ -121,7 +120,7 @@ type TraitDefinitionSpec struct {
|
||||
PodDisruptive bool `json:"podDisruptive,omitempty"`
|
||||
|
||||
// AppliesToWorkloads specifies the list of workload kinds this trait
|
||||
// applies to. Workload kinds are specified in kind.group/version format,
|
||||
// applies to. Workload kinds are specified in resource.group/version format,
|
||||
// e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to
|
||||
// all workload kinds.
|
||||
// +optional
|
||||
@@ -158,6 +157,9 @@ type TraitDefinitionSpec struct {
|
||||
// SkipRevisionAffect defines the update this trait will not generate a new application Revision
|
||||
// +optional
|
||||
SkipRevisionAffect bool `json:"skipRevisionAffect,omitempty"`
|
||||
// ControlPlaneOnly defines which cluster is dispatched to
|
||||
// +optional
|
||||
ControlPlaneOnly bool `json:"controlPlaneOnly,omitempty"`
|
||||
}
|
||||
|
||||
// TraitDefinitionStatus is the status of TraitDefinition
|
||||
@@ -257,32 +259,3 @@ type ScopeDefinitionList struct {
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ScopeDefinition `json:"items"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// An ResourceTracker represents a tracker for track cross namespace resources
|
||||
// +kubebuilder:resource:scope=Cluster,categories={oam},shortName=tracker
|
||||
type ResourceTracker struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Status ResourceTrackerStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceTrackerStatus define the status of resourceTracker
|
||||
type ResourceTrackerStatus struct {
|
||||
TrackedResources []corev1.ObjectReference `json:"trackedResources,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ResourceTrackerList contains a list of ResourceTracker
|
||||
type ResourceTrackerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ResourceTracker `json:"items"`
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
Copyright 2021. The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
)
|
||||
|
||||
// InitializerPhase is a label for the condition of a initializer at the current time
|
||||
type InitializerPhase string
|
||||
|
||||
const (
|
||||
// InitializerCheckingDependsOn means the initializer is checking the status of dependent Initializer
|
||||
InitializerCheckingDependsOn InitializerPhase = "checkingDependsOn"
|
||||
// InitializerInitializing means the initializer is initializing
|
||||
InitializerInitializing InitializerPhase = "initializing"
|
||||
// InitializerSuccess means the initializer successfully initialized the environment
|
||||
InitializerSuccess InitializerPhase = "success"
|
||||
)
|
||||
|
||||
// DependsOn refer to an object which Initializer depends on
|
||||
type DependsOn struct {
|
||||
Ref corev1.ObjectReference `json:"ref"`
|
||||
}
|
||||
|
||||
// A InitializerSpec defines the desired state of a Initializer.
|
||||
type InitializerSpec struct {
|
||||
// AppTemplate indicates the application template to render and deploy an system application.
|
||||
AppTemplate Application `json:"appTemplate"`
|
||||
|
||||
// DependsOn indicates the other initializers that this depends on.
|
||||
// It will not apply its components until all dependencies exist.
|
||||
DependsOn []DependsOn `json:"dependsOn,omitempty"`
|
||||
}
|
||||
|
||||
// InitializerStatus is the status of Initializer
|
||||
type InitializerStatus struct {
|
||||
// ConditionedStatus reflects the observed status of a resource
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
Phase InitializerPhase `json:"status,omitempty"`
|
||||
|
||||
// The generation observed by the Initializer controller.
|
||||
// +optional
|
||||
ObservedGeneration int64 `json:"observedGeneration"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// Initializer is the Schema for the Initializer API
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=init
|
||||
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.status`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type Initializer struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec InitializerSpec `json:"spec,omitempty"`
|
||||
Status InitializerStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// InitializerList contains a list of Initializer.
|
||||
type InitializerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Initializer `json:"items"`
|
||||
}
|
||||
|
||||
// SetConditions set condition for Initializer
|
||||
func (i *Initializer) SetConditions(c ...condition.Condition) {
|
||||
i.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition gets condition from Initializer
|
||||
func (i *Initializer) GetCondition(conditionType condition.ConditionType) condition.Condition {
|
||||
return i.Status.GetCondition(conditionType)
|
||||
}
|
||||
@@ -43,6 +43,9 @@ type PolicyDefinitionStatus struct {
|
||||
// ConditionedStatus reflects the observed status of a resource
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
// ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
|
||||
ConfigMapRef string `json:"configMapRef,omitempty"`
|
||||
|
||||
// LatestRevision of the component definition
|
||||
// +optional
|
||||
LatestRevision *common.Revision `json:"latestRevision,omitempty"`
|
||||
@@ -61,7 +64,7 @@ func (d *PolicyDefinition) GetCondition(conditionType condition.ConditionType) c
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// PolicyDefinition is the Schema for the policydefinitions API
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=policy
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=def-policy
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
|
||||
@@ -21,11 +21,13 @@ import (
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
)
|
||||
|
||||
// Package type metadata.
|
||||
const (
|
||||
Group = "core.oam.dev"
|
||||
Group = common.Group
|
||||
Version = "v1beta1"
|
||||
)
|
||||
|
||||
@@ -96,14 +98,6 @@ var (
|
||||
ApplicationKindVersionKind = SchemeGroupVersion.WithKind(ApplicationKind)
|
||||
)
|
||||
|
||||
// AppRollout type metadata.
|
||||
var (
|
||||
AppRolloutKind = reflect.TypeOf(AppRollout{}).Name()
|
||||
AppRolloutGroupKind = schema.GroupKind{Group: Group, Kind: AppRolloutKind}.String()
|
||||
AppRolloutKindAPIVersion = ApplicationKind + "." + SchemeGroupVersion.String()
|
||||
AppRolloutKindVersionKind = SchemeGroupVersion.WithKind(AppRolloutKind)
|
||||
)
|
||||
|
||||
// ApplicationRevision type metadata
|
||||
var (
|
||||
ApplicationRevisionKind = reflect.TypeOf(ApplicationRevision{}).Name()
|
||||
@@ -128,30 +122,6 @@ var (
|
||||
ResourceTrackerKindVersionKind = SchemeGroupVersion.WithKind(ResourceTrackerKind)
|
||||
)
|
||||
|
||||
// AppDeployment type metadata.
|
||||
var (
|
||||
AppDeploymentKind = reflect.TypeOf(AppDeployment{}).Name()
|
||||
AppDeploymentGroupKind = schema.GroupKind{Group: Group, Kind: AppDeploymentKind}.String()
|
||||
AppDeploymentKindAPIVersion = AppDeploymentKind + "." + SchemeGroupVersion.String()
|
||||
AppDeploymentKindVersionKind = SchemeGroupVersion.WithKind(AppDeploymentKind)
|
||||
)
|
||||
|
||||
// Cluster type metadata.
|
||||
var (
|
||||
ClusterKind = reflect.TypeOf(Cluster{}).Name()
|
||||
ClusterGroupKind = schema.GroupKind{Group: Group, Kind: ClusterKind}.String()
|
||||
ClusterKindAPIVersion = ApplicationKind + "." + SchemeGroupVersion.String()
|
||||
ClusterKindVersionKind = SchemeGroupVersion.WithKind(ClusterKind)
|
||||
)
|
||||
|
||||
// Initializer type metadata.
|
||||
var (
|
||||
InitializerKind = reflect.TypeOf(Initializer{}).Name()
|
||||
InitializerGroupKind = schema.GroupKind{Group: Group, Kind: InitializerKind}.String()
|
||||
InitializerKindAPIVersion = InitializerKind + "." + SchemeGroupVersion.String()
|
||||
InitializerKindVersionKind = SchemeGroupVersion.WithKind(InitializerKind)
|
||||
)
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&ComponentDefinition{}, &ComponentDefinitionList{})
|
||||
SchemeBuilder.Register(&WorkloadDefinition{}, &WorkloadDefinitionList{})
|
||||
@@ -161,12 +131,8 @@ func init() {
|
||||
SchemeBuilder.Register(&DefinitionRevision{}, &DefinitionRevisionList{})
|
||||
SchemeBuilder.Register(&ScopeDefinition{}, &ScopeDefinitionList{})
|
||||
SchemeBuilder.Register(&Application{}, &ApplicationList{})
|
||||
SchemeBuilder.Register(&AppRollout{}, &AppRolloutList{})
|
||||
SchemeBuilder.Register(&ApplicationRevision{}, &ApplicationRevisionList{})
|
||||
SchemeBuilder.Register(&AppDeployment{}, &AppDeploymentList{})
|
||||
SchemeBuilder.Register(&Cluster{}, &ClusterList{})
|
||||
SchemeBuilder.Register(&ResourceTracker{}, &ResourceTrackerList{})
|
||||
SchemeBuilder.Register(&Initializer{}, &InitializerList{})
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
|
||||
300
apis/core.oam.dev/v1beta1/resourcetracker_types.go
Normal file
300
apis/core.oam.dev/v1beta1/resourcetracker_types.go
Normal file
@@ -0,0 +1,300 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
errors2 "github.com/pkg/errors"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/interfaces"
|
||||
velatypes "github.com/oam-dev/kubevela/apis/types"
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
"github.com/oam-dev/kubevela/pkg/utils/errors"
|
||||
)
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// An ResourceTracker represents a tracker for track cross namespace resources
|
||||
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.spec.type`
|
||||
// +kubebuilder:printcolumn:name="APP",type=string,JSONPath=`.metadata.labels['app\.oam\.dev\/name']`
|
||||
// +kubebuilder:printcolumn:name="APP-NS",type=string,JSONPath=`.metadata.labels['app\.oam\.dev\/namespace']`
|
||||
// +kubebuilder:printcolumn:name="APP-GEN",type=number,JSONPath=`.spec.applicationGeneration`
|
||||
// +kubebuilder:resource:scope=Cluster,categories={oam},shortName=rt
|
||||
type ResourceTracker struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ResourceTrackerSpec `json:"spec,omitempty"`
|
||||
Status ResourceTrackerStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceTrackerType defines the type of resourceTracker
|
||||
type ResourceTrackerType string
|
||||
|
||||
const (
|
||||
// ResourceTrackerTypeRoot means resources in this resourceTracker will only be recycled when application is deleted
|
||||
ResourceTrackerTypeRoot = ResourceTrackerType("root")
|
||||
// ResourceTrackerTypeVersioned means resources in this resourceTracker will be recycled when this version is unused and this resource is not managed by latest RT
|
||||
ResourceTrackerTypeVersioned = ResourceTrackerType("versioned")
|
||||
// ResourceTrackerTypeComponentRevision stores all component revisions used
|
||||
ResourceTrackerTypeComponentRevision = ResourceTrackerType("component-revision")
|
||||
)
|
||||
|
||||
// ResourceTrackerSpec define the spec of resourceTracker
|
||||
type ResourceTrackerSpec struct {
|
||||
Type ResourceTrackerType `json:"type,omitempty"`
|
||||
ApplicationGeneration int64 `json:"applicationGeneration"`
|
||||
ManagedResources []ManagedResource `json:"managedResources,omitempty"`
|
||||
}
|
||||
|
||||
// ManagedResource define the resource to be managed by ResourceTracker
|
||||
type ManagedResource struct {
|
||||
common.ClusterObjectReference `json:",inline"`
|
||||
common.OAMObjectReference `json:",inline"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Data *runtime.RawExtension `json:"raw,omitempty"`
|
||||
// Deleted marks the resource to be deleted
|
||||
Deleted bool `json:"deleted,omitempty"`
|
||||
// SkipGC marks the resource to skip gc
|
||||
SkipGC bool `json:"skipGC,omitempty"`
|
||||
}
|
||||
|
||||
// Equal check if two managed resource equals
|
||||
func (in ManagedResource) Equal(r ManagedResource) bool {
|
||||
if !in.ClusterObjectReference.Equal(r.ClusterObjectReference) {
|
||||
return false
|
||||
}
|
||||
if !in.OAMObjectReference.Equal(r.OAMObjectReference) {
|
||||
return false
|
||||
}
|
||||
return reflect.DeepEqual(in.Data, r.Data)
|
||||
}
|
||||
|
||||
// DisplayName readable name for locating resource
|
||||
func (in ManagedResource) DisplayName() string {
|
||||
s := in.Kind + " " + in.Name
|
||||
if in.Namespace != "" || in.Cluster != "" {
|
||||
s += " ("
|
||||
if in.Cluster != "" {
|
||||
s += "Cluster: " + in.Cluster
|
||||
if in.Namespace != "" {
|
||||
s += ", "
|
||||
}
|
||||
}
|
||||
if in.Namespace != "" {
|
||||
s += "Namespace: " + in.Namespace
|
||||
}
|
||||
s += ")"
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// NamespacedName namespacedName
|
||||
func (in ManagedResource) NamespacedName() types.NamespacedName {
|
||||
return types.NamespacedName{Namespace: in.Namespace, Name: in.Name}
|
||||
}
|
||||
|
||||
// ResourceKey computes the key for managed resource, resources with the same key points to the same resource
|
||||
func (in ManagedResource) ResourceKey() string {
|
||||
group := in.GroupVersionKind().Group
|
||||
kind := in.GroupVersionKind().Kind
|
||||
cluster := in.Cluster
|
||||
if cluster == "" {
|
||||
cluster = velatypes.ClusterLocalName
|
||||
}
|
||||
return strings.Join([]string{group, kind, cluster, in.Namespace, in.Name}, "/")
|
||||
}
|
||||
|
||||
// ComponentKey computes the key for the component which managed resource belongs to
|
||||
func (in ManagedResource) ComponentKey() string {
|
||||
return strings.Join([]string{in.Env, in.Component}, "/")
|
||||
}
|
||||
|
||||
// UnmarshalTo unmarshal ManagedResource into target object
|
||||
func (in ManagedResource) UnmarshalTo(obj interface{}) error {
|
||||
if in.Data == nil || in.Data.Raw == nil {
|
||||
return errors.ManagedResourceHasNoDataError{}
|
||||
}
|
||||
return json.Unmarshal(in.Data.Raw, obj)
|
||||
}
|
||||
|
||||
// ToUnstructured converts managed resource into unstructured
|
||||
func (in ManagedResource) ToUnstructured() *unstructured.Unstructured {
|
||||
obj := &unstructured.Unstructured{}
|
||||
obj.SetGroupVersionKind(in.GroupVersionKind())
|
||||
obj.SetName(in.Name)
|
||||
if in.Namespace != "" {
|
||||
obj.SetNamespace(in.Namespace)
|
||||
}
|
||||
oam.SetCluster(obj, in.Cluster)
|
||||
return obj
|
||||
}
|
||||
|
||||
// ToUnstructuredWithData converts managed resource into unstructured and unmarshal data
|
||||
func (in ManagedResource) ToUnstructuredWithData() (*unstructured.Unstructured, error) {
|
||||
obj := in.ToUnstructured()
|
||||
if err := in.UnmarshalTo(obj); err != nil {
|
||||
if errors2.Is(err, errors.ManagedResourceHasNoDataError{}) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return obj, nil
|
||||
}
|
||||
|
||||
// ResourceTrackerStatus define the status of resourceTracker
|
||||
// For backward-compatibility
|
||||
type ResourceTrackerStatus struct {
|
||||
// Deprecated
|
||||
TrackedResources []common.ClusterObjectReference `json:"trackedResources,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ResourceTrackerList contains a list of ResourceTracker
|
||||
type ResourceTrackerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ResourceTracker `json:"items"`
|
||||
}
|
||||
|
||||
func (in *ResourceTracker) findMangedResourceIndex(mr ManagedResource) int {
|
||||
for i, _mr := range in.Spec.ManagedResources {
|
||||
if mr.ClusterObjectReference.Equal(_mr.ClusterObjectReference) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func newManagedResourceFromResource(rsc client.Object) ManagedResource {
|
||||
gvk := rsc.GetObjectKind().GroupVersionKind()
|
||||
return ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{
|
||||
ObjectReference: v1.ObjectReference{
|
||||
APIVersion: gvk.GroupVersion().String(),
|
||||
Kind: gvk.Kind,
|
||||
Name: rsc.GetName(),
|
||||
Namespace: rsc.GetNamespace(),
|
||||
},
|
||||
Cluster: oam.GetCluster(rsc),
|
||||
},
|
||||
OAMObjectReference: common.NewOAMObjectReferenceFromObject(rsc),
|
||||
Deleted: false,
|
||||
}
|
||||
}
|
||||
|
||||
// ContainsManagedResource check if resource exists in ResourceTracker
|
||||
func (in *ResourceTracker) ContainsManagedResource(rsc client.Object) bool {
|
||||
mr := newManagedResourceFromResource(rsc)
|
||||
return in.findMangedResourceIndex(mr) >= 0
|
||||
}
|
||||
|
||||
// AddManagedResource add object to managed resources, if exists, update
|
||||
func (in *ResourceTracker) AddManagedResource(rsc client.Object, metaOnly bool, skipGC bool, creator common.ResourceCreatorRole) (updated bool) {
|
||||
mr := newManagedResourceFromResource(rsc)
|
||||
mr.SkipGC = skipGC
|
||||
if !metaOnly {
|
||||
mr.Data = &runtime.RawExtension{Object: rsc}
|
||||
}
|
||||
if creator != "" {
|
||||
mr.ClusterObjectReference.Creator = creator
|
||||
}
|
||||
if idx := in.findMangedResourceIndex(mr); idx >= 0 {
|
||||
if reflect.DeepEqual(in.Spec.ManagedResources[idx], mr) {
|
||||
return false
|
||||
}
|
||||
in.Spec.ManagedResources[idx] = mr
|
||||
} else {
|
||||
in.Spec.ManagedResources = append(in.Spec.ManagedResources, mr)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// DeleteManagedResource if remove flag is on, it will remove the object from recorded resources.
|
||||
// otherwise, it will mark the object as deleted instead of removing it
|
||||
// workflow stage: resources are marked as deleted (and execute the deletion action)
|
||||
// state-keep stage: resources marked as deleted and successfully deleted will be removed from resourcetracker
|
||||
func (in *ResourceTracker) DeleteManagedResource(rsc client.Object, remove bool) (updated bool) {
|
||||
gvk := rsc.GetObjectKind().GroupVersionKind()
|
||||
mr := ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{
|
||||
ObjectReference: v1.ObjectReference{
|
||||
APIVersion: gvk.GroupVersion().String(),
|
||||
Kind: gvk.Kind,
|
||||
Name: rsc.GetName(),
|
||||
Namespace: rsc.GetNamespace(),
|
||||
},
|
||||
Cluster: oam.GetCluster(rsc),
|
||||
},
|
||||
Deleted: true,
|
||||
}
|
||||
if idx := in.findMangedResourceIndex(mr); idx >= 0 {
|
||||
if remove {
|
||||
in.Spec.ManagedResources = append(in.Spec.ManagedResources[:idx], in.Spec.ManagedResources[idx+1:]...)
|
||||
} else {
|
||||
if reflect.DeepEqual(in.Spec.ManagedResources[idx], mr) {
|
||||
return false
|
||||
}
|
||||
in.Spec.ManagedResources[idx] = mr
|
||||
}
|
||||
} else {
|
||||
if !remove {
|
||||
in.Spec.ManagedResources = append(in.Spec.ManagedResources, mr)
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// addClusterObjectReference
|
||||
// Deprecated
|
||||
func (in *ResourceTracker) addClusterObjectReference(ref common.ClusterObjectReference) bool {
|
||||
for _, _rsc := range in.Status.TrackedResources {
|
||||
if _rsc.Equal(ref) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
in.Status.TrackedResources = append(in.Status.TrackedResources, ref)
|
||||
return false
|
||||
}
|
||||
|
||||
// AddTrackedResource add new object reference into tracked resources, return if already exists
|
||||
// Deprecated
|
||||
func (in *ResourceTracker) AddTrackedResource(rsc interfaces.TrackableResource) bool {
|
||||
return in.addClusterObjectReference(common.ClusterObjectReference{
|
||||
ObjectReference: v1.ObjectReference{
|
||||
APIVersion: rsc.GetAPIVersion(),
|
||||
Kind: rsc.GetKind(),
|
||||
Name: rsc.GetName(),
|
||||
Namespace: rsc.GetNamespace(),
|
||||
UID: rsc.GetUID(),
|
||||
},
|
||||
})
|
||||
}
|
||||
184
apis/core.oam.dev/v1beta1/resourcetracker_types_test.go
Normal file
184
apis/core.oam.dev/v1beta1/resourcetracker_types_test.go
Normal file
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
v12 "k8s.io/api/apps/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
v13 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/utils/pointer"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
"github.com/oam-dev/kubevela/pkg/utils/errors"
|
||||
)
|
||||
|
||||
func TestManagedResource_DeepCopyEqual(t *testing.T) {
|
||||
r := require.New(t)
|
||||
mr := ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{Cluster: "cluster"},
|
||||
OAMObjectReference: common.OAMObjectReference{Component: "component"},
|
||||
Data: &runtime.RawExtension{Raw: []byte("data")},
|
||||
}
|
||||
r.True(mr.Equal(*mr.DeepCopy()))
|
||||
}
|
||||
|
||||
func TestManagedResource_Equal(t *testing.T) {
|
||||
testCases := map[string]struct {
|
||||
input1 ManagedResource
|
||||
input2 ManagedResource
|
||||
equal bool
|
||||
}{
|
||||
"equal": {
|
||||
input1: ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{Cluster: "cluster"},
|
||||
OAMObjectReference: common.OAMObjectReference{Component: "component"},
|
||||
Data: &runtime.RawExtension{Raw: []byte("data")},
|
||||
},
|
||||
input2: ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{Cluster: "cluster"},
|
||||
OAMObjectReference: common.OAMObjectReference{Component: "component"},
|
||||
Data: &runtime.RawExtension{Raw: []byte("data")},
|
||||
},
|
||||
equal: true,
|
||||
},
|
||||
"ClusterObjectReference not equal": {
|
||||
input1: ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{Cluster: "cluster"},
|
||||
},
|
||||
input2: ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{Cluster: "c"},
|
||||
},
|
||||
equal: false,
|
||||
},
|
||||
"OAMObjectReference not equal": {
|
||||
input1: ManagedResource{
|
||||
OAMObjectReference: common.OAMObjectReference{Component: "component"},
|
||||
},
|
||||
input2: ManagedResource{
|
||||
OAMObjectReference: common.OAMObjectReference{Component: "c"},
|
||||
},
|
||||
equal: false,
|
||||
},
|
||||
"Data content not equal": {
|
||||
input1: ManagedResource{
|
||||
Data: &runtime.RawExtension{Raw: []byte("data")},
|
||||
},
|
||||
input2: ManagedResource{
|
||||
Data: &runtime.RawExtension{Raw: []byte("d")},
|
||||
},
|
||||
equal: false,
|
||||
},
|
||||
"one data empty, one data not empty": {
|
||||
input1: ManagedResource{Data: nil},
|
||||
input2: ManagedResource{
|
||||
Data: &runtime.RawExtension{Raw: []byte("d")},
|
||||
},
|
||||
equal: false,
|
||||
},
|
||||
}
|
||||
for name, tc := range testCases {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
r := require.New(t)
|
||||
r.Equal(tc.equal, tc.input1.Equal(tc.input2))
|
||||
r.Equal(tc.equal, tc.input2.Equal(tc.input1))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestManagedResourceKeys(t *testing.T) {
|
||||
r := require.New(t)
|
||||
input := ManagedResource{
|
||||
ClusterObjectReference: common.ClusterObjectReference{
|
||||
Cluster: "cluster",
|
||||
ObjectReference: v1.ObjectReference{
|
||||
Namespace: "namespace",
|
||||
Name: "name",
|
||||
APIVersion: v12.SchemeGroupVersion.String(),
|
||||
Kind: "Deployment",
|
||||
},
|
||||
},
|
||||
OAMObjectReference: common.OAMObjectReference{
|
||||
Env: "env",
|
||||
Component: "component",
|
||||
Trait: "trait",
|
||||
},
|
||||
}
|
||||
r.Equal("namespace/name", input.NamespacedName().String())
|
||||
r.Equal("apps/Deployment/cluster/namespace/name", input.ResourceKey())
|
||||
r.Equal("env/component", input.ComponentKey())
|
||||
r.Equal("Deployment name (Cluster: cluster, Namespace: namespace)", input.DisplayName())
|
||||
var deploy1, deploy2 v12.Deployment
|
||||
deploy1.Spec.Replicas = pointer.Int32(5)
|
||||
bs, err := json.Marshal(deploy1)
|
||||
r.NoError(err)
|
||||
r.ErrorIs(input.UnmarshalTo(&deploy2), errors.ManagedResourceHasNoDataError{})
|
||||
_, err = input.ToUnstructuredWithData()
|
||||
r.ErrorIs(err, errors.ManagedResourceHasNoDataError{})
|
||||
input.Data = &runtime.RawExtension{Raw: bs}
|
||||
r.NoError(input.UnmarshalTo(&deploy2))
|
||||
r.Equal(deploy1, deploy2)
|
||||
obj := input.ToUnstructured()
|
||||
r.Equal("Deployment", obj.GetKind())
|
||||
r.Equal("apps/v1", obj.GetAPIVersion())
|
||||
r.Equal("name", obj.GetName())
|
||||
r.Equal("namespace", obj.GetNamespace())
|
||||
r.Equal("cluster", oam.GetCluster(obj))
|
||||
obj, err = input.ToUnstructuredWithData()
|
||||
r.NoError(err)
|
||||
val, correct, err := unstructured.NestedInt64(obj.Object, "spec", "replicas")
|
||||
r.NoError(err)
|
||||
r.True(correct)
|
||||
r.Equal(int64(5), val)
|
||||
}
|
||||
|
||||
func TestResourceTracker_ManagedResource(t *testing.T) {
|
||||
r := require.New(t)
|
||||
input := &ResourceTracker{}
|
||||
deploy1 := v12.Deployment{ObjectMeta: v13.ObjectMeta{Name: "deploy1"}}
|
||||
input.AddManagedResource(&deploy1, true, false, "")
|
||||
r.Equal(1, len(input.Spec.ManagedResources))
|
||||
cm2 := v1.ConfigMap{ObjectMeta: v13.ObjectMeta{Name: "cm2"}}
|
||||
input.AddManagedResource(&cm2, false, false, "")
|
||||
r.Equal(2, len(input.Spec.ManagedResources))
|
||||
pod3 := v1.Pod{ObjectMeta: v13.ObjectMeta{Name: "pod3"}}
|
||||
input.AddManagedResource(&pod3, false, false, "")
|
||||
r.Equal(3, len(input.Spec.ManagedResources))
|
||||
deploy1.Spec.Replicas = pointer.Int32(5)
|
||||
input.AddManagedResource(&deploy1, false, false, "")
|
||||
r.Equal(3, len(input.Spec.ManagedResources))
|
||||
input.DeleteManagedResource(&cm2, false)
|
||||
r.Equal(3, len(input.Spec.ManagedResources))
|
||||
r.True(input.Spec.ManagedResources[1].Deleted)
|
||||
input.DeleteManagedResource(&cm2, true)
|
||||
r.Equal(2, len(input.Spec.ManagedResources))
|
||||
input.DeleteManagedResource(&deploy1, true)
|
||||
r.Equal(1, len(input.Spec.ManagedResources))
|
||||
input.DeleteManagedResource(&pod3, true)
|
||||
r.Equal(0, len(input.Spec.ManagedResources))
|
||||
secret4 := v1.Secret{ObjectMeta: v13.ObjectMeta{Name: "secret4"}}
|
||||
input.DeleteManagedResource(&secret4, true)
|
||||
r.Equal(0, len(input.Spec.ManagedResources))
|
||||
input.DeleteManagedResource(&secret4, false)
|
||||
r.Equal(1, len(input.Spec.ManagedResources))
|
||||
}
|
||||
@@ -38,7 +38,8 @@ type WorkflowStepDefinitionSpec struct {
|
||||
type WorkflowStepDefinitionStatus struct {
|
||||
// ConditionedStatus reflects the observed status of a resource
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
// ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
|
||||
ConfigMapRef string `json:"configMapRef,omitempty"`
|
||||
// LatestRevision of the component definition
|
||||
// +optional
|
||||
LatestRevision *common.Revision `json:"latestRevision,omitempty"`
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
@@ -21,127 +22,21 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha1"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppDeployment) DeepCopyInto(out *AppDeployment) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppDeployment.
|
||||
func (in *AppDeployment) DeepCopy() *AppDeployment {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppDeployment)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppDeployment) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppDeploymentList) DeepCopyInto(out *AppDeploymentList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]AppDeployment, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppDeploymentList.
|
||||
func (in *AppDeploymentList) DeepCopy() *AppDeploymentList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppDeploymentList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppDeploymentList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppDeploymentSpec) DeepCopyInto(out *AppDeploymentSpec) {
|
||||
*out = *in
|
||||
if in.Traffic != nil {
|
||||
in, out := &in.Traffic, &out.Traffic
|
||||
*out = new(Traffic)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.AppRevisions != nil {
|
||||
in, out := &in.AppRevisions, &out.AppRevisions
|
||||
*out = make([]AppRevision, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppDeploymentSpec.
|
||||
func (in *AppDeploymentSpec) DeepCopy() *AppDeploymentSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppDeploymentSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppDeploymentStatus) DeepCopyInto(out *AppDeploymentStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
if in.Placement != nil {
|
||||
in, out := &in.Placement, &out.Placement
|
||||
*out = make([]PlacementStatus, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppDeploymentStatus.
|
||||
func (in *AppDeploymentStatus) DeepCopy() *AppDeploymentStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppDeploymentStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppPolicy) DeepCopyInto(out *AppPolicy) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppPolicy.
|
||||
@@ -154,108 +49,6 @@ func (in *AppPolicy) DeepCopy() *AppPolicy {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRevision) DeepCopyInto(out *AppRevision) {
|
||||
*out = *in
|
||||
if in.Placement != nil {
|
||||
in, out := &in.Placement, &out.Placement
|
||||
*out = make([]common.ClusterPlacement, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRevision.
|
||||
func (in *AppRevision) DeepCopy() *AppRevision {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRevision)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRollout) DeepCopyInto(out *AppRollout) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRollout.
|
||||
func (in *AppRollout) DeepCopy() *AppRollout {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRollout)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppRollout) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRolloutList) DeepCopyInto(out *AppRolloutList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]AppRollout, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRolloutList.
|
||||
func (in *AppRolloutList) DeepCopy() *AppRolloutList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRolloutList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppRolloutList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppRolloutSpec) DeepCopyInto(out *AppRolloutSpec) {
|
||||
*out = *in
|
||||
if in.ComponentList != nil {
|
||||
in, out := &in.ComponentList, &out.ComponentList
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.RolloutPlan.DeepCopyInto(&out.RolloutPlan)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRolloutSpec.
|
||||
func (in *AppRolloutSpec) DeepCopy() *AppRolloutSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppRolloutSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Application) DeepCopyInto(out *Application) {
|
||||
*out = *in
|
||||
@@ -321,6 +114,7 @@ func (in *ApplicationRevision) DeepCopyInto(out *ApplicationRevision) {
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationRevision.
|
||||
@@ -426,15 +220,25 @@ func (in *ApplicationRevisionSpec) DeepCopyInto(out *ApplicationRevisionSpec) {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Components != nil {
|
||||
in, out := &in.Components, &out.Components
|
||||
*out = make([]common.RawComponent, len(*in))
|
||||
if in.Policies != nil {
|
||||
in, out := &in.Policies, &out.Policies
|
||||
*out = make(map[string]v1alpha1.Policy, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Workflow != nil {
|
||||
in, out := &in.Workflow, &out.Workflow
|
||||
*out = new(v1alpha1.Workflow)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ReferredObjects != nil {
|
||||
in, out := &in.ReferredObjects, &out.ReferredObjects
|
||||
*out = make([]common.ReferredObject, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
in.ApplicationConfiguration.DeepCopyInto(&out.ApplicationConfiguration)
|
||||
out.ResourcesConfigMap = in.ResourcesConfigMap
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationRevisionSpec.
|
||||
@@ -447,6 +251,26 @@ func (in *ApplicationRevisionSpec) DeepCopy() *ApplicationRevisionSpec {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationRevisionStatus) DeepCopyInto(out *ApplicationRevisionStatus) {
|
||||
*out = *in
|
||||
if in.Workflow != nil {
|
||||
in, out := &in.Workflow, &out.Workflow
|
||||
*out = new(common.WorkflowStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationRevisionStatus.
|
||||
func (in *ApplicationRevisionStatus) DeepCopy() *ApplicationRevisionStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ApplicationRevisionStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec) {
|
||||
*out = *in
|
||||
@@ -469,11 +293,6 @@ func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec) {
|
||||
*out = new(Workflow)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.RolloutPlan != nil {
|
||||
in, out := &in.RolloutPlan, &out.RolloutPlan
|
||||
*out = new(v1alpha1.RolloutPlan)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.
|
||||
@@ -486,111 +305,6 @@ func (in *ApplicationSpec) DeepCopy() *ApplicationSpec {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Cluster) DeepCopyInto(out *Cluster) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
out.Status = in.Status
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
|
||||
func (in *Cluster) DeepCopy() *Cluster {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Cluster)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Cluster) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterList) DeepCopyInto(out *ClusterList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Cluster, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
|
||||
func (in *ClusterList) DeepCopy() *ClusterList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterPlacementStatus) DeepCopyInto(out *ClusterPlacementStatus) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPlacementStatus.
|
||||
func (in *ClusterPlacementStatus) DeepCopy() *ClusterPlacementStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterPlacementStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||
*out = *in
|
||||
out.KubeconfigSecretRef = in.KubeconfigSecretRef
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
|
||||
func (in *ClusterSpec) DeepCopy() *ClusterSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
|
||||
func (in *ClusterStatus) DeepCopy() *ClusterStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ComponentDefinition) DeepCopyInto(out *ComponentDefinition) {
|
||||
*out = *in
|
||||
@@ -787,199 +501,23 @@ func (in *DefinitionRevisionSpec) DeepCopy() *DefinitionRevisionSpec {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DependsOn) DeepCopyInto(out *DependsOn) {
|
||||
func (in *ManagedResource) DeepCopyInto(out *ManagedResource) {
|
||||
*out = *in
|
||||
out.Ref = in.Ref
|
||||
out.ClusterObjectReference = in.ClusterObjectReference
|
||||
out.OAMObjectReference = in.OAMObjectReference
|
||||
if in.Data != nil {
|
||||
in, out := &in.Data, &out.Data
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependsOn.
|
||||
func (in *DependsOn) DeepCopy() *DependsOn {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedResource.
|
||||
func (in *ManagedResource) DeepCopy() *ManagedResource {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DependsOn)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HTTPMatchRequest) DeepCopyInto(out *HTTPMatchRequest) {
|
||||
*out = *in
|
||||
if in.URI != nil {
|
||||
in, out := &in.URI, &out.URI
|
||||
*out = new(URIMatch)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPMatchRequest.
|
||||
func (in *HTTPMatchRequest) DeepCopy() *HTTPMatchRequest {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(HTTPMatchRequest)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HTTPRule) DeepCopyInto(out *HTTPRule) {
|
||||
*out = *in
|
||||
if in.Match != nil {
|
||||
in, out := &in.Match, &out.Match
|
||||
*out = make([]*HTTPMatchRequest, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(HTTPMatchRequest)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
}
|
||||
if in.WeightedTargets != nil {
|
||||
in, out := &in.WeightedTargets, &out.WeightedTargets
|
||||
*out = make([]WeightedTarget, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRule.
|
||||
func (in *HTTPRule) DeepCopy() *HTTPRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(HTTPRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Initializer) DeepCopyInto(out *Initializer) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializer.
|
||||
func (in *Initializer) DeepCopy() *Initializer {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Initializer)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Initializer) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *InitializerList) DeepCopyInto(out *InitializerList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Initializer, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerList.
|
||||
func (in *InitializerList) DeepCopy() *InitializerList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(InitializerList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *InitializerList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *InitializerSpec) DeepCopyInto(out *InitializerSpec) {
|
||||
*out = *in
|
||||
in.AppTemplate.DeepCopyInto(&out.AppTemplate)
|
||||
if in.DependsOn != nil {
|
||||
in, out := &in.DependsOn, &out.DependsOn
|
||||
*out = make([]DependsOn, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerSpec.
|
||||
func (in *InitializerSpec) DeepCopy() *InitializerSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(InitializerSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *InitializerStatus) DeepCopyInto(out *InitializerStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerStatus.
|
||||
func (in *InitializerStatus) DeepCopy() *InitializerStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(InitializerStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecretReference.
|
||||
func (in *LocalSecretReference) DeepCopy() *LocalSecretReference {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(LocalSecretReference)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PlacementStatus) DeepCopyInto(out *PlacementStatus) {
|
||||
*out = *in
|
||||
if in.Clusters != nil {
|
||||
in, out := &in.Clusters, &out.Clusters
|
||||
*out = make([]ClusterPlacementStatus, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementStatus.
|
||||
func (in *PlacementStatus) DeepCopy() *PlacementStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PlacementStatus)
|
||||
out := new(ManagedResource)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
@@ -1090,6 +628,7 @@ func (in *ResourceTracker) DeepCopyInto(out *ResourceTracker) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
@@ -1143,12 +682,34 @@ func (in *ResourceTrackerList) DeepCopyObject() runtime.Object {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceTrackerSpec) DeepCopyInto(out *ResourceTrackerSpec) {
|
||||
*out = *in
|
||||
if in.ManagedResources != nil {
|
||||
in, out := &in.ManagedResources, &out.ManagedResources
|
||||
*out = make([]ManagedResource, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTrackerSpec.
|
||||
func (in *ResourceTrackerSpec) DeepCopy() *ResourceTrackerSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceTrackerSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceTrackerStatus) DeepCopyInto(out *ResourceTrackerStatus) {
|
||||
*out = *in
|
||||
if in.TrackedResources != nil {
|
||||
in, out := &in.TrackedResources, &out.TrackedResources
|
||||
*out = make([]corev1.ObjectReference, len(*in))
|
||||
*out = make([]common.ClusterObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
@@ -1242,38 +803,6 @@ func (in *ScopeDefinitionSpec) DeepCopy() *ScopeDefinitionSpec {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Traffic) DeepCopyInto(out *Traffic) {
|
||||
*out = *in
|
||||
if in.Hosts != nil {
|
||||
in, out := &in.Hosts, &out.Hosts
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Gateways != nil {
|
||||
in, out := &in.Gateways, &out.Gateways
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.HTTP != nil {
|
||||
in, out := &in.HTTP, &out.HTTP
|
||||
*out = make([]HTTPRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Traffic.
|
||||
func (in *Traffic) DeepCopy() *Traffic {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Traffic)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TraitDefinition) DeepCopyInto(out *TraitDefinition) {
|
||||
*out = *in
|
||||
@@ -1395,39 +924,14 @@ func (in *TraitDefinitionStatus) DeepCopy() *TraitDefinitionStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *URIMatch) DeepCopyInto(out *URIMatch) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new URIMatch.
|
||||
func (in *URIMatch) DeepCopy() *URIMatch {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(URIMatch)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WeightedTarget) DeepCopyInto(out *WeightedTarget) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightedTarget.
|
||||
func (in *WeightedTarget) DeepCopy() *WeightedTarget {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WeightedTarget)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Workflow) DeepCopyInto(out *Workflow) {
|
||||
*out = *in
|
||||
if in.Mode != nil {
|
||||
in, out := &in.Mode, &out.Mode
|
||||
*out = new(WorkflowExecuteMode)
|
||||
**out = **in
|
||||
}
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowStep, len(*in))
|
||||
@@ -1447,10 +951,41 @@ func (in *Workflow) DeepCopy() *Workflow {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowExecuteMode) DeepCopyInto(out *WorkflowExecuteMode) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowExecuteMode.
|
||||
func (in *WorkflowExecuteMode) DeepCopy() *WorkflowExecuteMode {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowExecuteMode)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.Meta != nil {
|
||||
in, out := &in.Meta, &out.Meta
|
||||
*out = new(common.WorkflowStepMeta)
|
||||
**out = **in
|
||||
}
|
||||
if in.Properties != nil {
|
||||
in, out := &in.Properties, &out.Properties
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.SubSteps != nil {
|
||||
in, out := &in.SubSteps, &out.SubSteps
|
||||
*out = make([]common.WorkflowSubStep, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.DependsOn != nil {
|
||||
in, out := &in.DependsOn, &out.DependsOn
|
||||
*out = make([]string, len(*in))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build generate
|
||||
// +build generate
|
||||
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -14,25 +14,22 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package controllers_test
|
||||
package interfaces
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha2"
|
||||
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
)
|
||||
|
||||
var verifyComponentCreated = func(testcase, namespace, compName string) {
|
||||
|
||||
Eventually(
|
||||
func() error {
|
||||
comp := v1alpha2.Component{}
|
||||
return k8sClient.Get(context.TODO(), client.ObjectKey{Namespace: namespace, Name: compName}, &comp)
|
||||
},
|
||||
time.Second*3, 30*time.Millisecond).Should(BeNil(), "check component created fail for test "+testcase)
|
||||
// ObjectOwner is the interface for get and set ownerReference
|
||||
type ObjectOwner interface {
|
||||
GetOwnerReferences() []metav1.OwnerReference
|
||||
SetOwnerReferences([]metav1.OwnerReference)
|
||||
}
|
||||
|
||||
// TrackableResource is the interface for resources to be tracked by resourcetracker
|
||||
type TrackableResource interface {
|
||||
client.Object
|
||||
metav1.Type
|
||||
ObjectOwner
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
|
||||
@@ -19,12 +19,11 @@ package types
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"cuelang.org/go/cue"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
|
||||
"cuelang.org/go/cue"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// Source record the source of Capability
|
||||
@@ -79,6 +78,10 @@ const CapabilityConfigMapNamePrefix = "schema-"
|
||||
const (
|
||||
// OpenapiV3JSONSchema is the key to store OpenAPI v3 JSON schema in ConfigMap
|
||||
OpenapiV3JSONSchema string = "openapi-v3-json-schema"
|
||||
// UISchema is the key to store ui custom schema
|
||||
UISchema string = "ui-schema"
|
||||
// VelaQLConfigmapKey is the key to store velaql view
|
||||
VelaQLConfigmapKey string = "template"
|
||||
)
|
||||
|
||||
// CapabilityCategory defines the category of a capability
|
||||
@@ -162,6 +165,7 @@ type Capability struct {
|
||||
Center string `json:"center,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Example string `json:"example,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Category CapabilityCategory `json:"category,omitempty"`
|
||||
|
||||
@@ -178,6 +182,8 @@ type Capability struct {
|
||||
|
||||
// Terraform
|
||||
TerraformConfiguration string `json:"terraformConfiguration,omitempty"`
|
||||
ConfigurationType string `json:"configurationType,omitempty"`
|
||||
Path string `json:"path,omitempty"`
|
||||
|
||||
// KubeTemplate
|
||||
KubeTemplate runtime.RawExtension `json:"kubetemplate,omitempty"`
|
||||
|
||||
@@ -18,13 +18,14 @@ package types
|
||||
|
||||
// reason for Application
|
||||
const (
|
||||
ReasonParsed = "Parsed"
|
||||
ReasonRendered = "Rendered"
|
||||
ReasonRevisoned = "Revisioned"
|
||||
ReasonApplied = "Applied"
|
||||
ReasonHealthCheck = "HealthChecked"
|
||||
ReasonDeployed = "Deployed"
|
||||
ReasonRollout = "Rollout"
|
||||
ReasonParsed = "Parsed"
|
||||
ReasonRendered = "Rendered"
|
||||
ReasonPolicyGenerated = "PolicyGenerated"
|
||||
ReasonRevisoned = "Revisioned"
|
||||
ReasonApplied = "Applied"
|
||||
ReasonHealthCheck = "HealthChecked"
|
||||
ReasonDeployed = "Deployed"
|
||||
ReasonRollout = "Rollout"
|
||||
|
||||
ReasonFailedParse = "FailedParse"
|
||||
ReasonFailedRender = "FailedRender"
|
||||
@@ -32,6 +33,7 @@ const (
|
||||
ReasonFailedWorkflow = "FailedWorkflow"
|
||||
ReasonFailedApply = "FailedApply"
|
||||
ReasonFailedHealthCheck = "FailedHealthCheck"
|
||||
ReasonFailedStateKeep = "FailedStateKeep"
|
||||
ReasonFailedGC = "FailedGC"
|
||||
ReasonFailedRollout = "FailedRollout"
|
||||
)
|
||||
@@ -40,6 +42,7 @@ const (
|
||||
const (
|
||||
MessageParsed = "Parsed successfully"
|
||||
MessageRendered = "Rendered successfully"
|
||||
MessagePolicyGenerated = "Policy generated successfully"
|
||||
MessageRevisioned = "Revisioned successfully"
|
||||
MessageApplied = "Applied successfully"
|
||||
MessageWorkflowFinished = "Workflow finished"
|
||||
|
||||
42
apis/types/multicluster.go
Normal file
42
apis/types/multicluster.go
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/oam-dev/cluster-gateway/pkg/apis/cluster/v1alpha1"
|
||||
"github.com/oam-dev/cluster-gateway/pkg/config"
|
||||
)
|
||||
|
||||
const (
|
||||
// ClusterLocalName the name for the hub cluster
|
||||
ClusterLocalName = "local"
|
||||
|
||||
// CredentialTypeInternal identifies the virtual cluster from internal kubevela system
|
||||
CredentialTypeInternal v1alpha1.CredentialType = "Internal"
|
||||
// CredentialTypeOCMManagedCluster identifies the virtual cluster from ocm
|
||||
CredentialTypeOCMManagedCluster v1alpha1.CredentialType = "ManagedCluster"
|
||||
// ClusterBlankEndpoint identifies the endpoint of a cluster as blank (not available)
|
||||
ClusterBlankEndpoint = "-"
|
||||
|
||||
// ClustersArg indicates the argument for specific clusters to install addon
|
||||
ClustersArg = "clusters"
|
||||
)
|
||||
|
||||
var (
|
||||
// AnnotationClusterAlias the annotation key for cluster alias
|
||||
AnnotationClusterAlias = config.MetaApiGroupName + "/cluster-alias"
|
||||
)
|
||||
@@ -19,8 +19,13 @@ package types
|
||||
import "github.com/oam-dev/kubevela/pkg/oam"
|
||||
|
||||
const (
|
||||
// DefaultKubeVelaNS defines the default KubeVela namespace in Kubernetes
|
||||
DefaultKubeVelaNS = "vela-system"
|
||||
// KubeVelaName name of kubevela
|
||||
KubeVelaName = "kubevela"
|
||||
// VelaCoreName name of vela-core
|
||||
VelaCoreName = "vela-core"
|
||||
)
|
||||
|
||||
const (
|
||||
// DefaultKubeVelaReleaseName defines the default name of KubeVela Release
|
||||
DefaultKubeVelaReleaseName = "kubevela"
|
||||
// DefaultKubeVelaChartName defines the default chart name of KubeVela, this variable MUST align to the chart name of this repo
|
||||
@@ -33,11 +38,58 @@ const (
|
||||
DefaultAppNamespace = "default"
|
||||
// AutoDetectWorkloadDefinition defines the default workload type for ComponentDefinition which doesn't specify a workload
|
||||
AutoDetectWorkloadDefinition = "autodetects.core.oam.dev"
|
||||
// KubeVelaControllerDeployment defines the KubeVela controller's deployment name
|
||||
KubeVelaControllerDeployment = "kubevela-vela-core"
|
||||
)
|
||||
|
||||
// DefaultKubeVelaNS defines the default KubeVela namespace in Kubernetes
|
||||
var DefaultKubeVelaNS = "vela-system"
|
||||
|
||||
const (
|
||||
// AnnDescription is the annotation which describe what is the capability used for in a WorkloadDefinition/TraitDefinition Object
|
||||
AnnDescription = "definition.oam.dev/description"
|
||||
// AnnoDefinitionDescription is the annotation which describe what is the capability used for in a WorkloadDefinition/TraitDefinition Object
|
||||
AnnoDefinitionDescription = "definition.oam.dev/description"
|
||||
// AnnoDefinitionExampleURL is the annotation which describe url of usage examples of the capability, it will be loaded in documentation generate.
|
||||
AnnoDefinitionExampleURL = "definition.oam.dev/example-url"
|
||||
// AnnoDefinitionAlias is the annotation for definition alias
|
||||
AnnoDefinitionAlias = "definition.oam.dev/alias"
|
||||
// AnnoDefinitionIcon is the annotation which describe the icon url
|
||||
AnnoDefinitionIcon = "definition.oam.dev/icon"
|
||||
// AnnoDefinitionAppliedWorkloads is the annotation which describe what is the workloads used for in a TraitDefinition Object
|
||||
AnnoDefinitionAppliedWorkloads = "definition.oam.dev/appliedWorkloads"
|
||||
// LabelDefinition is the label for definition
|
||||
LabelDefinition = "definition.oam.dev"
|
||||
// LabelDefinitionName is the label for definition name
|
||||
LabelDefinitionName = "definition.oam.dev/name"
|
||||
// LabelDefinitionDeprecated is the label which describe whether the capability is deprecated
|
||||
LabelDefinitionDeprecated = "custom.definition.oam.dev/deprecated"
|
||||
// LabelDefinitionHidden is the label which describe whether the capability is hidden by UI
|
||||
LabelDefinitionHidden = "custom.definition.oam.dev/ui-hidden"
|
||||
// LabelNodeRoleGateway gateway role of node
|
||||
LabelNodeRoleGateway = "node-role.kubernetes.io/gateway"
|
||||
// LabelNodeRoleWorker worker role of node
|
||||
LabelNodeRoleWorker = "node-role.kubernetes.io/worker"
|
||||
// AnnoIngressControllerHTTPSPort define ingress controller listen port for https
|
||||
AnnoIngressControllerHTTPSPort = "ingress.controller/https-port"
|
||||
// AnnoIngressControllerHTTPPort define ingress controller listen port for http
|
||||
AnnoIngressControllerHTTPPort = "ingress.controller/http-port"
|
||||
// AnnoIngressControllerHost define ingress controller externally host
|
||||
AnnoIngressControllerHost = "ingress.controller/host"
|
||||
// LabelConfigType is the label for config type
|
||||
LabelConfigType = "config.oam.dev/type"
|
||||
// LabelConfigCatalog is the label for config catalog
|
||||
LabelConfigCatalog = "config.oam.dev/catalog"
|
||||
// LabelConfigSubType is the sub-type for a config type
|
||||
LabelConfigSubType = "config.oam.dev/sub-type"
|
||||
// LabelConfigProject is the label for config project
|
||||
LabelConfigProject = "config.oam.dev/project"
|
||||
// LabelConfigSyncToMultiCluster is the label to decide whether a config will be synchronized to multi-cluster
|
||||
LabelConfigSyncToMultiCluster = "config.oam.dev/multi-cluster"
|
||||
// LabelConfigIdentifier is the label for config identifier
|
||||
LabelConfigIdentifier = "config.oam.dev/identifier"
|
||||
// AnnotationConfigDescription is the annotation for config description
|
||||
AnnotationConfigDescription = "config.oam.dev/description"
|
||||
// AnnotationConfigAlias is the annotation for config alias
|
||||
AnnotationConfigAlias = "config.oam.dev/alias"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -47,29 +99,39 @@ const (
|
||||
StatusStaging = "Staging"
|
||||
)
|
||||
|
||||
// EnvMeta stores the info for app environment
|
||||
// Config contains key/value pairs
|
||||
type Config map[string]string
|
||||
|
||||
// EnvMeta stores the namespace for app environment
|
||||
type EnvMeta struct {
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace"`
|
||||
Email string `json:"email,omitempty"`
|
||||
Domain string `json:"domain,omitempty"`
|
||||
|
||||
Current string `json:"current,omitempty"`
|
||||
Labels string `json:"labels"`
|
||||
Current string `json:"current"`
|
||||
}
|
||||
|
||||
const (
|
||||
// TagCommandType used for tag cli category
|
||||
TagCommandType = "commandType"
|
||||
|
||||
// TagCommandOrder defines the order
|
||||
TagCommandOrder = "commandOrder"
|
||||
|
||||
// TypeStart defines one category
|
||||
TypeStart = "Getting Started"
|
||||
|
||||
// TypeApp defines one category
|
||||
TypeApp = "Managing Applications"
|
||||
// TypeCap defines one category
|
||||
TypeCap = "Managing Capabilities"
|
||||
|
||||
// TypeCD defines workflow Management operations
|
||||
TypeCD = "Continuous Delivery"
|
||||
|
||||
// TypeExtension defines one category
|
||||
TypeExtension = "Managing Extension"
|
||||
|
||||
// TypeSystem defines one category
|
||||
TypeSystem = "System"
|
||||
// TypeDefinition defines one category
|
||||
TypeDefinition = "Managing Definitions"
|
||||
TypeSystem = "Others"
|
||||
|
||||
// TypePlugin defines one category used in Kubectl Plugin
|
||||
TypePlugin = "Plugin Command"
|
||||
)
|
||||
@@ -84,4 +146,31 @@ var DefaultFilterAnnots = []string{
|
||||
oam.AnnotationInplaceUpgrade,
|
||||
oam.AnnotationFilterLabelKeys,
|
||||
oam.AnnotationFilterAnnotationKeys,
|
||||
oam.AnnotationLastAppliedConfiguration,
|
||||
}
|
||||
|
||||
// ConfigType is the type of config
|
||||
type ConfigType string
|
||||
|
||||
const (
|
||||
// TerraformProvider is the config type for terraform provider
|
||||
TerraformProvider = "terraform-provider"
|
||||
// DexConnector is the config type for dex connector
|
||||
DexConnector = "config-dex-connector"
|
||||
// ImageRegistry is the config type for image registry
|
||||
ImageRegistry = "config-image-registry"
|
||||
// HelmRepository is the config type for Helm chart repository
|
||||
HelmRepository = "config-helm-repository"
|
||||
)
|
||||
|
||||
const (
|
||||
// TerraformComponentPrefix is the prefix of component type of terraform-xxx
|
||||
TerraformComponentPrefix = "terraform-"
|
||||
|
||||
// ProviderAppPrefix is the prefix of the application to create a Terraform Provider
|
||||
ProviderAppPrefix = "config-terraform-provider"
|
||||
// ProviderNamespace is the namespace of Terraform Cloud Provider
|
||||
ProviderNamespace = "default"
|
||||
// VelaCoreConfig is to mark application, config and its secret or Terraform provider lelong to a KubeVela config
|
||||
VelaCoreConfig = "velacore-config"
|
||||
)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: oam-runtime
|
||||
description: A Helm chart for oam-runtime aligns with OAM spec v0.2
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
appVersion: 0.1.0
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,178 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: components.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: Component
|
||||
listKind: ComponentList
|
||||
plural: components
|
||||
singular: component
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.workload.kind
|
||||
name: WORKLOAD-KIND
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: age
|
||||
type: date
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A Component describes how an OAM workload kind may be instantiated.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ComponentSpec defines the desired state of a Component.
|
||||
properties:
|
||||
helm:
|
||||
description: HelmRelease records a Helm release used by a Helm module
|
||||
workload.
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm module
|
||||
workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
parameters:
|
||||
description: Parameters exposed by this component. ApplicationConfigurations
|
||||
that reference this component may specify values for these parameters,
|
||||
which will in turn be injected into the embedded workload.
|
||||
items:
|
||||
description: A ComponentParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: FieldPaths specifies an array of fields within
|
||||
this Component's workload that will be overwritten by the
|
||||
value of this parameter. The type of the parameter (e.g. int,
|
||||
string) is inferred from the type of these fields; All fields
|
||||
must be of the same type. Fields are specified as JSON field
|
||||
paths without a leading dot, for example 'spec.replicas'.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter. OAM ApplicationConfigurations
|
||||
will specify parameter values using this name.
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value for this
|
||||
parameter must be supplied when authoring an ApplicationConfiguration.
|
||||
type: boolean
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
workload:
|
||||
description: A Workload that will be created for each ApplicationConfiguration
|
||||
that includes this Component. Workload is an instance of a workloadDefinition.
|
||||
We either use the GVK info or a special "type" field in the workload
|
||||
to associate the content of the workload with its workloadDefinition
|
||||
type: object
|
||||
x-kubernetes-embedded-resource: true
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- workload
|
||||
type: object
|
||||
status:
|
||||
description: A ComponentStatus represents the observed state of a Component.
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
latestRevision:
|
||||
description: LatestRevision of component
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
observedGeneration:
|
||||
description: The generation observed by the component controller.
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1,593 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: containerizedworkloads.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ContainerizedWorkload
|
||||
listKind: ContainerizedWorkloadList
|
||||
plural: containerizedworkloads
|
||||
singular: containerizedworkload
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ContainerizedWorkload is a workload that runs OCI containers.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ContainerizedWorkloadSpec defines the desired state of
|
||||
a ContainerizedWorkload.
|
||||
properties:
|
||||
arch:
|
||||
description: CPUArchitecture required by this workload.
|
||||
enum:
|
||||
- i386
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
type: string
|
||||
containers:
|
||||
description: Containers of which this workload consists.
|
||||
items:
|
||||
description: A Container represents an Open Containers Initiative
|
||||
(OCI) container.
|
||||
properties:
|
||||
args:
|
||||
description: Arguments to be passed to the command run by this
|
||||
container.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
command:
|
||||
description: Command to be run by this container.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
config:
|
||||
description: ConfigFiles that should be written within this
|
||||
container.
|
||||
items:
|
||||
description: A ContainerConfigFile specifies a configuration
|
||||
file that should be written within a container.
|
||||
properties:
|
||||
fromSecret:
|
||||
description: FromSecret is a secret key reference which
|
||||
can be used to assign a value to be written to the configuration
|
||||
file at the given path in the container.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
description: The name of the secret.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
- name
|
||||
type: object
|
||||
path:
|
||||
description: Path within the container at which the configuration
|
||||
file should be written.
|
||||
type: string
|
||||
value:
|
||||
description: Value that should be written to the configuration
|
||||
file.
|
||||
type: string
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
env:
|
||||
description: Environment variables that should be set within
|
||||
this container.
|
||||
items:
|
||||
description: A ContainerEnvVar specifies an environment variable
|
||||
that should be set within a container.
|
||||
properties:
|
||||
fromSecret:
|
||||
description: FromSecret is a secret key reference which
|
||||
can be used to assign a value to the environment variable.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
description: The name of the secret.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
- name
|
||||
type: object
|
||||
name:
|
||||
description: Name of the environment variable. Must be
|
||||
composed of valid Unicode letter and number characters,
|
||||
as well as _ and -.
|
||||
pattern: ^[-_a-zA-Z0-9]+$
|
||||
type: string
|
||||
value:
|
||||
description: Value of the environment variable.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
image:
|
||||
description: Image this container should run. Must be a path-like
|
||||
or URI-like representation of an OCI image. May be prefixed
|
||||
with a registry address and should be suffixed with a tag.
|
||||
type: string
|
||||
imagePullSecret:
|
||||
description: ImagePullSecret specifies the name of a Secret
|
||||
from which the credentials required to pull this container's
|
||||
image can be loaded.
|
||||
type: string
|
||||
livenessProbe:
|
||||
description: A LivenessProbe assesses whether this container
|
||||
is alive. Containers that fail liveness probes will be restarted.
|
||||
properties:
|
||||
exec:
|
||||
description: Exec probes a container's health by executing
|
||||
a command.
|
||||
properties:
|
||||
command:
|
||||
description: Command to be run by this probe.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- command
|
||||
type: object
|
||||
failureThreshold:
|
||||
description: FailureThreshold specifies how many consecutive
|
||||
probes must fail in order for the container to be considered
|
||||
healthy.
|
||||
format: int32
|
||||
type: integer
|
||||
httpGet:
|
||||
description: HTTPGet probes a container's health by sending
|
||||
an HTTP GET request.
|
||||
properties:
|
||||
httpHeaders:
|
||||
description: HTTPHeaders to send with the GET request.
|
||||
items:
|
||||
description: A HTTPHeader to be passed when probing
|
||||
a container.
|
||||
properties:
|
||||
name:
|
||||
description: Name of this HTTP header. Must be
|
||||
unique per probe.
|
||||
type: string
|
||||
value:
|
||||
description: Value of this HTTP header.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
path:
|
||||
description: Path to probe, e.g. '/healthz'.
|
||||
type: string
|
||||
port:
|
||||
description: Port to probe.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- path
|
||||
- port
|
||||
type: object
|
||||
initialDelaySeconds:
|
||||
description: InitialDelaySeconds after a container starts
|
||||
before the first probe.
|
||||
format: int32
|
||||
type: integer
|
||||
periodSeconds:
|
||||
description: PeriodSeconds between probes.
|
||||
format: int32
|
||||
type: integer
|
||||
successThreshold:
|
||||
description: SuccessThreshold specifies how many consecutive
|
||||
probes must success in order for the container to be considered
|
||||
healthy.
|
||||
format: int32
|
||||
type: integer
|
||||
tcpSocket:
|
||||
description: TCPSocketProbe probes a container's health
|
||||
by connecting to a TCP socket.
|
||||
properties:
|
||||
port:
|
||||
description: Port this probe should connect to.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
timeoutSeconds:
|
||||
description: TimeoutSeconds after which the probe times
|
||||
out.
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
name:
|
||||
description: Name of this container. Must be unique within its
|
||||
workload.
|
||||
type: string
|
||||
ports:
|
||||
description: Ports exposed by this container.
|
||||
items:
|
||||
description: A ContainerPort specifies a port that is exposed
|
||||
by a container.
|
||||
properties:
|
||||
containerPort:
|
||||
description: Port number. Must be unique within its container.
|
||||
format: int32
|
||||
type: integer
|
||||
name:
|
||||
description: Name of this port. Must be unique within
|
||||
its container. Must be lowercase alphabetical characters.
|
||||
pattern: ^[a-z]+$
|
||||
type: string
|
||||
protocol:
|
||||
description: Protocol used by the server listening on
|
||||
this port.
|
||||
enum:
|
||||
- TCP
|
||||
- UDP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
readinessProbe:
|
||||
description: A ReadinessProbe assesses whether this container
|
||||
is ready to serve requests. Containers that fail readiness
|
||||
probes will be withdrawn from service.
|
||||
properties:
|
||||
exec:
|
||||
description: Exec probes a container's health by executing
|
||||
a command.
|
||||
properties:
|
||||
command:
|
||||
description: Command to be run by this probe.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- command
|
||||
type: object
|
||||
failureThreshold:
|
||||
description: FailureThreshold specifies how many consecutive
|
||||
probes must fail in order for the container to be considered
|
||||
healthy.
|
||||
format: int32
|
||||
type: integer
|
||||
httpGet:
|
||||
description: HTTPGet probes a container's health by sending
|
||||
an HTTP GET request.
|
||||
properties:
|
||||
httpHeaders:
|
||||
description: HTTPHeaders to send with the GET request.
|
||||
items:
|
||||
description: A HTTPHeader to be passed when probing
|
||||
a container.
|
||||
properties:
|
||||
name:
|
||||
description: Name of this HTTP header. Must be
|
||||
unique per probe.
|
||||
type: string
|
||||
value:
|
||||
description: Value of this HTTP header.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
path:
|
||||
description: Path to probe, e.g. '/healthz'.
|
||||
type: string
|
||||
port:
|
||||
description: Port to probe.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- path
|
||||
- port
|
||||
type: object
|
||||
initialDelaySeconds:
|
||||
description: InitialDelaySeconds after a container starts
|
||||
before the first probe.
|
||||
format: int32
|
||||
type: integer
|
||||
periodSeconds:
|
||||
description: PeriodSeconds between probes.
|
||||
format: int32
|
||||
type: integer
|
||||
successThreshold:
|
||||
description: SuccessThreshold specifies how many consecutive
|
||||
probes must success in order for the container to be considered
|
||||
healthy.
|
||||
format: int32
|
||||
type: integer
|
||||
tcpSocket:
|
||||
description: TCPSocketProbe probes a container's health
|
||||
by connecting to a TCP socket.
|
||||
properties:
|
||||
port:
|
||||
description: Port this probe should connect to.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
timeoutSeconds:
|
||||
description: TimeoutSeconds after which the probe times
|
||||
out.
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
resources:
|
||||
description: Resources required by this container
|
||||
properties:
|
||||
cpu:
|
||||
description: CPU required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required CPU count. 1.0 represents one
|
||||
CPU core.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
extended:
|
||||
description: Extended resources required by this container.
|
||||
items:
|
||||
description: ExtendedResource required by a container.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the external resource. Resource
|
||||
names are specified in kind.group/version format,
|
||||
e.g. motionsensor.ext.example.com/v1.
|
||||
type: string
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required extended resource(s), e.g. 8
|
||||
or "very-cool-widget"
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- name
|
||||
- required
|
||||
type: object
|
||||
type: array
|
||||
gpu:
|
||||
description: GPU required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required GPU count.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
memory:
|
||||
description: Memory required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required memory.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
volumes:
|
||||
description: Volumes required by this container.
|
||||
items:
|
||||
description: VolumeResource required by a container.
|
||||
properties:
|
||||
accessMode:
|
||||
description: AccessMode of this volume; RO (read only)
|
||||
or RW (read and write).
|
||||
enum:
|
||||
- RO
|
||||
- RW
|
||||
type: string
|
||||
disk:
|
||||
description: Disk requirements of this volume.
|
||||
properties:
|
||||
ephemeral:
|
||||
description: Ephemeral specifies whether an external
|
||||
disk needs to be mounted.
|
||||
type: boolean
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required disk space.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
mountPath:
|
||||
description: MountPath at which this volume will be
|
||||
mounted within its container.
|
||||
type: string
|
||||
name:
|
||||
description: Name of this volume. Must be unique within
|
||||
its container.
|
||||
type: string
|
||||
sharingPolicy:
|
||||
description: SharingPolicy of this volume; Exclusive
|
||||
or Shared.
|
||||
enum:
|
||||
- Exclusive
|
||||
- Shared
|
||||
type: string
|
||||
required:
|
||||
- mountPath
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- cpu
|
||||
- memory
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
osType:
|
||||
description: OperatingSystem required by this workload.
|
||||
enum:
|
||||
- linux
|
||||
- windows
|
||||
type: string
|
||||
required:
|
||||
- containers
|
||||
type: object
|
||||
status:
|
||||
description: A ContainerizedWorkloadStatus represents the observed state
|
||||
of a ContainerizedWorkload.
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
resources:
|
||||
description: Resources managed by this containerised workload.
|
||||
items:
|
||||
description: 'ObjectReference contains enough information to let
|
||||
you inspect or modify the referred object. --- New uses of this
|
||||
type are discouraged because of difficulty describing its usage
|
||||
when embedded in APIs. 1. Ignored fields. It includes many fields
|
||||
which are not generally honored. For instance, ResourceVersion
|
||||
and FieldPath are both very rarely valid in actual usage. 2.
|
||||
Invalid usage help. It is impossible to add specific help for
|
||||
individual usage. In most embedded usages, there are particular restrictions
|
||||
like, "must refer only to types A and B" or "UID not honored"
|
||||
or "name must be restricted". Those cannot be well described
|
||||
when embedded. 3. Inconsistent validation. Because the usages
|
||||
are different, the validation rules are different by usage, which
|
||||
makes it hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual
|
||||
struct is irrelevant. 5. We cannot easily change it. Because
|
||||
this type is embedded in many locations, updates to this type will
|
||||
affect numerous schemas. Don''t make new APIs embed an underspecified
|
||||
API type they do not control. Instead of using this type, create
|
||||
a locally provided and used type that is well-focused on your
|
||||
reference. For example, ServiceReferences for admission registration:
|
||||
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1,590 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: healthscopes.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: HealthScope
|
||||
listKind: HealthScopeList
|
||||
plural: healthscopes
|
||||
singular: healthscope
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.health
|
||||
name: HEALTH
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A HealthScope determines an aggregate health status based of
|
||||
the health of components.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A HealthScopeSpec defines the desired state of a HealthScope.
|
||||
properties:
|
||||
appReferences:
|
||||
description: AppRefs records references of applications' components
|
||||
items:
|
||||
description: AppReference records references of an application's
|
||||
components
|
||||
properties:
|
||||
appName:
|
||||
type: string
|
||||
compReferences:
|
||||
items:
|
||||
description: CompReference records references of a component's
|
||||
resources
|
||||
properties:
|
||||
compName:
|
||||
type: string
|
||||
traits:
|
||||
items:
|
||||
description: 'ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object.
|
||||
--- New uses of this type are discouraged because
|
||||
of difficulty describing its usage when embedded in
|
||||
APIs. 1. Ignored fields. It includes many fields
|
||||
which are not generally honored. For instance, ResourceVersion
|
||||
and FieldPath are both very rarely valid in actual
|
||||
usage. 2. Invalid usage help. It is impossible to
|
||||
add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like,
|
||||
"must refer only to types A and B" or "UID not honored"
|
||||
or "name must be restricted". Those cannot be
|
||||
well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are
|
||||
different by usage, which makes it hard for users
|
||||
to predict what will happen. 4. The fields are both
|
||||
imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during
|
||||
interpretation and require a REST mapping. In most
|
||||
cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5.
|
||||
We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will
|
||||
affect numerous schemas. Don''t make new APIs embed
|
||||
an underspecified API type they do not control. Instead
|
||||
of using this type, create a locally provided and
|
||||
used type that is well-focused on your reference.
|
||||
For example, ServiceReferences for admission registration:
|
||||
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like:
|
||||
"spec.containers{name}" (where "name" refers to
|
||||
the name of the container that triggered the event)
|
||||
or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax
|
||||
is chosen only to have some well-defined way of
|
||||
referencing a part of an object. TODO: this design
|
||||
is not final and this field is subject to change
|
||||
in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which
|
||||
this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
workload:
|
||||
description: 'ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. ---
|
||||
New uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored
|
||||
fields. It includes many fields which are not generally
|
||||
honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid
|
||||
usage help. It is impossible to add specific help for
|
||||
individual usage. In most embedded usages, there are
|
||||
particular restrictions like, "must refer only to
|
||||
types A and B" or "UID not honored" or "name must be
|
||||
restricted". Those cannot be well described when
|
||||
embedded. 3. Inconsistent validation. Because the
|
||||
usages are different, the validation rules are different
|
||||
by usage, which makes it hard for users to predict what
|
||||
will happen. 4. The fields are both imprecise and overly
|
||||
precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and
|
||||
require a REST mapping. In most cases, the dependency
|
||||
is on the group,resource tuple and the version of
|
||||
the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations,
|
||||
updates to this type will affect numerous schemas. Don''t
|
||||
make new APIs embed an underspecified API type they
|
||||
do not control. Instead of using this type, create a
|
||||
locally provided and used type that is well-focused
|
||||
on your reference. For example, ServiceReferences for
|
||||
admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only
|
||||
to have some well-defined way of referencing a part
|
||||
of an object. TODO: this design is not final and
|
||||
this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
probe-interval:
|
||||
description: ProbeInterval is the amount of time in seconds between
|
||||
probing tries.
|
||||
format: int32
|
||||
type: integer
|
||||
probe-timeout:
|
||||
description: ProbeTimeout is the amount of time in seconds to wait
|
||||
when receiving a response before marked failure.
|
||||
format: int32
|
||||
type: integer
|
||||
workloadRefs:
|
||||
description: WorkloadReferences to the workloads that are in this
|
||||
scope.
|
||||
items:
|
||||
description: 'ObjectReference contains enough information to let
|
||||
you inspect or modify the referred object. --- New uses of this
|
||||
type are discouraged because of difficulty describing its usage
|
||||
when embedded in APIs. 1. Ignored fields. It includes many fields
|
||||
which are not generally honored. For instance, ResourceVersion
|
||||
and FieldPath are both very rarely valid in actual usage. 2.
|
||||
Invalid usage help. It is impossible to add specific help for
|
||||
individual usage. In most embedded usages, there are particular restrictions
|
||||
like, "must refer only to types A and B" or "UID not honored"
|
||||
or "name must be restricted". Those cannot be well described
|
||||
when embedded. 3. Inconsistent validation. Because the usages
|
||||
are different, the validation rules are different by usage, which
|
||||
makes it hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual
|
||||
struct is irrelevant. 5. We cannot easily change it. Because
|
||||
this type is embedded in many locations, updates to this type will
|
||||
affect numerous schemas. Don''t make new APIs embed an underspecified
|
||||
API type they do not control. Instead of using this type, create
|
||||
a locally provided and used type that is well-focused on your
|
||||
reference. For example, ServiceReferences for admission registration:
|
||||
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- workloadRefs
|
||||
type: object
|
||||
status:
|
||||
description: A HealthScopeStatus represents the observed state of a HealthScope.
|
||||
properties:
|
||||
appHealthConditions:
|
||||
description: AppHealthConditions represents health condition of applications
|
||||
in the scope
|
||||
items:
|
||||
description: AppHealthCondition represents health condition of an
|
||||
application
|
||||
properties:
|
||||
appName:
|
||||
type: string
|
||||
components:
|
||||
items:
|
||||
description: WorkloadHealthCondition represents informative
|
||||
health condition of a workload.
|
||||
properties:
|
||||
componentName:
|
||||
description: ComponentName represents the component name
|
||||
if target is a workload
|
||||
type: string
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
targetWorkload:
|
||||
description: 'ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. ---
|
||||
New uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored
|
||||
fields. It includes many fields which are not generally
|
||||
honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid
|
||||
usage help. It is impossible to add specific help for
|
||||
individual usage. In most embedded usages, there are
|
||||
particular restrictions like, "must refer only to
|
||||
types A and B" or "UID not honored" or "name must be
|
||||
restricted". Those cannot be well described when
|
||||
embedded. 3. Inconsistent validation. Because the
|
||||
usages are different, the validation rules are different
|
||||
by usage, which makes it hard for users to predict what
|
||||
will happen. 4. The fields are both imprecise and overly
|
||||
precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and
|
||||
require a REST mapping. In most cases, the dependency
|
||||
is on the group,resource tuple and the version of
|
||||
the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations,
|
||||
updates to this type will affect numerous schemas. Don''t
|
||||
make new APIs embed an underspecified API type they
|
||||
do not control. Instead of using this type, create a
|
||||
locally provided and used type that is well-focused
|
||||
on your reference. For example, ServiceReferences for
|
||||
admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only
|
||||
to have some well-defined way of referencing a part
|
||||
of an object. TODO: this design is not final and
|
||||
this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
traits:
|
||||
items:
|
||||
description: TraitHealthCondition represents informative
|
||||
health condition of a trait.
|
||||
properties:
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status
|
||||
strings.
|
||||
type: string
|
||||
resource:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
- resource
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
workloadStatus:
|
||||
description: WorkloadStatus represents status of workloads
|
||||
whose HealthStatus is UNKNOWN.
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
type: object
|
||||
type: array
|
||||
envName:
|
||||
type: string
|
||||
required:
|
||||
- appName
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
healthConditions:
|
||||
description: WorkloadHealthConditions represents health condition
|
||||
of workloads in the scope Use AppHealthConditions to provide app
|
||||
level status
|
||||
items:
|
||||
description: WorkloadHealthCondition represents informative health
|
||||
condition of a workload.
|
||||
properties:
|
||||
componentName:
|
||||
description: ComponentName represents the component name if
|
||||
target is a workload
|
||||
type: string
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
targetWorkload:
|
||||
description: 'ObjectReference contains enough information to
|
||||
let you inspect or modify the referred object. --- New uses
|
||||
of this type are discouraged because of difficulty describing
|
||||
its usage when embedded in APIs. 1. Ignored fields. It includes
|
||||
many fields which are not generally honored. For instance,
|
||||
ResourceVersion and FieldPath are both very rarely valid in
|
||||
actual usage. 2. Invalid usage help. It is impossible to
|
||||
add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like, "must
|
||||
refer only to types A and B" or "UID not honored" or "name
|
||||
must be restricted". Those cannot be well described when
|
||||
embedded. 3. Inconsistent validation. Because the usages
|
||||
are different, the validation rules are different by usage,
|
||||
which makes it hard for users to predict what will happen. 4.
|
||||
The fields are both imprecise and overly precise. Kind is
|
||||
not a precise mapping to a URL. This can produce ambiguity during
|
||||
interpretation and require a REST mapping. In most cases,
|
||||
the dependency is on the group,resource tuple and the
|
||||
version of the actual struct is irrelevant. 5. We cannot
|
||||
easily change it. Because this type is embedded in many locations,
|
||||
updates to this type will affect numerous schemas. Don''t
|
||||
make new APIs embed an underspecified API type they do not
|
||||
control. Instead of using this type, create a locally provided
|
||||
and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a valid
|
||||
JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that
|
||||
triggered the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2 in this pod).
|
||||
This syntax is chosen only to have some well-defined way
|
||||
of referencing a part of an object. TODO: this design
|
||||
is not final and this field is subject to change in the
|
||||
future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
traits:
|
||||
items:
|
||||
description: TraitHealthCondition represents informative health
|
||||
condition of a trait.
|
||||
properties:
|
||||
customStatusMsg:
|
||||
type: string
|
||||
diagnosis:
|
||||
type: string
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
resource:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
- resource
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
workloadStatus:
|
||||
description: WorkloadStatus represents status of workloads whose
|
||||
HealthStatus is UNKNOWN.
|
||||
type: string
|
||||
required:
|
||||
- healthStatus
|
||||
type: object
|
||||
type: array
|
||||
scopeHealthCondition:
|
||||
description: ScopeHealthCondition represents health condition summary
|
||||
of the scope
|
||||
properties:
|
||||
healthStatus:
|
||||
description: HealthStatus represents health status strings.
|
||||
type: string
|
||||
healthyWorkloads:
|
||||
format: int64
|
||||
type: integer
|
||||
total:
|
||||
format: int64
|
||||
type: integer
|
||||
unhealthyWorkloads:
|
||||
format: int64
|
||||
type: integer
|
||||
unknownWorkloads:
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- healthStatus
|
||||
type: object
|
||||
required:
|
||||
- scopeHealthCondition
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1,134 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: manualscalertraits.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ManualScalerTrait
|
||||
listKind: ManualScalerTraitList
|
||||
plural: manualscalertraits
|
||||
singular: manualscalertrait
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ManualScalerTrait determines how many replicas a workload should
|
||||
have.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ManualScalerTraitSpec defines the desired state of a ManualScalerTrait.
|
||||
properties:
|
||||
replicaCount:
|
||||
description: ReplicaCount of the workload this trait applies to.
|
||||
format: int32
|
||||
type: integer
|
||||
workloadRef:
|
||||
description: WorkloadReference to the workload this trait applies
|
||||
to.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- replicaCount
|
||||
- workloadRef
|
||||
type: object
|
||||
status:
|
||||
description: A ManualScalerTraitStatus represents the observed state of
|
||||
a ManualScalerTrait.
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1,153 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: scopedefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ScopeDefinition
|
||||
listKind: ScopeDefinitionList
|
||||
plural: scopedefinitions
|
||||
shortNames:
|
||||
- scope
|
||||
singular: scopedefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ScopeDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM scope kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the scope when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
|
||||
properties:
|
||||
allowComponentOverlap:
|
||||
description: AllowComponentOverlap specifies whether an OAM component
|
||||
may exist in multiple instances of this kind of scope.
|
||||
type: boolean
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this scope kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
workloadRefsPath:
|
||||
description: WorkloadRefsPath indicates if/where a scope accepts workloadRef
|
||||
objects
|
||||
type: string
|
||||
required:
|
||||
- allowComponentOverlap
|
||||
- definitionRef
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A ScopeDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM scope kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the scope when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
|
||||
properties:
|
||||
allowComponentOverlap:
|
||||
description: AllowComponentOverlap specifies whether an OAM component
|
||||
may exist in multiple instances of this kind of scope.
|
||||
type: boolean
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this scope kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
workloadRefsPath:
|
||||
description: WorkloadRefsPath indicates if/where a scope accepts workloadRef
|
||||
objects
|
||||
type: string
|
||||
required:
|
||||
- allowComponentOverlap
|
||||
- definitionRef
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1,559 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: traitdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: TraitDefinition
|
||||
listKind: TraitDefinitionList
|
||||
plural: traitdefinitions
|
||||
shortNames:
|
||||
- trait
|
||||
singular: traitdefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.appliesToWorkloads
|
||||
name: APPLIES-TO
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A TraitDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM trait kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the trait when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A TraitDefinitionSpec defines the desired state of a TraitDefinition.
|
||||
properties:
|
||||
appliesToWorkloads:
|
||||
description: AppliesToWorkloads specifies the list of workload kinds
|
||||
this trait applies to. Workload kinds are specified in kind.group/version
|
||||
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
|
||||
field apply to all workload kinds.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
conflictsWith:
|
||||
description: 'ConflictsWith specifies the list of traits(CRD name,
|
||||
Definition name, CRD group) which could not apply to the same workloads
|
||||
with this trait. Traits that omit this field can work with any other
|
||||
traits. Example rules: "service" # Trait definition name "services.k8s.io"
|
||||
# API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar"
|
||||
# label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this trait kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podDisruptive:
|
||||
description: PodDisruptive specifies whether using the trait will
|
||||
cause the pod to restart or not.
|
||||
type: boolean
|
||||
revisionEnabled:
|
||||
description: Revision indicates whether a trait is aware of component
|
||||
revision
|
||||
type: boolean
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the trait
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for trait
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
workloadRefPath:
|
||||
description: WorkloadRefPath indicates where/if a trait accepts a
|
||||
workloadRef object
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: TraitDefinitionStatus is the status of TraitDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the trait definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources:
|
||||
status: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.appliesToWorkloads
|
||||
name: APPLIES-TO
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A TraitDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM trait kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the trait when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A TraitDefinitionSpec defines the desired state of a TraitDefinition.
|
||||
properties:
|
||||
appliesToWorkloads:
|
||||
description: AppliesToWorkloads specifies the list of workload kinds
|
||||
this trait applies to. Workload kinds are specified in kind.group/version
|
||||
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
|
||||
field apply to all workload kinds.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
conflictsWith:
|
||||
description: 'ConflictsWith specifies the list of traits(CRD name,
|
||||
Definition name, CRD group) which could not apply to the same workloads
|
||||
with this trait. Traits that omit this field can work with any other
|
||||
traits. Example rules: "service" # Trait definition name "services.k8s.io"
|
||||
# API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar"
|
||||
# label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this trait kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
manageWorkload:
|
||||
description: ManageWorkload defines the trait would be responsible
|
||||
for creating the workload
|
||||
type: boolean
|
||||
podDisruptive:
|
||||
description: PodDisruptive specifies whether using the trait will
|
||||
cause the pod to restart or not.
|
||||
type: boolean
|
||||
revisionEnabled:
|
||||
description: Revision indicates whether a trait is aware of component
|
||||
revision
|
||||
type: boolean
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the trait
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
skipRevisionAffect:
|
||||
description: SkipRevisionAffect defines the update this trait will
|
||||
not generate a new application Revision
|
||||
type: boolean
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for trait
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
workloadRefPath:
|
||||
description: WorkloadRefPath indicates where/if a trait accepts a
|
||||
workloadRef object
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: TraitDefinitionStatus is the status of TraitDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
configMapRef:
|
||||
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
|
||||
V3 JSON schema of Component parameters.
|
||||
type: string
|
||||
latestRevision:
|
||||
description: LatestRevision of the component definition
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
revision:
|
||||
format: int64
|
||||
type: integer
|
||||
revisionHash:
|
||||
description: RevisionHash record the hash value of the spec of
|
||||
ApplicationRevision object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- revision
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1,518 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: workloaddefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: WorkloadDefinition
|
||||
listKind: WorkloadDefinitionList
|
||||
plural: workloaddefinitions
|
||||
shortNames:
|
||||
- workload
|
||||
singular: workloaddefinition
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A WorkloadDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM workload kind by referencing its CustomResourceDefinition.
|
||||
The CRD is used to validate the schema of the workload when it is embedded
|
||||
in an OAM Component.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
|
||||
properties:
|
||||
childResourceKinds:
|
||||
description: ChildResourceKinds are the list of GVK of the child resources
|
||||
this workload generates
|
||||
items:
|
||||
description: A ChildResourceKind defines a child Kubernetes resource
|
||||
kind with a selector
|
||||
properties:
|
||||
apiVersion:
|
||||
description: APIVersion of the child resource
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the child resource
|
||||
type: string
|
||||
selector:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Selector to select the child resources that the
|
||||
workload wants to expose to traits
|
||||
type: object
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type: array
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this workload kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: PodSpecPath indicates where/if this workload has K8s
|
||||
podSpec field if one workload has podSpec, trait can do lot's of
|
||||
assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: RevisionLabel indicates which label for underlying resources(e.g.
|
||||
pods) of this workload can be used by trait to create resource selectors(e.g.
|
||||
label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workload
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for workload
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- definitionRef
|
||||
type: object
|
||||
status:
|
||||
description: WorkloadDefinitionStatus is the status of WorkloadDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
subresources: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.definitionRef.name
|
||||
name: DEFINITION-NAME
|
||||
type: string
|
||||
- jsonPath: .metadata.annotations.definition\.oam\.dev/description
|
||||
name: DESCRIPTION
|
||||
type: string
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A WorkloadDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM workload kind by referencing its CustomResourceDefinition.
|
||||
The CRD is used to validate the schema of the workload when it is embedded
|
||||
in an OAM Component.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
|
||||
properties:
|
||||
childResourceKinds:
|
||||
description: ChildResourceKinds are the list of GVK of the child resources
|
||||
this workload generates
|
||||
items:
|
||||
description: A ChildResourceKind defines a child Kubernetes resource
|
||||
kind with a selector
|
||||
properties:
|
||||
apiVersion:
|
||||
description: APIVersion of the child resource
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the child resource
|
||||
type: string
|
||||
selector:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Selector to select the child resources that the
|
||||
workload wants to expose to traits
|
||||
type: object
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
type: object
|
||||
type: array
|
||||
definitionRef:
|
||||
description: Reference to the CustomResourceDefinition that defines
|
||||
this workload kind.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
extension:
|
||||
description: Extension is used for extension needs by OAM platform
|
||||
builders
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: PodSpecPath indicates where/if this workload has K8s
|
||||
podSpec field if one workload has podSpec, trait can do lot's of
|
||||
assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: RevisionLabel indicates which label for underlying resources(e.g.
|
||||
pods) of this workload can be used by trait to create resource selectors(e.g.
|
||||
label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workload
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
helm:
|
||||
description: A Helm represents resources used by a Helm module
|
||||
properties:
|
||||
release:
|
||||
description: Release records a Helm release used by a Helm
|
||||
module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
repository:
|
||||
description: HelmRelease records a Helm repository used by
|
||||
a Helm module workload.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- release
|
||||
- repository
|
||||
type: object
|
||||
kube:
|
||||
description: Kube defines the encapsulation in raw Kubernetes
|
||||
resource format
|
||||
properties:
|
||||
parameters:
|
||||
description: Parameters defines configurable parameters
|
||||
items:
|
||||
description: A KubeParameter defines a configurable parameter
|
||||
of a component.
|
||||
properties:
|
||||
description:
|
||||
description: Description of this parameter.
|
||||
type: string
|
||||
fieldPaths:
|
||||
description: "FieldPaths specifies an array of fields
|
||||
within this workload that will be overwritten by the
|
||||
value of this parameter. \tAll fields must be of the
|
||||
same type. Fields are specified as JSON field paths
|
||||
without a leading dot, for example 'spec.replicas'."
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
description: Name of this parameter
|
||||
type: string
|
||||
required:
|
||||
default: false
|
||||
description: Required specifies whether or not a value
|
||||
for this parameter must be supplied when authoring
|
||||
an Application.
|
||||
type: boolean
|
||||
type:
|
||||
description: 'ValueType indicates the type of the parameter
|
||||
value, and only supports basic data types: string,
|
||||
number, boolean.'
|
||||
enum:
|
||||
- string
|
||||
- number
|
||||
- boolean
|
||||
type: string
|
||||
required:
|
||||
- fieldPaths
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
template:
|
||||
description: Template defines the raw Kubernetes resource
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- template
|
||||
type: object
|
||||
terraform:
|
||||
description: Terraform is the struct to describe cloud resources
|
||||
managed by Hashicorp Terraform
|
||||
properties:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
it is, HCL or JSON syntax
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
for workload
|
||||
properties:
|
||||
customStatus:
|
||||
description: CustomStatus defines the custom status message that
|
||||
could display to user
|
||||
type: string
|
||||
healthPolicy:
|
||||
description: HealthPolicy defines the health check policy for
|
||||
the abstraction
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- definitionRef
|
||||
type: object
|
||||
status:
|
||||
description: WorkloadDefinitionStatus is the status of WorkloadDefinition
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1 +0,0 @@
|
||||
Welcome to use the oam-runtime follows OAM spec v0.2! Enjoy your shipping application journey!
|
||||
@@ -1,63 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "oam-runtime.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "oam-runtime.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "oam-runtime.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "oam-runtime.labels" -}}
|
||||
helm.sh/chart: {{ include "oam-runtime.chart" . }}
|
||||
{{ include "oam-runtime.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "oam-runtime.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "oam-runtime.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "oam-runtime.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "oam-runtime.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,28 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
{{- end }}
|
||||
@@ -1,20 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -1,50 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission-create
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission-create
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission-create
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission-create
|
||||
{{- include "oam-runtime.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
- --host={{ template "oam-runtime.name" . }}-webhook,{{ template "oam-runtime.name" . }}-webhook.{{ .Release.Namespace }}.svc
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "oam-runtime.fullname" . }}-admission
|
||||
- --key-name=tls.key
|
||||
- --cert-name=tls.crt
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ template "oam-runtime.fullname" . }}-admission
|
||||
{{- with .Values.admissionWebhooks.patch.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionWebhooks.patch.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{- end }}
|
||||
@@ -1,49 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission-patch
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission-patch
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission-patch
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission-patch
|
||||
{{- include "oam-runtime.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
- --webhook-name={{ template "oam-runtime.fullname" . }}-admission
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "oam-runtime.fullname" . }}-admission
|
||||
- --patch-failure-policy={{ .Values.admissionWebhooks.failurePolicy }}
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ template "oam-runtime.fullname" . }}-admission
|
||||
{{- with .Values.admissionWebhooks.patch.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionWebhooks.patch.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{- end }}
|
||||
@@ -1,21 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
{{- end }}
|
||||
@@ -1,21 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -1,13 +0,0 @@
|
||||
{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "oam-runtime.name" . }}-admission
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,69 +0,0 @@
|
||||
{{- if .Values.admissionWebhooks.enabled -}}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- if .Values.admissionWebhooks.certManager.enabled }}
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "oam-runtime.fullname" .) | quote }}
|
||||
{{- end }}
|
||||
webhooks:
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "oam-runtime.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutating-core-oam-dev-v1alpha2-applicationconfigurations
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: mutating.core.oam.dev.v1alpha2.applicationconfigurations
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- applicationconfigurations
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "oam-runtime.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutating-core-oam-dev-v1alpha2-components
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: Fail
|
||||
{{- end }}
|
||||
name: mutating.core.oam-dev.v1alpha2.components
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- components
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
|
||||
{{- end -}}
|
||||
@@ -1,69 +0,0 @@
|
||||
{{- if .Values.admissionWebhooks.enabled -}}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ template "oam-runtime.fullname" . }}-admission
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- if .Values.admissionWebhooks.certManager.enabled }}
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "oam-runtime.fullname" .) | quote }}
|
||||
{{- end }}
|
||||
webhooks:
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "oam-runtime.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validating-core-oam-dev-v1alpha2-applicationconfigurations
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }}
|
||||
{{- end }}
|
||||
name: validating.core.oam.dev.v1alpha2.applicationconfigurations
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- applicationconfigurations
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: {{ template "oam-runtime.name" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validating-core-oam-dev-v1alpha2-components
|
||||
{{- if .Values.admissionWebhooks.patch.enabled }}
|
||||
failurePolicy: Ignore
|
||||
{{- else }}
|
||||
failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }}
|
||||
{{- end }}
|
||||
name: validating.core.oam.dev.v1alpha2.components
|
||||
sideEffects: None
|
||||
rules:
|
||||
- apiGroups:
|
||||
- core.oam.dev
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- components
|
||||
scope: Namespaced
|
||||
admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
timeoutSeconds: 5
|
||||
|
||||
{{- end -}}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user