Compare commits
569
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08b6d43ac1 | ||
|
|
53b075a315 | ||
|
|
b8311d43ce | ||
|
|
1075c5da13 | ||
|
|
59c8569190 | ||
|
|
395a8adf37 | ||
|
|
d358a29b17 | ||
|
|
e253d2a376 | ||
|
|
bfd005a295 | ||
|
|
c1a3bdd895 | ||
|
|
b18462b10b | ||
|
|
30dba5dae9 | ||
|
|
f12880fb5c | ||
|
|
c61442ee76 | ||
|
|
96ae708163 | ||
|
|
b47b3ecb70 | ||
|
|
7cdc146515 | ||
|
|
e734fa3554 | ||
|
|
71b587b58e | ||
|
|
81ae6f38fc | ||
|
|
7fbb4098a4 | ||
|
|
f8af8b91f5 | ||
|
|
b5341edec0 | ||
|
|
49d60b19f3 | ||
|
|
82a7acf408 | ||
|
|
7bd57c208a | ||
|
|
27ec605955 | ||
|
|
c94e02b302 | ||
|
|
5d2d65f05c | ||
|
|
6d3d277cb9 | ||
|
|
4d654c6fe7 | ||
|
|
ecb97db913 | ||
|
|
082c244b0b | ||
|
|
678a2c7ad8 | ||
|
|
78026ac573 | ||
|
|
4cfd459317 | ||
|
|
e481c234ee | ||
|
|
0d872020e3 | ||
|
|
62016b2f83 | ||
|
|
58811ab522 | ||
|
|
19c60d1592 | ||
|
|
cd36047660 | ||
|
|
ef8289ff73 | ||
|
|
ff47a8c1ed | ||
|
|
86b506c9b6 | ||
|
|
e762471d78 | ||
|
|
1040a0d7e9 | ||
|
|
c49377569e | ||
|
|
560aa34ce2 | ||
|
|
ee18a88664 | ||
|
|
31b8c1ee3b | ||
|
|
97b9350651 | ||
|
|
b9997b2ece | ||
|
|
9c63975497 | ||
|
|
8cafe1ebf3 | ||
|
|
4dccfcc156 | ||
|
|
7af711a48b | ||
|
|
80910562b3 | ||
|
|
88b5343775 | ||
|
|
a6e75b4da6 | ||
|
|
8fb0e9e10c | ||
|
|
747d774a3c | ||
|
|
7bbcaf2174 | ||
|
|
ac21c037d6 | ||
|
|
3b47daa8fc | ||
|
|
dff08a0a8e | ||
|
|
74ad096158 | ||
|
|
be84f9ec93 | ||
|
|
6e440f11cd | ||
|
|
655a76447e | ||
|
|
dc0fc839ed | ||
|
|
efe1209550 | ||
|
|
93c5b53b77 | ||
|
|
1beaa9ec13 | ||
|
|
6e00733f68 | ||
|
|
3bffd27c74 | ||
|
|
971a314d63 | ||
|
|
40e1689e49 | ||
|
|
fe8fa94c77 | ||
|
|
a9dd4bf81a | ||
|
|
56beac6508 | ||
|
|
b0b29da388 | ||
|
|
c1cb9603a5 | ||
|
|
58722f849a | ||
|
|
9e7dd5aa27 | ||
|
|
9d13081803 | ||
|
|
78a774cfd9 | ||
|
|
9f51f9064d | ||
|
|
b229d6e1b0 | ||
|
|
2ba66afb9f | ||
|
|
36e544b537 | ||
|
|
5ec841cf2e | ||
|
|
981bb21756 | ||
|
|
a297a67385 | ||
|
|
5445b75af9 | ||
|
|
e189ac4fc2 | ||
|
|
4bc5d49792 | ||
|
|
3860039f9a | ||
|
|
cb8605cf60 | ||
|
|
4c4bb1bc2e | ||
|
|
a3fd606197 | ||
|
|
a473335ceb | ||
|
|
93d4f2c77a | ||
|
|
1562cba420 | ||
|
|
6bab9dcbaa | ||
|
|
1d266537b0 | ||
|
|
a0e9a39511 | ||
|
|
1c5fd92ad6 | ||
|
|
d578539391 | ||
|
|
49f9944b86 | ||
|
|
c3177f9ebd | ||
|
|
1e8dfa38da | ||
|
|
897771546b | ||
|
|
4632269314 | ||
|
|
56fa8fe766 | ||
|
|
09589ea9ef | ||
|
|
69de5e03d3 | ||
|
|
f8dfc75872 | ||
|
|
a2c276e0cd | ||
|
|
84da480ff4 | ||
|
|
c88033fc0b | ||
|
|
23f3585245 | ||
|
|
9a3cc517d0 | ||
|
|
3cbb02465b | ||
|
|
47c5cee459 | ||
|
|
1a5b0ec567 | ||
|
|
664ad5f26e | ||
|
|
8015ab9a1e | ||
|
|
85c1474c60 | ||
|
|
94046eeffd | ||
|
|
1662bafb50 | ||
|
|
913888a29d | ||
|
|
24600c20c5 | ||
|
|
b7a41cbd89 | ||
|
|
adceee1be0 | ||
|
|
cdcc6fb3ab | ||
|
|
3a8b9ccd80 | ||
|
|
c496d35d12 | ||
|
|
92d66fa82b | ||
|
|
4e4c8aa14f | ||
|
|
0fc864f230 | ||
|
|
c717f182b6 | ||
|
|
f104f0b46b | ||
|
|
38b8cfaa0a | ||
|
|
49e0c3587b | ||
|
|
f8ad9c421a | ||
|
|
3358fca753 | ||
|
|
d65a0cb9dc | ||
|
|
9ec0084c8b | ||
|
|
8e6ac31e49 | ||
|
|
5d2abdd95b | ||
|
|
8b0a201f69 | ||
|
|
1806259637 | ||
|
|
6893403ba7 | ||
|
|
f24b016346 | ||
|
|
b5b689973b | ||
|
|
101e188f41 | ||
|
|
5ff875b1ac | ||
|
|
1dbb4f4fb7 | ||
|
|
68a511184f | ||
|
|
2efa255eb4 | ||
|
|
3c4fdb0659 | ||
|
|
e4746007da | ||
|
|
5e1e8f85cd | ||
|
|
273c6c002f | ||
|
|
a21dbd182c | ||
|
|
0c3d7da5c8 | ||
|
|
db5165e032 | ||
|
|
89081b087b | ||
|
|
37f37c0b8b | ||
|
|
ad4c4cd014 | ||
|
|
16efdaa25c | ||
|
|
0651291e2d | ||
|
|
914a0c48d2 | ||
|
|
c0502c7b7c | ||
|
|
6cd7c4dff0 | ||
|
|
37846a5827 | ||
|
|
04e6433d5d | ||
|
|
f9f5fe436a | ||
|
|
f68572ce78 | ||
|
|
ecd99177bb | ||
|
|
3f4eb49c2f | ||
|
|
8e6f6ffda9 | ||
|
|
85f8dcc2b2 | ||
|
|
0a135173b4 | ||
|
|
34b9be0bd3 | ||
|
|
6f2d8f5372 | ||
|
|
045ab734c6 | ||
|
|
2699aa6069 | ||
|
|
f0c0936b87 | ||
|
|
314e16a88e | ||
|
|
72faa927de | ||
|
|
19b52938c3 | ||
|
|
7cedf8d580 | ||
|
|
17cbc5baad | ||
|
|
c2bcbb06a9 | ||
|
|
152c899e8b | ||
|
|
c476f54a6c | ||
|
|
4b5ab0ad93 | ||
|
|
82af0e554a | ||
|
|
b456dec138 | ||
|
|
4a8c200c37 | ||
|
|
52b736c892 | ||
|
|
d9eee058ce | ||
|
|
3676602fa2 | ||
|
|
4f3b7de04a | ||
|
|
cdf5838420 | ||
|
|
a714983c28 | ||
|
|
b9547160b5 | ||
|
|
bfa8e6a45f | ||
|
|
9764eff05d | ||
|
|
253e44fdbe | ||
|
|
585d86448f | ||
|
|
dad7b6632e | ||
|
|
4e9e025ca4 | ||
|
|
b6ea85e353 | ||
|
|
29aabaabda | ||
|
|
394c5b13f4 | ||
|
|
0a8c6e97a6 | ||
|
|
e7f1d4564a | ||
|
|
619b390af3 | ||
|
|
1488d0ca2d | ||
|
|
dd35750482 | ||
|
|
5aeba59b75 | ||
|
|
8329ef36b3 | ||
|
|
4cc42fb216 | ||
|
|
d23b210f4e | ||
|
|
803dbd6d39 | ||
|
|
e4213f6eb6 | ||
|
|
2d2576cf2d | ||
|
|
96cbee185d | ||
|
|
9f83d70b63 | ||
|
|
7deb45bed2 | ||
|
|
12d3a04bf9 | ||
|
|
fa565b75ae | ||
|
|
437d4dc04d | ||
|
|
188138ccd8 | ||
|
|
6b49c194ca | ||
|
|
a86c9431d3 | ||
|
|
6f60f3eef8 | ||
|
|
d18777bed4 | ||
|
|
82d23b9bf8 | ||
|
|
a4f58fbf10 | ||
|
|
2dbae32f20 | ||
|
|
21b0a1d852 | ||
|
|
f8535be7da | ||
|
|
95eef49cf8 | ||
|
|
2d01382a82 | ||
|
|
d443f8b2ef | ||
|
|
dffb5cdf8b | ||
|
|
5c1d8bc90c | ||
|
|
ad28922871 | ||
|
|
9d7355cbaa | ||
|
|
74a3a54543 | ||
|
|
07ca5df8d0 | ||
|
|
e730376e3e | ||
|
|
ee61c8c333 | ||
|
|
27b74a7cf2 | ||
|
|
088e665d28 | ||
|
|
9438f3c4ec | ||
|
|
b5a906b2f4 | ||
|
|
0e40cb5f4f | ||
|
|
1a1ac49ce0 | ||
|
|
4356378301 | ||
|
|
6123873d2a | ||
|
|
9a7ffc2f5b | ||
|
|
f3857abdf5 | ||
|
|
e977c7caca | ||
|
|
f40688435d | ||
|
|
e8b2a26a3b | ||
|
|
27c3a50d23 | ||
|
|
ec495fbd1d | ||
|
|
80fadcc7b8 | ||
|
|
4b37b9ac03 | ||
|
|
16d0f6a94f | ||
|
|
cc40d1ed2e | ||
|
|
425e447e5c | ||
|
|
3707b95edb | ||
|
|
2982efebb8 | ||
|
|
14db705891 | ||
|
|
9c885ef6f5 | ||
|
|
34e8d0ee3d | ||
|
|
728979636f | ||
|
|
462db2f00c | ||
|
|
2504408803 | ||
|
|
61569d1c38 | ||
|
|
5b6582698c | ||
|
|
81f0f1df6d | ||
|
|
44be0f6859 | ||
|
|
9daf97a9ab | ||
|
|
032d1a8b9a | ||
|
|
65fd1d9fbb | ||
|
|
a35cd7f4a4 | ||
|
|
74212f1810 | ||
|
|
1ed59f0789 | ||
|
|
71d8b769d5 | ||
|
|
c863616b38 | ||
|
|
09b62e514e | ||
|
|
c705ba355e | ||
|
|
7642dcf05f | ||
|
|
58a5f1cb0b | ||
|
|
1b86c367a0 | ||
|
|
6d08e6e0bc | ||
|
|
ef7d4ae385 | ||
|
|
cf1f944069 | ||
|
|
ddff7100e9 | ||
|
|
a5bc2a6d4c | ||
|
|
952b48bd68 | ||
|
|
2ad07d68b6 | ||
|
|
8c96d9c6a0 | ||
|
|
46d9808173 | ||
|
|
2e37611da8 | ||
|
|
0057270551 | ||
|
|
7a7d15b50c | ||
|
|
202cc3cb7e | ||
|
|
a761393816 | ||
|
|
fedf6b6e5b | ||
|
|
6eec55223d | ||
|
|
940b9adabd | ||
|
|
8984e4916e | ||
|
|
c9d2757760 | ||
|
|
d846aed612 | ||
|
|
d9b5b9b8a8 | ||
|
|
9c91f00cb4 | ||
|
|
0a648d1d75 | ||
|
|
6a3e326f36 | ||
|
|
f0dc2554a1 | ||
|
|
2ece0db13f | ||
|
|
0e3a270d27 | ||
|
|
6a7381c575 | ||
|
|
0aff2f214d | ||
|
|
dec4a39c15 | ||
|
|
7577339912 | ||
|
|
6375819195 | ||
|
|
0b34abcada | ||
|
|
772fdfa15c | ||
|
|
7198b24028 | ||
|
|
eb696432d8 | ||
|
|
2d359f879a | ||
|
|
94e2f11ea6 | ||
|
|
ff01cf2452 | ||
|
|
400e19a48f | ||
|
|
0194f53e12 | ||
|
|
fef1469c61 | ||
|
|
cf53e17be5 | ||
|
|
449f49515a | ||
|
|
d01b309fc7 | ||
|
|
12299df811 | ||
|
|
95a50dbbd6 | ||
|
|
8014c83b02 | ||
|
|
db2f620121 | ||
|
|
f9ca626940 | ||
|
|
1dbf8f9243 | ||
|
|
9406720e8a | ||
|
|
2a06705320 | ||
|
|
d39944e04d | ||
|
|
6f6b52438a | ||
|
|
5baf67f143 | ||
|
|
6d61f6e5eb | ||
|
|
6ab902e7a3 | ||
|
|
ed7d088bbc | ||
|
|
c0058153a0 | ||
|
|
a8482a8b89 | ||
|
|
a23f8acffc | ||
|
|
77be3379b2 | ||
|
|
03046170dc | ||
|
|
c0acaa74c3 | ||
|
|
8708fdec93 | ||
|
|
6b188c053a | ||
|
|
0fd6114218 | ||
|
|
9ae06f56c8 | ||
|
|
704a8094e6 | ||
|
|
6f54565195 | ||
|
|
90206fbaa0 | ||
|
|
8fb4aca231 | ||
|
|
70a93a7302 | ||
|
|
c76b6bacc0 | ||
|
|
15bedfb688 | ||
|
|
1447e6949d | ||
|
|
048ab6149a | ||
|
|
8a0abc59db | ||
|
|
039e003af6 | ||
|
|
1ea665386a | ||
|
|
e7c9a67a68 | ||
|
|
afd7f7f436 | ||
|
|
b4300feabc | ||
|
|
a3826046a5 | ||
|
|
d852ddd91c | ||
|
|
1edb9723e8 | ||
|
|
ca51a5fe4c | ||
|
|
714f32d290 | ||
|
|
7ddbea59a2 | ||
|
|
b895f98e88 | ||
|
|
1b1c4f1380 | ||
|
|
5e2f984136 | ||
|
|
23942fdf7d | ||
|
|
b9a559af2f | ||
|
|
1428c64b4f | ||
|
|
866e0288c9 | ||
|
|
f83512f176 | ||
|
|
bd609fa18e | ||
|
|
e5b137fe24 | ||
|
|
245506efe3 | ||
|
|
a1ed698fa8 | ||
|
|
9a21e14a84 | ||
|
|
f695a81c46 | ||
|
|
9e9a0c1ec6 | ||
|
|
281a492149 | ||
|
|
4d0e6af5de | ||
|
|
46895b03c8 | ||
|
|
d9b5c2e560 | ||
|
|
841c7ef845 | ||
|
|
7752abaf05 | ||
|
|
818876dd08 | ||
|
|
266922da26 | ||
|
|
a98370ca63 | ||
|
|
bce45d6d25 | ||
|
|
93dde93afe | ||
|
|
08898cdd17 | ||
|
|
2effade15d | ||
|
|
610790244b | ||
|
|
054f9bcd85 | ||
|
|
ebdb13f7d0 | ||
|
|
8ad365aaec | ||
|
|
982665f448 | ||
|
|
feaa6746c3 | ||
|
|
b61bf9324f | ||
|
|
b18c965860 | ||
|
|
8f19a9bedb | ||
|
|
1bf38cbca6 | ||
|
|
ce110a8dff | ||
|
|
802ae08adb | ||
|
|
77430f7438 | ||
|
|
3aaabc909b | ||
|
|
4e445bb3cc | ||
|
|
a5cb1d3e3d | ||
|
|
582c9808b5 | ||
|
|
398c58365a | ||
|
|
9deb4f53db | ||
|
|
3c513c7f61 | ||
|
|
c56ed598cb | ||
|
|
e6191e3c69 | ||
|
|
e7dbba634c | ||
|
|
a033d3c432 | ||
|
|
3f81510729 | ||
|
|
07c7b759d2 | ||
|
|
6af13e7e29 | ||
|
|
cc62e62229 | ||
|
|
1eb0453ce4 | ||
|
|
4cf195768e | ||
|
|
31ba992726 | ||
|
|
0c92f59c38 | ||
|
|
c00f76b561 | ||
|
|
91094cf659 | ||
|
|
1935098404 | ||
|
|
7d83859cfb | ||
|
|
986b300b8c | ||
|
|
4f7eb19b7c | ||
|
|
0a733b20c3 | ||
|
|
b7c97cec8c | ||
|
|
b578819202 | ||
|
|
01bcfad44a | ||
|
|
8df520721c | ||
|
|
db372c11eb | ||
|
|
6a1da19e73 | ||
|
|
816fd25a6c | ||
|
|
c03bb01bca | ||
|
|
bed189c715 | ||
|
|
80a4bcbcff | ||
|
|
f420383882 | ||
|
|
fac508c7e0 | ||
|
|
64a82747a9 | ||
|
|
5f9e54bbeb | ||
|
|
8d6b33258d | ||
|
|
be84a864fb | ||
|
|
dff34b08e9 | ||
|
|
1e6b7a4fc8 | ||
|
|
eed3018458 | ||
|
|
fa810e6f80 | ||
|
|
b1483e5e78 | ||
|
|
43fea01bd9 | ||
|
|
49169e672d | ||
|
|
140b132c8e | ||
|
|
36008f28d8 | ||
|
|
8fc1bf4bc1 | ||
|
|
2247d3118a | ||
|
|
04531850d5 | ||
|
|
13a58e715d | ||
|
|
b2678783b6 | ||
|
|
da820186f0 | ||
|
|
7bb397dfee | ||
|
|
8a097abf9b | ||
|
|
6d0ebfd881 | ||
|
|
310183a944 | ||
|
|
8fc3479428 | ||
|
|
b2883a30de | ||
|
|
8b40ad0b33 | ||
|
|
74e05ba3a1 | ||
|
|
e77a3946d7 | ||
|
|
bcf04b1a6c | ||
|
|
d8844ab13c | ||
|
|
2e63787b96 | ||
|
|
de19a42b8b | ||
|
|
da07b35a96 | ||
|
|
9694ba4fd1 | ||
|
|
3644760f19 | ||
|
|
b89576ff7d | ||
|
|
d4b4385596 | ||
|
|
b8eb27d276 | ||
|
|
a63b8b372f | ||
|
|
380b7d1bcd | ||
|
|
5f14b9b0ae | ||
|
|
746c51901d | ||
|
|
439e7d4535 | ||
|
|
8abb0005f6 | ||
|
|
c8f4647373 | ||
|
|
5c47073518 | ||
|
|
fd1461cc98 | ||
|
|
a25c167d23 | ||
|
|
e4d42797e6 | ||
|
|
6a394889f6 | ||
|
|
59c18693fa | ||
|
|
0537c4b805 | ||
|
|
6734bfbf7b | ||
|
|
557c2ee6fc | ||
|
|
52c77c5bf5 | ||
|
|
63a2cbb417 | ||
|
|
d2f4be7a44 | ||
|
|
33f967b61b | ||
|
|
3f58247b59 | ||
|
|
45756363bc | ||
|
|
e587eca08f | ||
|
|
a720377f3c | ||
|
|
42819ba362 | ||
|
|
e56e6482b3 | ||
|
|
0d252fabcd | ||
|
|
dedeef7077 | ||
|
|
7bd3f20ad6 | ||
|
|
dc1ffa859d | ||
|
|
c63a427ca3 | ||
|
|
e4a4ec4bff | ||
|
|
7190661360 | ||
|
|
67c38f2f29 | ||
|
|
23e20115da | ||
|
|
5072a13c7c | ||
|
|
9d8a46e847 | ||
|
|
dca2915a7e | ||
|
|
bc02d159f3 | ||
|
|
dc50ebb889 | ||
|
|
e68872ba84 | ||
|
|
4287d14000 | ||
|
|
787396e904 | ||
|
|
e7c8e5418b | ||
|
|
951468006d | ||
|
|
98c2a0863f | ||
|
|
12d3ad44ce | ||
|
|
04eef11fce | ||
|
|
12fce0baa5 | ||
|
|
cd73f3c6bb | ||
|
|
373716269b | ||
|
|
cb861e72a9 | ||
|
|
f2a9f8a938 | ||
|
|
3a0ebdd93b | ||
|
|
0b1b663f98 | ||
|
|
d590dcf4ef | ||
|
|
f2091d0d80 | ||
|
|
9d7bd49338 | ||
|
|
45c766061a | ||
|
|
6142ac3648 |
@@ -0,0 +1,14 @@
|
||||
ignore:
|
||||
- "charts"
|
||||
- "demos"
|
||||
- "Documentation"
|
||||
- "examples"
|
||||
- "test"
|
||||
- "tools"
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
threshold: 2
|
||||
# Disable patch coverage check since we focus on project coverage.
|
||||
patch: off
|
||||
@@ -0,0 +1,15 @@
|
||||
*.md
|
||||
*.sh
|
||||
Documentation
|
||||
charts
|
||||
examples
|
||||
environments/*
|
||||
!environments/fetcher
|
||||
demos
|
||||
test
|
||||
Makefile
|
||||
LICENSE
|
||||
glide.*
|
||||
.travis.yml
|
||||
.gitignore
|
||||
.git
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Please answer these questions before submitting your issue. Thanks! -->
|
||||
|
||||
<!-- Documentation URL: https://docs.fission.io/ -->
|
||||
<!-- Troubleshooting guide: https://docs.fission.io/trouble-shooting/ -->
|
||||
|
||||
**Fission/Kubernetes version**
|
||||
|
||||
<!-- If you tested with other services, for example Istio, please also provide the version of service as well. -->
|
||||
|
||||
<pre>
|
||||
$ fission --version
|
||||
$ kubectl version
|
||||
</pre>
|
||||
|
||||
**Kubernetes platform (e.g. Google Kubernetes Engine)**
|
||||
|
||||
**Describe the bug**
|
||||
<!--A clear and concise description of what the bug is.-->
|
||||
|
||||
**To Reproduce**
|
||||
|
||||
<!-- Please provide steps for reproducing the error. -->
|
||||
|
||||
**Expected result**
|
||||
<!--A clear and concise description of what you expected to happen.-->
|
||||
|
||||
**Actual result**
|
||||
|
||||
**Screenshots/Dump file**
|
||||
<!--If applicable, add screenshots/fission dump file to help explain your problem.-->
|
||||
|
||||
<pre>
|
||||
$ fission support dump
|
||||
</pre>
|
||||
|
||||
**Additional context**
|
||||
<!--Add any other context about the problem here.-->
|
||||
+23
-2
@@ -1,13 +1,34 @@
|
||||
fission-bundle/fission-bundle
|
||||
# Binaries
|
||||
cmd/fission-bundle/fission-bundle
|
||||
cmd/fission-cli/fission
|
||||
cmd/fission-cli/fission-cli
|
||||
cmd/fetcher/fetcher
|
||||
cmd/builder/builder
|
||||
cmd/preupgradechecks/pre-upgrade-checks
|
||||
|
||||
# Logs
|
||||
test/logs/
|
||||
|
||||
# Pycharm IDE
|
||||
.idea
|
||||
environments/php7/vendor/
|
||||
|
||||
# terraform files
|
||||
.terraform/
|
||||
*.tfstate
|
||||
*.backup
|
||||
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
*.tgz
|
||||
|
||||
.DS_Store
|
||||
vendor/
|
||||
local/
|
||||
local/
|
||||
environments/dotnet20/Builder/.vs/
|
||||
environments/dotnet20/.vs/
|
||||
environments/dotnet20/obj/
|
||||
environments/dotnet20/bin/
|
||||
|
||||
+37
-10
@@ -2,33 +2,60 @@ sudo: required
|
||||
|
||||
dist: trusty
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.8
|
||||
- 1.12.x
|
||||
|
||||
env:
|
||||
- KUBECONFIG=${HOME}/.kube/config PATH=$HOME/k8scli:$HOME/tool:$HOME/google-cloud-sdk/bin:${PATH} GO111MODULE=on DOCKER_CACHE_DIR=${HOME}/docker/
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/google-cloud-sdk/
|
||||
- $HOME/k8scli
|
||||
- $HOME/tool
|
||||
- $HOME/.cache/go-build
|
||||
- $HOME/gopath/pkg/mod
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
# - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
||||
- sudo apt-get -y install apache2-utils parallel realpath
|
||||
- sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
|
||||
install:
|
||||
- go get github.com/Masterminds/glide
|
||||
- hack/travis-kube-setup.sh
|
||||
|
||||
env:
|
||||
- KUBECONFIG=${HOME}/.kube/config PATH=$HOME/k8scli:${PATH}
|
||||
before_script:
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
- go mod download
|
||||
- hack/verify-staticcheck.sh
|
||||
- hack/verify-gofmt.sh
|
||||
- hack/verify-govet.sh
|
||||
- helm lint charts/fission-all/ charts/fission-core/
|
||||
- hack/runtests.sh
|
||||
- test/build.sh
|
||||
|
||||
script:
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
- glide install
|
||||
- ./fission-bundle/build.sh
|
||||
- hack/verify-gofmt.sh
|
||||
- hack/runtests.sh
|
||||
- test/build_and_test.sh
|
||||
- test/test.sh
|
||||
- test/upgrade/fission_upgrade_test.sh
|
||||
|
||||
after_script:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- kubectl --namespace default delete configmap -l travisID=${TRAVIS_BUILD_ID} # remove in-test configmap to indicate this CI build finished
|
||||
|
||||
notifications:
|
||||
slack:
|
||||
secure: YZ34vsfw1TtftJypg1MyP4+ihONI4gaxeS3FghBQli6+EezjzcxOXyj5VD+x0ucXfDeTaDrFfmVN0SAGObOoZUE+ea9KAoTo50tRLaD9kwOTACiekZalC4uuBguH0D1/A6vlbU8dchsr9mvIhbisG6mTncdPtqGYYHtyBQme6ngmmHbVAQFZcIBHmNuDb/HWhSr8KMEuyB6+mBXLYELHnXnf26cOhdGNaagqCOJTiemX85RGwIuOPxyBhKDFMLyHohDT7FJMH/qijveE6YgOYTQC5nYc2Np1KvC7hQkIu4nuyczyYlrNQl/TWv+SVI8PjIs0PYuCuD3gUqoVEi8d94HbrOPzFEpbwDS9P4qL39DGmco1Q56Vqxe6sRI0vDWPb5gCP1lSgs3PMECVn7Wor/pTvcL+C+U2jLwWJUl0vbyWCL7ngl/3iTssV7qBpUrI7Oclwp8LrQo9fPj0DL4gE9rNanpEWjQ6yPGaysIL1zLHtRghhm52A22NJGp71jkS2KEpLi6ZWFYjMeuXw5eOQFhqFlzyRJOmLYa3B607TLWuyo2L2CxAfMmq0FGfemvrkLZIWtlQKK4y9ImpsURwaGT2XCtThFtHl77wEss913nC+T2dX3O5Bl0UmxFd5S3mVM109I8c4lDosxnAjRfS9MheFlrG0gjSJSBCw57x7f0=
|
||||
rooms:
|
||||
secure: YZ34vsfw1TtftJypg1MyP4+ihONI4gaxeS3FghBQli6+EezjzcxOXyj5VD+x0ucXfDeTaDrFfmVN0SAGObOoZUE+ea9KAoTo50tRLaD9kwOTACiekZalC4uuBguH0D1/A6vlbU8dchsr9mvIhbisG6mTncdPtqGYYHtyBQme6ngmmHbVAQFZcIBHmNuDb/HWhSr8KMEuyB6+mBXLYELHnXnf26cOhdGNaagqCOJTiemX85RGwIuOPxyBhKDFMLyHohDT7FJMH/qijveE6YgOYTQC5nYc2Np1KvC7hQkIu4nuyczyYlrNQl/TWv+SVI8PjIs0PYuCuD3gUqoVEi8d94HbrOPzFEpbwDS9P4qL39DGmco1Q56Vqxe6sRI0vDWPb5gCP1lSgs3PMECVn7Wor/pTvcL+C+U2jLwWJUl0vbyWCL7ngl/3iTssV7qBpUrI7Oclwp8LrQo9fPj0DL4gE9rNanpEWjQ6yPGaysIL1zLHtRghhm52A22NJGp71jkS2KEpLi6ZWFYjMeuXw5eOQFhqFlzyRJOmLYa3B607TLWuyo2L2CxAfMmq0FGfemvrkLZIWtlQKK4y9ImpsURwaGT2XCtThFtHl77wEss913nC+T2dX3O5Bl0UmxFd5S3mVM109I8c4lDosxnAjRfS9MheFlrG0gjSJSBCw57x7f0=
|
||||
on_success: change
|
||||
on_failure: always
|
||||
|
||||
+851
@@ -0,0 +1,851 @@
|
||||
# 1.5.0
|
||||
[Documentation](https://docs.fission.io/)
|
||||
## Downloads for 1.5.0
|
||||
|
||||
|
||||
filename | sha256 hash
|
||||
-------- | -----------
|
||||
[fission-core-1.5.0-minikube.yaml](https://github.com/fission/fission/releases/download/1.5.0/fission-core-1.5.0-minikube.yaml) | `bf804e8106f034b2cb5f7d577ca11a9267db43c4ce9c937af879b8a8f35f422a`
|
||||
[fission-all-1.5.0-minikube.yaml](https://github.com/fission/fission/releases/download/1.5.0/fission-all-1.5.0-minikube.yaml) | `fc526cde3f18d1cf5a86fa5f3612e0120cb1a0544012ec02292a666d9aed840b`
|
||||
[fission-all-1.5.0.yaml](https://github.com/fission/fission/releases/download/1.5.0/fission-all-1.5.0.yaml) | `c67b40869823f2ac436a02bb6d15dc68f531c1032c6af3bfdd4cee2a9d43399d`
|
||||
[fission-core-1.5.0.yaml](https://github.com/fission/fission/releases/download/1.5.0/fission-core-1.5.0.yaml) | `b15a1771955700c33abf63fe523d2c3393186a4d0f456b5a274aa1434cf7ba3b`
|
||||
[fission-all-1.5.0.tgz](https://github.com/fission/fission/releases/download/1.5.0/fission-all-1.5.0.tgz) | `07e6430f73d1eee0dfb4bd558bc05d51d828332ce2ec7d5b25a0b3722c175bc1`
|
||||
[fission-core-1.5.0.tgz](https://github.com/fission/fission/releases/download/1.5.0/fission-core-1.5.0.tgz) | `d13ac896f0ef480ede0cd505f3dd55370e2f16ed5dc1b5ad3bc67a2e06623aac`
|
||||
[fission-cli-osx](https://github.com/fission/fission/releases/download/1.5.0/fission-cli-osx) | `e3415e4c64d404b4065c420d7b62bf1b702e08b40b6018672545f2f2637a2d04`
|
||||
[fission-cli-windows.exe](https://github.com/fission/fission/releases/download/1.5.0/fission-cli-windows.exe) | `b539ab484fac6f7a9b513df1f652fc93f5a39cf9a44237c0ba7457b863a05c36`
|
||||
[fission-cli-linux](https://github.com/fission/fission/releases/download/1.5.0/fission-cli-linux) | `d399aa01dac007a69c74be99944767e76321b067d29be64edd73b45d2a23d002`
|
||||
|
||||
# Change Log
|
||||
|
||||
## [1.5.0](https://github.com/fission/fission/tree/1.5.0) (2019-09-09)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.4.1...1.5.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Refactor support dump CLI [\#1301](https://github.com/fission/fission/pull/1301) ([life1347](https://github.com/life1347))
|
||||
- \[fission-cli\]\[feature\] support reverse query function for query log [\#1298](https://github.com/fission/fission/pull/1298) ([moluzhang](https://github.com/moluzhang))
|
||||
- Fix unit tests failure [\#1297](https://github.com/fission/fission/pull/1297) ([life1347](https://github.com/life1347))
|
||||
- Support nodejs function with 0 argument [\#1295](https://github.com/fission/fission/pull/1295) ([life1347](https://github.com/life1347))
|
||||
- Update go environment errors for specializeHandlerV2 [\#1294](https://github.com/fission/fission/pull/1294) ([e-nikolov](https://github.com/e-nikolov))
|
||||
- Add troubleshooting guide link [\#1292](https://github.com/fission/fission/pull/1292) ([life1347](https://github.com/life1347))
|
||||
- Bump nokogiri from 1.10.1 to 1.10.4 in /examples/ruby/parse [\#1291](https://github.com/fission/fission/pull/1291) ([dependabot[bot]](https://github.com/apps/dependabot))
|
||||
- Bump Go version to 1.12 [\#1290](https://github.com/fission/fission/pull/1290) ([life1347](https://github.com/life1347))
|
||||
- Fix typo extraCoreComponmentPodConfig -\> extraCoreComponentPodConfig [\#1287](https://github.com/fission/fission/pull/1287) ([life1347](https://github.com/life1347))
|
||||
- Improve CI integration test script [\#1285](https://github.com/fission/fission/pull/1285) ([life1347](https://github.com/life1347))
|
||||
- support for providing multiple CMs and secrets in fn create [\#1282](https://github.com/fission/fission/pull/1282) ([viveksinghggits](https://github.com/viveksinghggits))
|
||||
- Fix typo "consumer" =\> "producer" [\#1278](https://github.com/fission/fission/pull/1278) ([vadasambar](https://github.com/vadasambar))
|
||||
- Fix go 1.9.2 & 1.11.4 shows "go mod not found" [\#1276](https://github.com/fission/fission/pull/1276) ([life1347](https://github.com/life1347))
|
||||
- Fix typo "specialing" -\> "specializing" [\#1275](https://github.com/fission/fission/pull/1275) ([vadasambar](https://github.com/vadasambar))
|
||||
- Added community meetings and some other changes [\#1273](https://github.com/fission/fission/pull/1273) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- fix a panic bug caused by err.Error\(\) [\#1271](https://github.com/fission/fission/pull/1271) ([cocoifly10](https://github.com/cocoifly10))
|
||||
- Use fuzzy version for openJDK dependency [\#1269](https://github.com/fission/fission/pull/1269) ([life1347](https://github.com/life1347))
|
||||
- Set full URL path to request header [\#1266](https://github.com/fission/fission/pull/1266) ([life1347](https://github.com/life1347))
|
||||
- Refactor environment CLI command [\#1265](https://github.com/fission/fission/pull/1265) ([life1347](https://github.com/life1347))
|
||||
- Added correct imagePullPolicy [\#1263](https://github.com/fission/fission/pull/1263) ([msshroff](https://github.com/msshroff))
|
||||
- Make NewDeployment wait timeout configurable [\#1260](https://github.com/fission/fission/pull/1260) ([vadasambar](https://github.com/vadasambar))
|
||||
- Issue \#1258: Allow empty repository tag in chart values.yaml [\#1259](https://github.com/fission/fission/pull/1259) ([parauliya](https://github.com/parauliya))
|
||||
- Fix release script tags wrong image name [\#1257](https://github.com/fission/fission/pull/1257) ([life1347](https://github.com/life1347))
|
||||
- Update tensorflow serving image name in env README [\#1256](https://github.com/fission/fission/pull/1256) ([life1347](https://github.com/life1347))
|
||||
- V1.4.1 [\#1255](https://github.com/fission/fission/pull/1255) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix environment version validation [\#1253](https://github.com/fission/fission/pull/1253) ([davidsmf](https://github.com/davidsmf))
|
||||
- Allow to set deployment config uid during initialization [\#1249](https://github.com/fission/fission/pull/1249) ([life1347](https://github.com/life1347))
|
||||
- Add swagger \(OpenAPI 2.0\) support [\#1245](https://github.com/fission/fission/pull/1245) ([life1347](https://github.com/life1347))
|
||||
- Update go dependencies [\#1240](https://github.com/fission/fission/pull/1240) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [1.4.1](https://github.com/fission/fission/tree/1.4.1) (2019-07-29)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.4.0...1.4.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fix wrongly replace spec api version [\#1254](https://github.com/fission/fission/pull/1254) ([life1347](https://github.com/life1347))
|
||||
- Revert change of product name in README [\#1250](https://github.com/fission/fission/pull/1250) ([davidsmf](https://github.com/davidsmf))
|
||||
- Analytics env fix in chart [\#1247](https://github.com/fission/fission/pull/1247) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix CI unable to start test due to the same travis build ID [\#1246](https://github.com/fission/fission/pull/1246) ([life1347](https://github.com/life1347))
|
||||
- V1.4.0 [\#1244](https://github.com/fission/fission/pull/1244) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [1.4.0](https://github.com/fission/fission/tree/1.4.0) (2019-07-24)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.3.0...1.4.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Update flask version to resolve CVE alert [\#1243](https://github.com/fission/fission/pull/1243) ([life1347](https://github.com/life1347))
|
||||
- Fix typo where "spec" is spelt "sepc" in some dump directories. [\#1239](https://github.com/fission/fission/pull/1239) ([davidsmf](https://github.com/davidsmf))
|
||||
- Fix fetcher client doesn't handle error properly [\#1238](https://github.com/fission/fission/pull/1238) ([life1347](https://github.com/life1347))
|
||||
- Fix build failed due to script unable to find configmap [\#1237](https://github.com/fission/fission/pull/1237) ([life1347](https://github.com/life1347))
|
||||
- Enable concurrent CI builds [\#1236](https://github.com/fission/fission/pull/1236) ([life1347](https://github.com/life1347))
|
||||
- Change log-level for better performance and less annoying logs [\#1231](https://github.com/fission/fission/pull/1231) ([life1347](https://github.com/life1347))
|
||||
- Replace localhost with 127.0.0.1 to prevent DNS resolving problem [\#1227](https://github.com/fission/fission/pull/1227) ([life1347](https://github.com/life1347))
|
||||
- Fix release script wrongly tags builder as env image [\#1226](https://github.com/fission/fission/pull/1226) ([life1347](https://github.com/life1347))
|
||||
- Make router keep-alive setting configurable [\#1225](https://github.com/fission/fission/pull/1225) ([life1347](https://github.com/life1347))
|
||||
- Function Update if config/secret changes [\#1224](https://github.com/fission/fission/pull/1224) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix nil pointer when CLI unable to get server version [\#1223](https://github.com/fission/fission/pull/1223) ([life1347](https://github.com/life1347))
|
||||
- Reuse go docker build cache [\#1218](https://github.com/fission/fission/pull/1218) ([life1347](https://github.com/life1347))
|
||||
- Allow to set log level through environment variable [\#1217](https://github.com/fission/fission/pull/1217) ([life1347](https://github.com/life1347))
|
||||
- Fix roundtripper doesn't increase request timeout setting after each retry [\#1216](https://github.com/fission/fission/pull/1216) ([life1347](https://github.com/life1347))
|
||||
- Configmaps/secrets in function exist check [\#1214](https://github.com/fission/fission/pull/1214) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add experimental environment: tensorflow-serving [\#1212](https://github.com/fission/fission/pull/1212) ([life1347](https://github.com/life1347))
|
||||
- Fix executor panic problem when specialization timeout [\#1211](https://github.com/fission/fission/pull/1211) ([life1347](https://github.com/life1347))
|
||||
- Fix fetcher of newdeploy pod error out when starting up. [\#1210](https://github.com/fission/fission/pull/1210) ([life1347](https://github.com/life1347))
|
||||
- Fix Istio-proxy cannot collect HTTP-level information [\#1209](https://github.com/fission/fission/pull/1209) ([life1347](https://github.com/life1347))
|
||||
- Fix poolmanager specializes a function pod repeatedly if istio is enabled [\#1208](https://github.com/fission/fission/pull/1208) ([life1347](https://github.com/life1347))
|
||||
- Reuse docker maven build cache in JVM environment build process [\#1207](https://github.com/fission/fission/pull/1207) ([life1347](https://github.com/life1347))
|
||||
- modify code to make log collection comprehensive [\#1206](https://github.com/fission/fission/pull/1206) ([cocoifly10](https://github.com/cocoifly10))
|
||||
- Fallback to get user home directory from env [\#1203](https://github.com/fission/fission/pull/1203) ([life1347](https://github.com/life1347))
|
||||
- Fission v1.3.0 [\#1202](https://github.com/fission/fission/pull/1202) ([life1347](https://github.com/life1347))
|
||||
- \[bugfix\] Fix CLI drops controller URL path when querying logs [\#1201](https://github.com/fission/fission/pull/1201) ([moluzhang](https://github.com/moluzhang))
|
||||
- Enable go module support for go environment [\#1152](https://github.com/fission/fission/pull/1152) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [1.3.0](https://github.com/fission/fission/tree/1.3.0) (2019-06-03)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.2.1...1.3.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Check fission CLI & server git commit SHA before test [\#1200](https://github.com/fission/fission/pull/1200) ([life1347](https://github.com/life1347))
|
||||
- Add readiness/liveness probes to nat-streaming [\#1199](https://github.com/fission/fission/pull/1199) ([life1347](https://github.com/life1347))
|
||||
- Update bug issue templates [\#1198](https://github.com/fission/fission/pull/1198) ([life1347](https://github.com/life1347))
|
||||
- Add static code analysis to CI test [\#1197](https://github.com/fission/fission/pull/1197) ([life1347](https://github.com/life1347))
|
||||
- Analytics bugfix [\#1195](https://github.com/fission/fission/pull/1195) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add Terraform configuration and upgrade helm version [\#1194](https://github.com/fission/fission/pull/1194) ([darkgerm](https://github.com/darkgerm))
|
||||
- Show warning message if spec alters poolsize while env version \< 3 [\#1193](https://github.com/fission/fission/pull/1193) ([life1347](https://github.com/life1347))
|
||||
- Move packages to proejct/pkg to follow go project folder structure convention [\#1190](https://github.com/fission/fission/pull/1190) ([life1347](https://github.com/life1347))
|
||||
- router analytics -- close http response body [\#1180](https://github.com/fission/fission/pull/1180) ([soamvasani](https://github.com/soamvasani))
|
||||
- Remove prometheus server connectivity test during controller initialization [\#1179](https://github.com/fission/fission/pull/1179) ([life1347](https://github.com/life1347))
|
||||
- V1.2.1 [\#1178](https://github.com/fission/fission/pull/1178) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Skaffold for Fission [\#1172](https://github.com/fission/fission/pull/1172) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add affinity support [\#1170](https://github.com/fission/fission/pull/1170) ([laurence-hudson-mindfoundry](https://github.com/laurence-hudson-mindfoundry))
|
||||
- Refactor test framework [\#1128](https://github.com/fission/fission/pull/1128) ([darkgerm](https://github.com/darkgerm))
|
||||
- Pod specs [\#1106](https://github.com/fission/fission/pull/1106) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Allow non-toplevel modules in python environment [\#1042](https://github.com/fission/fission/pull/1042) ([soamvasani](https://github.com/soamvasani))
|
||||
- Created dotnet2.0 Builder Image and Added /v2/specialized Endpoint to dotnet2.0 Envrionment [\#1001](https://github.com/fission/fission/pull/1001) ([paraspatidar](https://github.com/paraspatidar))
|
||||
|
||||
## [1.2.1](https://github.com/fission/fission/tree/1.2.1) (2019-05-09)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.2.0...1.2.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fix dotnet example [\#1175](https://github.com/fission/fission/pull/1175) ([CanerPatir](https://github.com/CanerPatir))
|
||||
- V1.2.0 [\#1171](https://github.com/fission/fission/pull/1171) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fixes broken config path for functions [\#1177](https://github.com/fission/fission/pull/1177) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [1.2.0](https://github.com/fission/fission/tree/1.2.0) (2019-05-03)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.1.0...1.2.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- DRY up fetcher configuration [\#1168](https://github.com/fission/fission/pull/1168) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add simple anonymous usage metrics [\#1167](https://github.com/fission/fission/pull/1167) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fix the logger not working [\#1166](https://github.com/fission/fission/pull/1166) ([darkgerm](https://github.com/darkgerm))
|
||||
- Change log level in executor for better log reading/troubleshooting [\#1163](https://github.com/fission/fission/pull/1163) ([life1347](https://github.com/life1347))
|
||||
- Fix TravisCI go environment version to avoid go bugs [\#1154](https://github.com/fission/fission/pull/1154) ([life1347](https://github.com/life1347))
|
||||
- \#1132 nodejs environment, increase body size [\#1149](https://github.com/fission/fission/pull/1149) ([JannikZed](https://github.com/JannikZed))
|
||||
- Added php builder to release script fixes \#1140 [\#1145](https://github.com/fission/fission/pull/1145) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Using templated imagePullPolicy for containers in deployment.yaml [\#1137](https://github.com/fission/fission/pull/1137) ([msshroff](https://github.com/msshroff))
|
||||
- Migrate from glide to official dependencies management tool: Go Module [\#1136](https://github.com/fission/fission/pull/1136) ([life1347](https://github.com/life1347))
|
||||
- Fix misleading log when setup portforward [\#1134](https://github.com/fission/fission/pull/1134) ([life1347](https://github.com/life1347))
|
||||
- V1.1.0 [\#1129](https://github.com/fission/fission/pull/1129) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- support KUBECONFIG with multiple kube config files [\#1126](https://github.com/fission/fission/pull/1126) ([grounded042](https://github.com/grounded042))
|
||||
- Function update after change in env [\#1116](https://github.com/fission/fission/pull/1116) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add configurable timeout to fission function test [\#1091](https://github.com/fission/fission/pull/1091) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Add links to examples for each Fission environment [\#1090](https://github.com/fission/fission/pull/1090) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
|
||||
## [1.1.0](https://github.com/fission/fission/tree/1.1.0) (2019-03-25)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.0.0...1.1.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Add connection lost handler for NATS-streaming [\#1125](https://github.com/fission/fission/pull/1125) ([life1347](https://github.com/life1347))
|
||||
- Change RBAC api version to v1 [\#1124](https://github.com/fission/fission/pull/1124) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Configurable zero pool size in case of newdeploy function [\#1121](https://github.com/fission/fission/pull/1121) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- use zap for logging [\#1112](https://github.com/fission/fission/pull/1112) ([grounded042](https://github.com/grounded042))
|
||||
- Support --plugin parameter in Fission CLI [\#1111](https://github.com/fission/fission/pull/1111) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- PHP 7.3 v2 Specialization [\#1110](https://github.com/fission/fission/pull/1110) ([AlbertoLopezBenito](https://github.com/AlbertoLopezBenito))
|
||||
- Fix canary config manager creation error in controller [\#1105](https://github.com/fission/fission/pull/1105) ([life1347](https://github.com/life1347))
|
||||
- Python examples: Added a minimal 'getting started' [\#1103](https://github.com/fission/fission/pull/1103) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Added support for Ruby v2 Specialization [\#1101](https://github.com/fission/fission/pull/1101) ([brendanstennett](https://github.com/brendanstennett))
|
||||
- V1.0.0 [\#1100](https://github.com/fission/fission/pull/1100) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Adding annotations for prometheus scraping to fission-core [\#1098](https://github.com/fission/fission/pull/1098) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Switch from fluentd to fluentbit for log forwarding [\#1086](https://github.com/fission/fission/pull/1086) ([soamvasani](https://github.com/soamvasani))
|
||||
- Added draft proposal for CI/CD [\#1084](https://github.com/fission/fission/pull/1084) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- \[Kafka MQT\] Add warning about Kafka version [\#1083](https://github.com/fission/fission/pull/1083) ([bhavin192](https://github.com/bhavin192))
|
||||
- Bump base image version of Go environment to 1.11.4 [\#1026](https://github.com/fission/fission/pull/1026) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [1.0.0](https://github.com/fission/fission/tree/1.0.0) (2019-02-13)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.0...1.0.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- V1.0 [\#1094](https://github.com/fission/fission/pull/1094) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [1.0](https://github.com/fission/fission/tree/1.0) (2019-02-08)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.0-rc2...1.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fix unable to update the function value of route [\#1081](https://github.com/fission/fission/pull/1081) ([darkgerm](https://github.com/darkgerm))
|
||||
- Consider Pod Phase in IsReadyPod [\#1080](https://github.com/fission/fission/pull/1080) ([bhavin192](https://github.com/bhavin192))
|
||||
- Spec archive optimisation [\#1068](https://github.com/fission/fission/pull/1068) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix helm charts blank line [\#1065](https://github.com/fission/fission/pull/1065) ([darkgerm](https://github.com/darkgerm))
|
||||
- Update helm charts README [\#1064](https://github.com/fission/fission/pull/1064) ([darkgerm](https://github.com/darkgerm))
|
||||
- Make extra configuration a sub heading [\#1062](https://github.com/fission/fission/pull/1062) ([bhavin192](https://github.com/bhavin192))
|
||||
- Remove/Redirect out-of-date docs to fission doc site [\#1061](https://github.com/fission/fission/pull/1061) ([life1347](https://github.com/life1347))
|
||||
- V1.0 rc2 [\#1056](https://github.com/fission/fission/pull/1056) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Mac test utility [\#986](https://github.com/fission/fission/pull/986) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix executor tries to create same name deployment [\#1082](https://github.com/fission/fission/pull/1082) ([life1347](https://github.com/life1347))
|
||||
- OpenTracing for Fission [\#1079](https://github.com/fission/fission/pull/1079) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix fluentd plugin version to prevent version incompatible problem [\#1076](https://github.com/fission/fission/pull/1076) ([life1347](https://github.com/life1347))
|
||||
- Clear message in case of function/pod failure [\#1069](https://github.com/fission/fission/pull/1069) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Adding check for requirements file [\#1067](https://github.com/fission/fission/pull/1067) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix threads change value of http.DefaultTransport in router [\#1063](https://github.com/fission/fission/pull/1063) ([life1347](https://github.com/life1347))
|
||||
- Bumped up default CPU for fetcher, fixes \#1058 [\#1059](https://github.com/fission/fission/pull/1059) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Replace router svcAddrUpdateLocks with new throttler package for code readability&reusability [\#1047](https://github.com/fission/fission/pull/1047) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [1.0-rc2](https://github.com/fission/fission/tree/1.0-rc2) (2019-01-14)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/1.0-rc1...1.0-rc2)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- solve kubernetes/client-go nested vendor [\#1048](https://github.com/fission/fission/pull/1048) ([yesqiao](https://github.com/yesqiao))
|
||||
- Include All Currently Supported Trigger Types [\#1043](https://github.com/fission/fission/pull/1043) ([gravypod](https://github.com/gravypod))
|
||||
- Update dotnet and perl environment docs for rebuilding env images [\#1035](https://github.com/fission/fission/pull/1035) ([life1347](https://github.com/life1347))
|
||||
- \[python-env\] PEP8 Fixes for server.py [\#1034](https://github.com/fission/fission/pull/1034) ([bhavin192](https://github.com/bhavin192))
|
||||
- Fix builder not using latest image during CI build [\#1033](https://github.com/fission/fission/pull/1033) ([life1347](https://github.com/life1347))
|
||||
- Add link to values.yaml in charts' README.md [\#1023](https://github.com/fission/fission/pull/1023) ([bhavin192](https://github.com/bhavin192))
|
||||
- V1.0 rc1 [\#1022](https://github.com/fission/fission/pull/1022) ([life1347](https://github.com/life1347))
|
||||
- Draft proposal for annotations [\#992](https://github.com/fission/fission/pull/992) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Refactor RoundTrip function for code reading [\#991](https://github.com/fission/fission/pull/991) ([life1347](https://github.com/life1347))
|
||||
- Changed Kafka topic name validation [\#1051](https://github.com/fission/fission/pull/1051) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Makes router URL for Kafka trigger configurable [\#1045](https://github.com/fission/fission/pull/1045) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- New deploy should clean up objects it created if there are errors [\#1040](https://github.com/fission/fission/pull/1040) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix cli create archive with nonexistent file [\#1036](https://github.com/fission/fission/pull/1036) ([life1347](https://github.com/life1347))
|
||||
- Use Header.Set\(\) to override the existing header value [\#1032](https://github.com/fission/fission/pull/1032) ([life1347](https://github.com/life1347))
|
||||
- Fix go env panic when trying to load plugin and failed [\#1031](https://github.com/fission/fission/pull/1031) ([life1347](https://github.com/life1347))
|
||||
- Fix builder shows "http: multiple response.WriteHeader calls" [\#1029](https://github.com/fission/fission/pull/1029) ([life1347](https://github.com/life1347))
|
||||
- Add support for Kafka record headers [\#1025](https://github.com/fission/fission/pull/1025) ([bhavin192](https://github.com/bhavin192))
|
||||
- Fix requests are sent to unready function pod \(newdeploy\) [\#1005](https://github.com/fission/fission/pull/1005) ([life1347](https://github.com/life1347))
|
||||
- Send the error message to user when enabling canary feature fails. [\#990](https://github.com/fission/fission/pull/990) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Add fluentd.conf as a configmap [\#792](https://github.com/fission/fission/pull/792) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
|
||||
## [1.0-rc1](https://github.com/fission/fission/tree/1.0-rc1) (2018-12-11)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.12.0...1.0-rc1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Use executor type as a delimiter to prevent deploy name conflict [\#1009](https://github.com/fission/fission/pull/1009) ([life1347](https://github.com/life1347))
|
||||
- Upgrade environment dependencies for security alert [\#1006](https://github.com/fission/fission/pull/1006) ([life1347](https://github.com/life1347))
|
||||
- Rename canary flag name from funcN/funcN-1 to newfunc/oldfunc [\#1003](https://github.com/fission/fission/pull/1003) ([life1347](https://github.com/life1347))
|
||||
- Alpine OpenJDK not available anymore [\#985](https://github.com/fission/fission/pull/985) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Show builder image when list all envs [\#971](https://github.com/fission/fission/pull/971) ([life1347](https://github.com/life1347))
|
||||
- V0.12.0 [\#967](https://github.com/fission/fission/pull/967) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Updating the compile documentation link [\#965](https://github.com/fission/fission/pull/965) ([gguttikonda](https://github.com/gguttikonda))
|
||||
- Specs for JVM example [\#825](https://github.com/fission/fission/pull/825) ([soamvasani](https://github.com/soamvasani))
|
||||
- handle duplicate archive and package specs; handle multifile archives better [\#1018](https://github.com/fission/fission/pull/1018) ([soamvasani](https://github.com/soamvasani))
|
||||
- Validate command flag input by adding cli hook [\#1017](https://github.com/fission/fission/pull/1017) ([life1347](https://github.com/life1347))
|
||||
- Fix MQ trigger \(NATS\) wrongly sends error message to response topic [\#1002](https://github.com/fission/fission/pull/1002) ([life1347](https://github.com/life1347))
|
||||
- Added warning to fix \#946 [\#996](https://github.com/fission/fission/pull/996) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Package info error should warn user if package does not exist [\#995](https://github.com/fission/fission/pull/995) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix newdeploy re-creates deployment when only minscale changed [\#988](https://github.com/fission/fission/pull/988) ([life1347](https://github.com/life1347))
|
||||
- Fix release script failed to generate yaml for nonhelm installation [\#978](https://github.com/fission/fission/pull/978) ([life1347](https://github.com/life1347))
|
||||
- Fix the analytics jobs in the YAMLs \(remove duplicates\) [\#977](https://github.com/fission/fission/pull/977) ([soamvasani](https://github.com/soamvasani))
|
||||
- Pre-create kubernetes resources for function with minScale=0 [\#976](https://github.com/fission/fission/pull/976) ([life1347](https://github.com/life1347))
|
||||
- Shorten poolmgr deployment name [\#975](https://github.com/fission/fission/pull/975) ([life1347](https://github.com/life1347))
|
||||
- Fix issues when specifying resources/scales during updating/creation process [\#970](https://github.com/fission/fission/pull/970) ([life1347](https://github.com/life1347))
|
||||
- Properly render Helm charts [\#969](https://github.com/fission/fission/pull/969) ([sdake](https://github.com/sdake))
|
||||
- Fix CLI not shows package name when creating a function [\#966](https://github.com/fission/fission/pull/966) ([life1347](https://github.com/life1347))
|
||||
- Fix Read on Closed body error [\#963](https://github.com/fission/fission/pull/963) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Archive package user experience [\#927](https://github.com/fission/fission/pull/927) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [0.12.0](https://github.com/fission/fission/tree/0.12.0) (2018-11-01)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.11.0...0.12.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Update formatting directive logic to unbreak tests [\#999](https://github.com/fission/fission/pull/999) ([life1347](https://github.com/life1347))
|
||||
- Keep prometheus and canary deploy set to false in fission-core [\#964](https://github.com/fission/fission/pull/964) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Update readme to include JVM [\#953](https://github.com/fission/fission/pull/953) ([david-mcgillicuddy-ovo](https://github.com/david-mcgillicuddy-ovo))
|
||||
- Bump flask version [\#942](https://github.com/fission/fission/pull/942) ([life1347](https://github.com/life1347))
|
||||
- Adding JVM heap options to environment [\#936](https://github.com/fission/fission/pull/936) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Demo script updates [\#934](https://github.com/fission/fission/pull/934) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fix flag not found problem when running canary demo scripts [\#914](https://github.com/fission/fission/pull/914) ([life1347](https://github.com/life1347))
|
||||
- V0.11.0 [\#913](https://github.com/fission/fission/pull/913) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix failed to pull influxdb image from dockerhub [\#957](https://github.com/fission/fission/pull/957) ([life1347](https://github.com/life1347))
|
||||
- Kafka tests [\#944](https://github.com/fission/fission/pull/944) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- fix a few canary deployment issues [\#943](https://github.com/fission/fission/pull/943) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Support for full url \(base on aalubin 882 changes\) [\#941](https://github.com/fission/fission/pull/941) ([life1347](https://github.com/life1347))
|
||||
- Remove version from release name since it contains illegal chars for names [\#939](https://github.com/fission/fission/pull/939) ([soamvasani](https://github.com/soamvasani))
|
||||
- Feature flag to enable/disable canary + optional prometheus install [\#937](https://github.com/fission/fission/pull/937) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Return the error on failed specializations with `fn test --debug` [\#917](https://github.com/fission/fission/pull/917) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Added build and push procedures for Nodejs builder environment [\#916](https://github.com/fission/fission/pull/916) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add X-Forwarded-Host to request header [\#890](https://github.com/fission/fission/pull/890) ([life1347](https://github.com/life1347))
|
||||
- Optimize function latency when cache expired/invalid under high concurrency [\#856](https://github.com/fission/fission/pull/856) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.11.0](https://github.com/fission/fission/tree/0.11.0) (2018-10-01)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.10.0...0.11.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Print status with the get option. [\#907](https://github.com/fission/fission/pull/907) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Check CRD creation error instead of doing return directly [\#897](https://github.com/fission/fission/pull/897) ([life1347](https://github.com/life1347))
|
||||
- Fix failed to find release-builder dockerfile & push specific tag [\#870](https://github.com/fission/fission/pull/870) ([life1347](https://github.com/life1347))
|
||||
- V0.10.0 [\#868](https://github.com/fission/fission/pull/868) ([life1347](https://github.com/life1347))
|
||||
- Fixes \#758, uses v2 specialize for env versions 2 or higher [\#911](https://github.com/fission/fission/pull/911) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Java env test - Maven verbosity reduction [\#902](https://github.com/fission/fission/pull/902) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Canary deployments for fission functions. [\#892](https://github.com/fission/fission/pull/892) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Fix fetcher not close file descriptor correctly [\#889](https://github.com/fission/fission/pull/889) ([life1347](https://github.com/life1347))
|
||||
- Removes the spec helm command for now to fix \#881 [\#886](https://github.com/fission/fission/pull/886) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- FIX CleanupOldExecutorObjects in all namespaces [\#879](https://github.com/fission/fission/pull/879) ([ajbouh](https://github.com/ajbouh))
|
||||
- Check pod container ready state [\#861](https://github.com/fission/fission/pull/861) ([life1347](https://github.com/life1347))
|
||||
- Configurable namespace creation [\#855](https://github.com/fission/fission/pull/855) ([michaelgaida](https://github.com/michaelgaida))
|
||||
- Add v2 interface support for nodes env [\#836](https://github.com/fission/fission/pull/836) ([garyyeap](https://github.com/garyyeap))
|
||||
- Kafka integration [\#831](https://github.com/fission/fission/pull/831) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fission supportability: Add dump command to dump information for debugging [\#754](https://github.com/fission/fission/pull/754) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.10.0](https://github.com/fission/fission/tree/0.10.0) (2018-08-17)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.9.2...0.10.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fixed the spec validation UX issue [\#898](https://github.com/fission/fission/pull/898) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix CLI failed to setup port-forward caused by \#712 [\#867](https://github.com/fission/fission/pull/867) ([life1347](https://github.com/life1347))
|
||||
- Replay recorded requests by ReqUID [\#864](https://github.com/fission/fission/pull/864) ([Amusement](https://github.com/Amusement))
|
||||
- Add cleanup function to test scripts [\#863](https://github.com/fission/fission/pull/863) ([life1347](https://github.com/life1347))
|
||||
- Fix newdeploy fail to update HPA, deployment of a function after function update [\#862](https://github.com/fission/fission/pull/862) ([life1347](https://github.com/life1347))
|
||||
- Fix router not taps function services [\#860](https://github.com/fission/fission/pull/860) ([life1347](https://github.com/life1347))
|
||||
- Do resources validation when validate spec files [\#840](https://github.com/fission/fission/pull/840) ([life1347](https://github.com/life1347))
|
||||
- Fixed the name of JVM builder image name [\#824](https://github.com/fission/fission/pull/824) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- V0.9.2 [\#817](https://github.com/fission/fission/pull/817) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add retry subcommand to pkg command [\#808](https://github.com/fission/fission/pull/808) ([life1347](https://github.com/life1347))
|
||||
- add gevent based Python server to benchmark test cases [\#794](https://github.com/fission/fission/pull/794) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Add more meaningful error messages to executor when getServiceForFunction [\#752](https://github.com/fission/fission/pull/752) ([life1347](https://github.com/life1347))
|
||||
- Fix for \#662: avoid unnecessary builds [\#866](https://github.com/fission/fission/pull/866) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Fix newdeploy not updates deployment after function's entrypoint changed [\#838](https://github.com/fission/fission/pull/838) ([life1347](https://github.com/life1347))
|
||||
- Fix spec failed to archive single directory [\#837](https://github.com/fission/fission/pull/837) ([life1347](https://github.com/life1347))
|
||||
- Uses a real go project to showcase vendor example so glide works [\#828](https://github.com/fission/fission/pull/828) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Recorder CRD, Records API, Redis deployment [\#818](https://github.com/fission/fission/pull/818) ([Amusement](https://github.com/Amusement))
|
||||
- Fix router panic when trying to update route [\#811](https://github.com/fission/fission/pull/811) ([life1347](https://github.com/life1347))
|
||||
- Add query options to `fission function test` [\#782](https://github.com/fission/fission/pull/782) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Add go environment vendor directory support [\#781](https://github.com/fission/fission/pull/781) ([life1347](https://github.com/life1347))
|
||||
- Scale deployment to zero when function is in idle state [\#775](https://github.com/fission/fission/pull/775) ([life1347](https://github.com/life1347))
|
||||
- Update binary environment readme [\#773](https://github.com/fission/fission/pull/773) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Added readme for JVM environment [\#768](https://github.com/fission/fission/pull/768) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix spec command overrides existing archive's url of a package [\#764](https://github.com/fission/fission/pull/764) ([life1347](https://github.com/life1347))
|
||||
- Fixed typos from from goreportcard [\#760](https://github.com/fission/fission/pull/760) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Extensible Fission CLI [\#743](https://github.com/fission/fission/pull/743) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Updating releasing notes with details and structure [\#738](https://github.com/fission/fission/pull/738) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Update route without providing function reference [\#718](https://github.com/fission/fission/pull/718) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Allow router round-trip to be configurable [\#713](https://github.com/fission/fission/pull/713) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Fix CLI failed to set up port-forwarding when multiple controller pods exist in the same namespace [\#712](https://github.com/fission/fission/pull/712) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.9.2](https://github.com/fission/fission/tree/0.9.2) (2018-07-25)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.9.1...0.9.2)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Helm lint check in Travis CI [\#799](https://github.com/fission/fission/pull/799) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Spelling. [\#797](https://github.com/fission/fission/pull/797) ([WrathZA](https://github.com/WrathZA))
|
||||
- change image pull policy of builder manager [\#793](https://github.com/fission/fission/pull/793) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Delete namespace in background to reduce build time [\#791](https://github.com/fission/fission/pull/791) ([life1347](https://github.com/life1347))
|
||||
- Break & Stop the build immediately if a non-zero exit code was returned [\#790](https://github.com/fission/fission/pull/790) ([life1347](https://github.com/life1347))
|
||||
- Add changelog. [\#789](https://github.com/fission/fission/pull/789) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- changes needed for 0.9.1 [\#788](https://github.com/fission/fission/pull/788) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Working version of Java builder with Maven [\#783](https://github.com/fission/fission/pull/783) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [0.9.1](https://github.com/fission/fission/tree/0.9.1) (2018-07-07)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.9.0...0.9.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Committing changelog. [\#780](https://github.com/fission/fission/pull/780) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Changes in charts for release 0.9.0 [\#778](https://github.com/fission/fission/pull/778) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Change flag name to KeepArchive for backward compatibility [\#787](https://github.com/fission/fission/pull/787) ([life1347](https://github.com/life1347))
|
||||
- Fix go env plugin [\#784](https://github.com/fission/fission/pull/784) ([life1347](https://github.com/life1347))
|
||||
- Fix “rm: missing operand” in release script [\#779](https://github.com/fission/fission/pull/779) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.9.0](https://github.com/fission/fission/tree/0.9.0) (2018-07-04)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.8.0...0.9.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fix executor wrongly passes loop variable reference to function [\#751](https://github.com/fission/fission/pull/751) ([life1347](https://github.com/life1347))
|
||||
- Python Environment: add gevent based WSGI server framework [\#750](https://github.com/fission/fission/pull/750) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Temporarily disabling the tests so that other PRs can be worked on [\#737](https://github.com/fission/fission/pull/737) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- add build exe to gitignore [\#736](https://github.com/fission/fission/pull/736) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- ArchiveLiteralSizeLimit: Use Constant Instead Hard Code [\#731](https://github.com/fission/fission/pull/731) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Environment warning message bugfix [\#725](https://github.com/fission/fission/pull/725) ([soamvasani](https://github.com/soamvasani))
|
||||
- V0.8.0 [\#722](https://github.com/fission/fission/pull/722) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add steps to render & upload fission installation YAML [\#745](https://github.com/fission/fission/pull/745) ([life1347](https://github.com/life1347))
|
||||
- Fix executor not reaps idle function pods for functions with executortype newdeploy [\#744](https://github.com/fission/fission/pull/744) ([life1347](https://github.com/life1347))
|
||||
- Testing with keep alive settings for connections [\#742](https://github.com/fission/fission/pull/742) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- instead hard code by variable in error message [\#735](https://github.com/fission/fission/pull/735) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- envns should be availabe in message line [\#734](https://github.com/fission/fission/pull/734) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Support annotations in environment specs [\#733](https://github.com/fission/fission/pull/733) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Extract portforward to separate package [\#728](https://github.com/fission/fission/pull/728) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Push NATS error messages to error queue [\#724](https://github.com/fission/fission/pull/724) ([Amusement](https://github.com/Amusement))
|
||||
- Fix for Windows CLI Port Forwarding [\#715](https://github.com/fission/fission/pull/715) ([thejosephstevens](https://github.com/thejosephstevens))
|
||||
- Router liveness [\#701](https://github.com/fission/fission/pull/701) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Archives bigger than 256K size need env variable for uploading [\#697](https://github.com/fission/fission/pull/697) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Convert go-env Dockerfile into a multi-stage build [\#683](https://github.com/fission/fission/pull/683) ([jgall](https://github.com/jgall))
|
||||
- Move build process from host to docker container during release process [\#682](https://github.com/fission/fission/pull/682) ([life1347](https://github.com/life1347))
|
||||
- Added a flag to control the extraction of archive based on user input [\#675](https://github.com/fission/fission/pull/675) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Java env alpha [\#656](https://github.com/fission/fission/pull/656) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [0.8.0](https://github.com/fission/fission/tree/0.8.0) (2018-06-05)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.7.2...0.8.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Pre-install/pre-upgrade hooks to verify func references and assign restricted role bindings [\#717](https://github.com/fission/fission/pull/717) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Logger daemonset's update strategy [\#714](https://github.com/fission/fission/pull/714) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Check spec directory exists before reading spec files [\#709](https://github.com/fission/fission/pull/709) ([life1347](https://github.com/life1347))
|
||||
- Make fetcher resource requests and limits configurable [\#708](https://github.com/fission/fission/pull/708) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Formatted specifiers are not compatible with variables [\#706](https://github.com/fission/fission/pull/706) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Indicate HTTP status code by library const [\#703](https://github.com/fission/fission/pull/703) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- docker-distribution version bump for windows compatibility [\#691](https://github.com/fission/fission/pull/691) ([thejosephstevens](https://github.com/thejosephstevens))
|
||||
- Version -\> 0.7.2 [\#670](https://github.com/fission/fission/pull/670) ([life1347](https://github.com/life1347))
|
||||
- Java environment Design & considerations [\#642](https://github.com/fission/fission/pull/642) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Working version of Ingress integration [\#688](https://github.com/fission/fission/pull/688) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Update k8s dependencies to 1.10 [\#687](https://github.com/fission/fission/pull/687) ([life1347](https://github.com/life1347))
|
||||
- Add time trigger cron spec examination tool [\#680](https://github.com/fission/fission/pull/680) ([life1347](https://github.com/life1347))
|
||||
- Fission metrics integration [\#677](https://github.com/fission/fission/pull/677) ([soamvasani](https://github.com/soamvasani))
|
||||
- Replace Werkzeug with Bjoern as underlying WSGI server [\#672](https://github.com/fission/fission/pull/672) ([life1347](https://github.com/life1347))
|
||||
- Enabling multi-tenancy for fission objects. [\#655](https://github.com/fission/fission/pull/655) ([smruthi2187](https://github.com/smruthi2187))
|
||||
|
||||
## [0.7.2](https://github.com/fission/fission/tree/0.7.2) (2018-05-05)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.7.1...0.7.2)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Add benchmark script [\#666](https://github.com/fission/fission/pull/666) ([life1347](https://github.com/life1347))
|
||||
- Fixed the issue with update wiping values [\#663](https://github.com/fission/fission/pull/663) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix newdeploy backend failed to delete deployment due to incorrect resource version [\#657](https://github.com/fission/fission/pull/657) ([life1347](https://github.com/life1347))
|
||||
- Function update should be possible without change to code [\#652](https://github.com/fission/fission/pull/652) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fixes the issue with fn test and adds relevant test cases, fixes \#650 [\#651](https://github.com/fission/fission/pull/651) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix test cases occasional failure [\#647](https://github.com/fission/fission/pull/647) ([life1347](https://github.com/life1347))
|
||||
- Change time precision for fluentd influxdb plugin to nano second [\#646](https://github.com/fission/fission/pull/646) ([life1347](https://github.com/life1347))
|
||||
- Setting buildStatus to pending when function's source archive is updated. [\#637](https://github.com/fission/fission/pull/637) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Fix SEGFAULT issue when buildmgr failed to update package [\#635](https://github.com/fission/fission/pull/635) ([life1347](https://github.com/life1347))
|
||||
- Fix executor does not reap specialized function pod when env no longer exists [\#633](https://github.com/fission/fission/pull/633) ([life1347](https://github.com/life1347))
|
||||
- Update readme to point to the proper link [\#628](https://github.com/fission/fission/pull/628) ([jgall](https://github.com/jgall))
|
||||
- Changes needed for release 0.7.1 [\#622](https://github.com/fission/fission/pull/622) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Add default value to cli flag [\#619](https://github.com/fission/fission/pull/619) ([life1347](https://github.com/life1347))
|
||||
- Remove port forward in tests for router, controller and nats pods [\#611](https://github.com/fission/fission/pull/611) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- meaningful error message when fetch request is received for a package when build is not successful. [\#661](https://github.com/fission/fission/pull/661) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Delete deployment with proper delete propagation policy [\#630](https://github.com/fission/fission/pull/630) ([life1347](https://github.com/life1347))
|
||||
- Fix buildmgr SEGFAULT when it failed to update package [\#626](https://github.com/fission/fission/pull/626) ([life1347](https://github.com/life1347))
|
||||
- Fission upgrade tests [\#605](https://github.com/fission/fission/pull/605) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Removed the fn pods functionality [\#594](https://github.com/fission/fission/pull/594) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Testing proposal: Requirements and frameworks exploration [\#581](https://github.com/fission/fission/pull/581) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [0.7.1](https://github.com/fission/fission/tree/0.7.1) (2018-04-10)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.7.0...0.7.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Prevent releasing idle connections because transport is shared. [\#609](https://github.com/fission/fission/pull/609) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Fix components crash before crds creation [\#602](https://github.com/fission/fission/pull/602) ([life1347](https://github.com/life1347))
|
||||
- updates to changelog. [\#598](https://github.com/fission/fission/pull/598) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- changes needed for release 0.7.0 [\#597](https://github.com/fission/fission/pull/597) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- `fission X create --spec` flags for env and trigger create commands [\#607](https://github.com/fission/fission/pull/607) ([soamvasani](https://github.com/soamvasani))
|
||||
- Updating releasing guideliness with a few more details. [\#599](https://github.com/fission/fission/pull/599) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Add deprecated message to subcommand pods [\#592](https://github.com/fission/fission/pull/592) ([life1347](https://github.com/life1347))
|
||||
- Add validate function to crd resource and do validate before creation/update [\#580](https://github.com/fission/fission/pull/580) ([life1347](https://github.com/life1347))
|
||||
- Invalidate stale router cache entry with podIP's for deleted pods. [\#546](https://github.com/fission/fission/pull/546) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Use a separate controller loop to watch functions change and create a service [\#544](https://github.com/fission/fission/pull/544) ([life1347](https://github.com/life1347))
|
||||
- E2E test for NATS-streaming trigger [\#338](https://github.com/fission/fission/pull/338) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
## [0.7.0](https://github.com/fission/fission/tree/0.7.0) (2018-04-02)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.6.1...0.7.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- bug fix: spec dir flag [\#595](https://github.com/fission/fission/pull/595) ([xiekeyang](https://github.com/xiekeyang))
|
||||
- Add steps to set FISSION\_ROUTER env variable & update docs [\#593](https://github.com/fission/fission/pull/593) ([life1347](https://github.com/life1347))
|
||||
- Adding routerUrl parameter for kubewatch, timer, message queue trigge… [\#591](https://github.com/fission/fission/pull/591) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Uses proper way to get server URL [\#587](https://github.com/fission/fission/pull/587) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Check if the requested file already exists in fetcher and skip fetch [\#584](https://github.com/fission/fission/pull/584) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Add golang example to installation guide [\#578](https://github.com/fission/fission/pull/578) ([clee](https://github.com/clee))
|
||||
- Fixes the issue \#559 with env versions [\#569](https://github.com/fission/fission/pull/569) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add post-upgrade-job to track fission upgrade [\#564](https://github.com/fission/fission/pull/564) ([life1347](https://github.com/life1347))
|
||||
- Prepending a slash to user input url if missing. [\#547](https://github.com/fission/fission/pull/547) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Add verbosity flag and verbose logs for portforwarder [\#575](https://github.com/fission/fission/pull/575) ([soamvasani](https://github.com/soamvasani))
|
||||
- Spec validator, better errors, apply waits for previous build [\#560](https://github.com/fission/fission/pull/560) ([soamvasani](https://github.com/soamvasani))
|
||||
- Tests for function update [\#550](https://github.com/fission/fission/pull/550) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Show fission deployment version with cli [\#538](https://github.com/fission/fission/pull/538) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.6.1](https://github.com/fission/fission/tree/0.6.1) (2018-03-22)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.6.0...0.6.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- This change fixes an error in a yaml file in the fission-core chart. [\#563](https://github.com/fission/fission/pull/563) ([smartding](https://github.com/smartding))
|
||||
- \[ci skip\] update release number [\#561](https://github.com/fission/fission/pull/561) ([appleboy](https://github.com/appleboy))
|
||||
- Fixes \#537 - warning should not be given when updating to newdeploy [\#545](https://github.com/fission/fission/pull/545) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Docs update [\#542](https://github.com/fission/fission/pull/542) ([soamvasani](https://github.com/soamvasani))
|
||||
- Release script updates [\#541](https://github.com/fission/fission/pull/541) ([soamvasani](https://github.com/soamvasani))
|
||||
- Show warning when trying to create a route with non-existent function \(\#238\) [\#539](https://github.com/fission/fission/pull/539) ([life1347](https://github.com/life1347))
|
||||
- Fix executor failed to clean cache & kubeobjs after function deleted \(\#533\) [\#534](https://github.com/fission/fission/pull/534) ([life1347](https://github.com/life1347))
|
||||
- Delete healthz log [\#525](https://github.com/fission/fission/pull/525) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Always retry when istio is enabled. [\#536](https://github.com/fission/fission/pull/536) ([life1347](https://github.com/life1347))
|
||||
- Fix executor tries to create a new deployment when a function is updated [\#524](https://github.com/fission/fission/pull/524) ([life1347](https://github.com/life1347))
|
||||
- Add container spec config options to \(build\) environments [\#413](https://github.com/fission/fission/pull/413) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
|
||||
## [0.6.0](https://github.com/fission/fission/tree/0.6.0) (2018-03-01)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/latest...0.6.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Detect fission namespace in cli [\#519](https://github.com/fission/fission/pull/519) ([soamvasani](https://github.com/soamvasani))
|
||||
- Default values for FISSION\_\* env vars [\#518](https://github.com/fission/fission/pull/518) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add chart version to job name [\#516](https://github.com/fission/fission/pull/516) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fix CLI not update function's secret/configmap correctly [\#512](https://github.com/fission/fission/pull/512) ([life1347](https://github.com/life1347))
|
||||
- Adds latest tags and pushes to dockerhub for fetcher and fission-bundle [\#509](https://github.com/fission/fission/pull/509) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fixes the backward compatibility with older environment versions [\#508](https://github.com/fission/fission/pull/508) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Update Fn: Executor New Deployment [\#504](https://github.com/fission/fission/pull/504) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Adds default resources for fetcher pod [\#500](https://github.com/fission/fission/pull/500) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Documentation Revamp [\#496](https://github.com/fission/fission/pull/496) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Delete and list orphan pkgs [\#468](https://github.com/fission/fission/pull/468) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Service type ClusterIP - Controller port forward through CLI [\#431](https://github.com/fission/fission/pull/431) ([prithviramesh](https://github.com/prithviramesh))
|
||||
- Istio integration [\#421](https://github.com/fission/fission/pull/421) ([life1347](https://github.com/life1347))
|
||||
- Implement support for Azure storage message queue triggers [\#371](https://github.com/fission/fission/pull/371) ([peterhuene](https://github.com/peterhuene))
|
||||
|
||||
## [latest](https://github.com/fission/fission/tree/latest) (2018-03-01)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.5.0...latest)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Release checklist [\#522](https://github.com/fission/fission/pull/522) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fix post-install-job container failure due to command not found [\#514](https://github.com/fission/fission/pull/514) ([life1347](https://github.com/life1347))
|
||||
- Replace the release with the latest tag. [\#513](https://github.com/fission/fission/pull/513) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Go: Set image to right version, update example readme [\#497](https://github.com/fission/fission/pull/497) ([soamvasani](https://github.com/soamvasani))
|
||||
- Remove a noisy log from router [\#495](https://github.com/fission/fission/pull/495) ([soamvasani](https://github.com/soamvasani))
|
||||
- Improve release script [\#494](https://github.com/fission/fission/pull/494) ([life1347](https://github.com/life1347))
|
||||
- Update SHA256 HASH in CHANGELOG.md due to binaries update [\#493](https://github.com/fission/fission/pull/493) ([life1347](https://github.com/life1347))
|
||||
- Go builder for single file functions [\#492](https://github.com/fission/fission/pull/492) ([soamvasani](https://github.com/soamvasani))
|
||||
- CI modifications [\#491](https://github.com/fission/fission/pull/491) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Add upgrade guide from 0.4.x to 0.5.0 [\#490](https://github.com/fission/fission/pull/490) ([life1347](https://github.com/life1347))
|
||||
- Version -\> 0.5.0 [\#489](https://github.com/fission/fission/pull/489) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.5.0](https://github.com/fission/fission/tree/0.5.0) (2018-02-07)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.4.1...0.5.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Migrate project.json to dotnet.csproj & do build in dotnet container [\#488](https://github.com/fission/fission/pull/488) ([life1347](https://github.com/life1347))
|
||||
- Fix binary environment build failure due to package not found [\#487](https://github.com/fission/fission/pull/487) ([life1347](https://github.com/life1347))
|
||||
- Fix possible context leak problem [\#483](https://github.com/fission/fission/pull/483) ([life1347](https://github.com/life1347))
|
||||
- Removed limit on max number of channels in NATS Streaming deployment [\#482](https://github.com/fission/fission/pull/482) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Add glide flag to strip nested vendor [\#480](https://github.com/fission/fission/pull/480) ([life1347](https://github.com/life1347))
|
||||
- Extend perl examples to use more http features [\#479](https://github.com/fission/fission/pull/479) ([LittleFox94](https://github.com/LittleFox94))
|
||||
- Fluentd image tag issue in tests - an additional tag was appended [\#469](https://github.com/fission/fission/pull/469) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix broken redirect in python example [\#467](https://github.com/fission/fission/pull/467) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add readiness probe to go env [\#461](https://github.com/fission/fission/pull/461) ([life1347](https://github.com/life1347))
|
||||
- Fix fission bundle build failure [\#456](https://github.com/fission/fission/pull/456) ([life1347](https://github.com/life1347))
|
||||
- Convert build.sh to a multi-stage Dockerfile. [\#452](https://github.com/fission/fission/pull/452) ([justinbarrick](https://github.com/justinbarrick))
|
||||
- NewDeploy Doc [\#432](https://github.com/fission/fission/pull/432) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add go vet check [\#430](https://github.com/fission/fission/pull/430) ([life1347](https://github.com/life1347))
|
||||
- Fix potential nil pointer problem [\#485](https://github.com/fission/fission/pull/485) ([life1347](https://github.com/life1347))
|
||||
- Add simple usage doc for accessing secret/configmap in function [\#484](https://github.com/fission/fission/pull/484) ([life1347](https://github.com/life1347))
|
||||
- Helm hook bugfixes: run on upgrade, delete on completion [\#473](https://github.com/fission/fission/pull/473) ([soamvasani](https://github.com/soamvasani))
|
||||
- Archive pruner [\#471](https://github.com/fission/fission/pull/471) ([smruthi2187](https://github.com/smruthi2187))
|
||||
- Build and push fluentd image on release; update chart to use that image [\#462](https://github.com/fission/fission/pull/462) ([soamvasani](https://github.com/soamvasani))
|
||||
- Installation instructions for Fission Workflows [\#453](https://github.com/fission/fission/pull/453) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Block build requests before environment builder is ready [\#437](https://github.com/fission/fission/pull/437) ([life1347](https://github.com/life1347))
|
||||
- Show warning when user tries to create a function with a non-existed environment [\#436](https://github.com/fission/fission/pull/436) ([life1347](https://github.com/life1347))
|
||||
- Declarative application specifications for Fission [\#422](https://github.com/fission/fission/pull/422) ([soamvasani](https://github.com/soamvasani))
|
||||
- Functions have access to secrets/configmaps specified by the user [\#399](https://github.com/fission/fission/pull/399) ([prithviramesh](https://github.com/prithviramesh))
|
||||
- Newdeploy backend [\#387](https://github.com/fission/fission/pull/387) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
|
||||
## [0.4.1](https://github.com/fission/fission/tree/0.4.1) (2018-01-20)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.4.0...0.4.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fix python environment failed to launch [\#451](https://github.com/fission/fission/pull/451) ([life1347](https://github.com/life1347))
|
||||
- use time.Since instead of time.Now\(\).Sub [\#449](https://github.com/fission/fission/pull/449) ([wgliang](https://github.com/wgliang))
|
||||
- Fix fission function logs [\#448](https://github.com/fission/fission/pull/448) ([prithviramesh](https://github.com/prithviramesh))
|
||||
- Integration test improvements [\#447](https://github.com/fission/fission/pull/447) ([soamvasani](https://github.com/soamvasani))
|
||||
- Use storageClassName in Helm Charts \(\#444\) [\#445](https://github.com/fission/fission/pull/445) ([agrahamlincoln](https://github.com/agrahamlincoln))
|
||||
- Fscache support for multiple kubernetes objects [\#435](https://github.com/fission/fission/pull/435) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Improve travi-ci test scripts [\#434](https://github.com/fission/fission/pull/434) ([life1347](https://github.com/life1347))
|
||||
- Fix glide failed to check out github.com/dsnet/compress [\#429](https://github.com/fission/fission/pull/429) ([life1347](https://github.com/life1347))
|
||||
- Golang v2 environment -- runtime and builder [\#427](https://github.com/fission/fission/pull/427) ([soamvasani](https://github.com/soamvasani))
|
||||
- \[Issue 423\] build logs not saved on build error [\#426](https://github.com/fission/fission/pull/426) ([life1347](https://github.com/life1347))
|
||||
- Add support for httproute Host matching [\#425](https://github.com/fission/fission/pull/425) ([ajbouh](https://github.com/ajbouh))
|
||||
- Removed openshift specifics as they are no longer necessary [\#424](https://github.com/fission/fission/pull/424) ([karmab](https://github.com/karmab))
|
||||
- Overwrite request host with internal host to prevent request rejection [\#419](https://github.com/fission/fission/pull/419) ([life1347](https://github.com/life1347))
|
||||
- Fix pool manager crash problem if failed at http call [\#418](https://github.com/fission/fission/pull/418) ([life1347](https://github.com/life1347))
|
||||
- Update nats dependencies [\#411](https://github.com/fission/fission/pull/411) ([life1347](https://github.com/life1347))
|
||||
- Prepare Fission for IPv6 uses [\#408](https://github.com/fission/fission/pull/408) ([valentin2105](https://github.com/valentin2105))
|
||||
- Executor API panics if there is err in getting function from backends [\#407](https://github.com/fission/fission/pull/407) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- fission function logs returns logs in correct order now [\#405](https://github.com/fission/fission/pull/405) ([prithviramesh](https://github.com/prithviramesh))
|
||||
- Fetcher retry [\#403](https://github.com/fission/fission/pull/403) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add fission/builder image [\#397](https://github.com/fission/fission/pull/397) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Changed podName to a generic objectReference in cache implementation [\#391](https://github.com/fission/fission/pull/391) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Add package command [\#385](https://github.com/fission/fission/pull/385) ([life1347](https://github.com/life1347))
|
||||
- Executor abstraction [\#384](https://github.com/fission/fission/pull/384) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Fix builder manager issues [\#367](https://github.com/fission/fission/pull/367) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.4.0](https://github.com/fission/fission/tree/0.4.0) (2017-11-15)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.4.0rc...0.4.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Added python example to demonstrate status codes. [\#395](https://github.com/fission/fission/pull/395) ([c0dyhi11](https://github.com/c0dyhi11))
|
||||
- created weather.js in node.js examples, modified README.md [\#394](https://github.com/fission/fission/pull/394) ([svicenteruiz](https://github.com/svicenteruiz))
|
||||
- Delete failed helm releases to prevent test case failure [\#393](https://github.com/fission/fission/pull/393) ([life1347](https://github.com/life1347))
|
||||
- Added AWS to install cloud setup [\#392](https://github.com/fission/fission/pull/392) ([joshkelly](https://github.com/joshkelly))
|
||||
- Fix functionReferenceResolver return out-of-date function metadata [\#390](https://github.com/fission/fission/pull/390) ([life1347](https://github.com/life1347))
|
||||
- changes made to FluentD configuration to circumvent Logger daemonset [\#380](https://github.com/fission/fission/pull/380) ([prithviramesh](https://github.com/prithviramesh))
|
||||
|
||||
## [0.4.0rc](https://github.com/fission/fission/tree/0.4.0rc) (2017-11-08)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.3.0...0.4.0rc)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Switch from ThirdPartyResources to CustomResourceDefinitions [\#381](https://github.com/fission/fission/pull/381) ([life1347](https://github.com/life1347))
|
||||
- changed helm install pullPolicy from Always to IfNotPresent when building local docker image [\#378](https://github.com/fission/fission/pull/378) ([prithviramesh](https://github.com/prithviramesh))
|
||||
- Reduce function resolving time [\#376](https://github.com/fission/fission/pull/376) ([life1347](https://github.com/life1347))
|
||||
- Test functions 236 [\#355](https://github.com/fission/fission/pull/355) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||
- Make default node-env use alpine. List envs in documentation. [\#354](https://github.com/fission/fission/pull/354) ([rapitable](https://github.com/rapitable))
|
||||
- Update k8s client version to 4.0.0 [\#351](https://github.com/fission/fission/pull/351) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [0.3.0](https://github.com/fission/fission/tree/0.3.0) (2017-09-29)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/0.3.0-rc...0.3.0)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Use store to sync functions/triggers for fast synchronization [\#382](https://github.com/fission/fission/pull/382) ([life1347](https://github.com/life1347))
|
||||
- dotnet20 build fixes [\#365](https://github.com/fission/fission/pull/365) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add experimental deploy script [\#364](https://github.com/fission/fission/pull/364) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Fix workflow apiserver proxy [\#363](https://github.com/fission/fission/pull/363) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Differentiate by environment in fscache eviction [\#361](https://github.com/fission/fission/pull/361) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
## [0.3.0-rc](https://github.com/fission/fission/tree/0.3.0-rc) (2017-09-27)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/buildmgr-preview-20170922...0.3.0-rc)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Dump package resources at the end of tests [\#357](https://github.com/fission/fission/pull/357) ([soamvasani](https://github.com/soamvasani))
|
||||
- Use Containers to find matched storage containers \(\#350\) [\#353](https://github.com/fission/fission/pull/353) ([life1347](https://github.com/life1347))
|
||||
- Fix storage service failed to start after restarting it [\#352](https://github.com/fission/fission/pull/352) ([life1347](https://github.com/life1347))
|
||||
- Add bodyparser for text/plain to node-env [\#349](https://github.com/fission/fission/pull/349) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Fix unsupported checksum type \(issue 342\) [\#343](https://github.com/fission/fission/pull/343) ([life1347](https://github.com/life1347))
|
||||
- Fission workflow env integration [\#336](https://github.com/fission/fission/pull/336) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Add builder manager support [\#308](https://github.com/fission/fission/pull/308) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [buildmgr-preview-20170922](https://github.com/fission/fission/tree/buildmgr-preview-20170922) (2017-09-22)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/buildmgr-preview-20170921...buildmgr-preview-20170922)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Multiple Trigger Definitions Fix [\#341](https://github.com/fission/fission/pull/341) ([jsturtevant](https://github.com/jsturtevant))
|
||||
|
||||
## [buildmgr-preview-20170921](https://github.com/fission/fission/tree/buildmgr-preview-20170921) (2017-09-21)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/v0.2.1...buildmgr-preview-20170921)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Update a dependency in the package.json [\#339](https://github.com/fission/fission/pull/339) ([watilde](https://github.com/watilde))
|
||||
- Fission dotnet 2.0 env [\#337](https://github.com/fission/fission/pull/337) ([joalmeid](https://github.com/joalmeid))
|
||||
- Fix internal route setup bug [\#335](https://github.com/fission/fission/pull/335) ([soamvasani](https://github.com/soamvasani))
|
||||
- Tag and push the latest environment images [\#333](https://github.com/fission/fission/pull/333) ([y-taka-23](https://github.com/y-taka-23))
|
||||
- Function service cache partial support for multiple specialization [\#332](https://github.com/fission/fission/pull/332) ([soamvasani](https://github.com/soamvasani))
|
||||
- Upgrade Node Environment to 8.x [\#329](https://github.com/fission/fission/pull/329) ([MylesBorins](https://github.com/MylesBorins))
|
||||
- Removed deprecated k8s templates [\#327](https://github.com/fission/fission/pull/327) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Post-install hook to poke analytics function [\#325](https://github.com/fission/fission/pull/325) ([soamvasani](https://github.com/soamvasani))
|
||||
- update readme with latest install instructions [\#324](https://github.com/fission/fission/pull/324) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
## [v0.2.1](https://github.com/fission/fission/tree/v0.2.1) (2017-09-12)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/v0.2.1-rc2...v0.2.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Upgrade tool for 0.1 -\> 0.2.1 [\#320](https://github.com/fission/fission/pull/320) ([soamvasani](https://github.com/soamvasani))
|
||||
- Release automation script -- attach helm charts, tag env images [\#318](https://github.com/fission/fission/pull/318) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
## [v0.2.1-rc2](https://github.com/fission/fission/tree/v0.2.1-rc2) (2017-09-10)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/v0.2.1-rc...v0.2.1-rc2)
|
||||
|
||||
## [v0.2.1-rc](https://github.com/fission/fission/tree/v0.2.1-rc) (2017-09-09)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/v0.2.0-20170901...v0.2.1-rc)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Hugo-based documentation site [\#317](https://github.com/fission/fission/pull/317) ([soamvasani](https://github.com/soamvasani))
|
||||
- Use latest function metadata to check cached function service. [\#316](https://github.com/fission/fission/pull/316) ([life1347](https://github.com/life1347))
|
||||
- Storage service helm chart integration + bugfixes [\#315](https://github.com/fission/fission/pull/315) ([soamvasani](https://github.com/soamvasani))
|
||||
- Added perl environment [\#311](https://github.com/fission/fission/pull/311) ([LittleFox94](https://github.com/LittleFox94))
|
||||
- Move builds to package level [\#297](https://github.com/fission/fission/pull/297) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
## [v0.2.0-20170901](https://github.com/fission/fission/tree/v0.2.0-20170901) (2017-09-01)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/nightly20170705...v0.2.0-20170901)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Large functions: API proxy for storage svc, upload support in the CLI [\#304](https://github.com/fission/fission/pull/304) ([soamvasani](https://github.com/soamvasani))
|
||||
- Unarchive zip file after fetcher downloads the package [\#301](https://github.com/fission/fission/pull/301) ([life1347](https://github.com/life1347))
|
||||
- Storage service and client [\#300](https://github.com/fission/fission/pull/300) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add link to the logs section of INSTALL.md [\#299](https://github.com/fission/fission/pull/299) ([ly798](https://github.com/ly798))
|
||||
- Add Environment v2 Builder [\#298](https://github.com/fission/fission/pull/298) ([life1347](https://github.com/life1347))
|
||||
- Add env builder & srcpkg through cli [\#296](https://github.com/fission/fission/pull/296) ([life1347](https://github.com/life1347))
|
||||
- Split out the Package type into a first class Kubernetes resource [\#295](https://github.com/fission/fission/pull/295) ([soamvasani](https://github.com/soamvasani))
|
||||
- Helm chart bugfixes + end to end test bugfixes [\#293](https://github.com/fission/fission/pull/293) ([soamvasani](https://github.com/soamvasani))
|
||||
- Minor documentation fix for the Go example [\#292](https://github.com/fission/fission/pull/292) ([georgebuckerfield](https://github.com/georgebuckerfield))
|
||||
- Improve error message if an older CLI attempts to make a request [\#291](https://github.com/fission/fission/pull/291) ([rapitable](https://github.com/rapitable))
|
||||
- Update list of environments currently in README [\#289](https://github.com/fission/fission/pull/289) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- Fix fetcher failed to access TPR if RBAC is enabled [\#288](https://github.com/fission/fission/pull/288) ([life1347](https://github.com/life1347))
|
||||
- Fix bug that causes us to skip our new e2e tests [\#285](https://github.com/fission/fission/pull/285) ([soamvasani](https://github.com/soamvasani))
|
||||
- Parse metadata.Name before creating tpr resource [\#284](https://github.com/fission/fission/pull/284) ([life1347](https://github.com/life1347))
|
||||
- Remove etcd deployment & svc [\#282](https://github.com/fission/fission/pull/282) ([life1347](https://github.com/life1347))
|
||||
- End to end test runner [\#281](https://github.com/fission/fission/pull/281) ([soamvasani](https://github.com/soamvasani))
|
||||
- Set fetcher image through poolmgr env [\#280](https://github.com/fission/fission/pull/280) ([life1347](https://github.com/life1347))
|
||||
- Set message content-type based on the trigger.Spec.ContentType [\#279](https://github.com/fission/fission/pull/279) ([life1347](https://github.com/life1347))
|
||||
- Helm chart updates [\#273](https://github.com/fission/fission/pull/273) ([soamvasani](https://github.com/soamvasani))
|
||||
- Kubernetes access for Travis CI tests [\#272](https://github.com/fission/fission/pull/272) ([soamvasani](https://github.com/soamvasani))
|
||||
- V2 types and TPR [\#266](https://github.com/fission/fission/pull/266) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fix logger prints wrong log [\#263](https://github.com/fission/fission/pull/263) ([life1347](https://github.com/life1347))
|
||||
- Fix nats trigger replies message to non-existing response topic [\#260](https://github.com/fission/fission/pull/260) ([life1347](https://github.com/life1347))
|
||||
- Binary Environment [\#256](https://github.com/fission/fission/pull/256) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||
- fix typo funtion -\> function [\#252](https://github.com/fission/fission/pull/252) ([sbfaulkner](https://github.com/sbfaulkner))
|
||||
- Ruby logger [\#251](https://github.com/fission/fission/pull/251) ([sbfaulkner](https://github.com/sbfaulkner))
|
||||
- Update/Add fission-core & fission-all helm charts [\#239](https://github.com/fission/fission/pull/239) ([life1347](https://github.com/life1347))
|
||||
- Fix unstoppable kubewatcher [\#208](https://github.com/fission/fission/pull/208) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [nightly20170705](https://github.com/fission/fission/tree/nightly20170705) (2017-07-06)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/nightly20170621...nightly20170705)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- include path parameters in params hash for ruby environment [\#249](https://github.com/fission/fission/pull/249) ([sbfaulkner](https://github.com/sbfaulkner))
|
||||
- Fission update must require at least one change to function [\#241](https://github.com/fission/fission/pull/241) ([life1347](https://github.com/life1347))
|
||||
- Add message queue trigger support [\#218](https://github.com/fission/fission/pull/218) ([life1347](https://github.com/life1347))
|
||||
|
||||
## [nightly20170621](https://github.com/fission/fission/tree/nightly20170621) (2017-06-21)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/alpha20170124...nightly20170621)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fix creating redundant pods on heavyload coldstart [\#232](https://github.com/fission/fission/pull/232) ([yqf3139](https://github.com/yqf3139))
|
||||
- Aggregate tap service request in interval [\#229](https://github.com/fission/fission/pull/229) ([yqf3139](https://github.com/yqf3139))
|
||||
- Specify full golang version in Dockerfiles and build helper script [\#227](https://github.com/fission/fission/pull/227) ([soamvasani](https://github.com/soamvasani))
|
||||
- Retrieve URL params in functions \(\#158\) [\#226](https://github.com/fission/fission/pull/226) ([yqf3139](https://github.com/yqf3139))
|
||||
- Fix s/Sirupsen/sirupsen/ for logrus [\#224](https://github.com/fission/fission/pull/224) ([n1koo](https://github.com/n1koo))
|
||||
- add ruby-env [\#223](https://github.com/fission/fission/pull/223) ([sbfaulkner](https://github.com/sbfaulkner))
|
||||
- Fix pool contains wrong environment metadata [\#221](https://github.com/fission/fission/pull/221) ([life1347](https://github.com/life1347))
|
||||
- Added support for pods and replication controllers to watchers [\#216](https://github.com/fission/fission/pull/216) ([javierbq](https://github.com/javierbq))
|
||||
- Fix two links in Roadmap doc [\#213](https://github.com/fission/fission/pull/213) ([markpeek](https://github.com/markpeek))
|
||||
- Fix http response body not closed correctly & return immediately when error occurred [\#210](https://github.com/fission/fission/pull/210) ([life1347](https://github.com/life1347))
|
||||
- Print log when timetrigger is removed [\#209](https://github.com/fission/fission/pull/209) ([life1347](https://github.com/life1347))
|
||||
- Retrieve function logs from controller [\#207](https://github.com/fission/fission/pull/207) ([life1347](https://github.com/life1347))
|
||||
- Adding fission-rbac.yml for [\#183](https://github.com/fission/fission/pull/183) ([gamefiend](https://github.com/gamefiend))
|
||||
- Add OpenShift INSTALL.md docs [\#179](https://github.com/fission/fission/pull/179) ([tiny-dancer](https://github.com/tiny-dancer))
|
||||
- Lighten up the python3 base image \(alpine\) [\#171](https://github.com/fission/fission/pull/171) ([syassami](https://github.com/syassami))
|
||||
- Make the chart work with helm 2.2 [\#170](https://github.com/fission/fission/pull/170) ([apenney](https://github.com/apenney))
|
||||
- Add OpenShift support \(\#107\) [\#168](https://github.com/fission/fission/pull/168) ([methadata](https://github.com/methadata))
|
||||
- Go build helper script [\#163](https://github.com/fission/fission/pull/163) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add Time Trigger API and client \(\#153\) [\#161](https://github.com/fission/fission/pull/161) ([yqf3139](https://github.com/yqf3139))
|
||||
- Add fission-ui intro in readme [\#159](https://github.com/fission/fission/pull/159) ([yqf3139](https://github.com/yqf3139))
|
||||
- Drop Go 1.7, use Go 1.8 [\#157](https://github.com/fission/fission/pull/157) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add README for Node.js examples [\#155](https://github.com/fission/fission/pull/155) ([RobertHerhold](https://github.com/RobertHerhold))
|
||||
- Upgrade node environment to Node.js 7.6.0+ [\#151](https://github.com/fission/fission/pull/151) ([RobertHerhold](https://github.com/RobertHerhold))
|
||||
- use fmt.Errorf instead of error.New\(\) [\#149](https://github.com/fission/fission/pull/149) ([maxwell92](https://github.com/maxwell92))
|
||||
- Return 201 for created resources [\#148](https://github.com/fission/fission/pull/148) ([RobertHerhold](https://github.com/RobertHerhold))
|
||||
- Set correct Content-Type in the http response [\#147](https://github.com/fission/fission/pull/147) ([lingxiankong](https://github.com/lingxiankong))
|
||||
- Make it more clear where to clone this repo [\#145](https://github.com/fission/fission/pull/145) ([RobertHerhold](https://github.com/RobertHerhold))
|
||||
- Fix function delete with uid [\#142](https://github.com/fission/fission/pull/142) ([yqf3139](https://github.com/yqf3139))
|
||||
- Fixed pod has no ip \(\#139\) [\#141](https://github.com/fission/fission/pull/141) ([life1347](https://github.com/life1347))
|
||||
- fix\(kubeEventsSlack\): typo and wrong variable name [\#140](https://github.com/fission/fission/pull/140) ([Pindar](https://github.com/Pindar))
|
||||
- Ignore the vendor folder [\#137](https://github.com/fission/fission/pull/137) ([RobertHerhold](https://github.com/RobertHerhold))
|
||||
- Fix Markdown table [\#136](https://github.com/fission/fission/pull/136) ([RobertHerhold](https://github.com/RobertHerhold))
|
||||
- Symlink user function's node\_modules to server's node\_modules [\#133](https://github.com/fission/fission/pull/133) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add function logs support \(\#53\) [\#131](https://github.com/fission/fission/pull/131) ([life1347](https://github.com/life1347))
|
||||
- Remove redundant hello.js from charts directory [\#130](https://github.com/fission/fission/pull/130) ([sanketsudake](https://github.com/sanketsudake))
|
||||
- Handle errors in filestore init \(\#108\) [\#127](https://github.com/fission/fission/pull/127) ([soamvasani](https://github.com/soamvasani))
|
||||
- \[WIP\] Golang runtime [\#125](https://github.com/fission/fission/pull/125) ([nouney](https://github.com/nouney))
|
||||
- Modify the stock example to show how to change the Content-Type [\#124](https://github.com/fission/fission/pull/124) ([gonrial](https://github.com/gonrial))
|
||||
- Improve command-line client error output [\#122](https://github.com/fission/fission/pull/122) ([tobias](https://github.com/tobias))
|
||||
- Report KeyNotFound from etcd as a 404 [\#121](https://github.com/fission/fission/pull/121) ([tobias](https://github.com/tobias))
|
||||
- Use latest for stable release of minikube [\#120](https://github.com/fission/fission/pull/120) ([r2d4](https://github.com/r2d4))
|
||||
- Fixed failed to delete function when function's file is not exist [\#118](https://github.com/fission/fission/pull/118) ([life1347](https://github.com/life1347))
|
||||
- Update gitignore to include dev artifacts [\#117](https://github.com/fission/fission/pull/117) ([tobias](https://github.com/tobias))
|
||||
- Better convey duplicate name errors to client [\#116](https://github.com/fission/fission/pull/116) ([tobias](https://github.com/tobias))
|
||||
- Don't wait for ready pod in MakeGenericPool [\#114](https://github.com/fission/fission/pull/114) ([soamvasani](https://github.com/soamvasani))
|
||||
- Allow unique HTTP route & method \(\#102\) [\#111](https://github.com/fission/fission/pull/111) ([kphatak](https://github.com/kphatak))
|
||||
- Minor improvements to build instructions in README [\#110](https://github.com/fission/fission/pull/110) ([tobias](https://github.com/tobias))
|
||||
- Make build an actual sh script [\#109](https://github.com/fission/fission/pull/109) ([tobias](https://github.com/tobias))
|
||||
- Fixing validations of fn actions [\#106](https://github.com/fission/fission/pull/106) ([kphatak](https://github.com/kphatak))
|
||||
- Http request support [\#105](https://github.com/fission/fission/pull/105) ([ktrance](https://github.com/ktrance))
|
||||
- function code download using HTTP URL [\#100](https://github.com/fission/fission/pull/100) ([kphatak](https://github.com/kphatak))
|
||||
- Error when env name/image not provided [\#98](https://github.com/fission/fission/pull/98) ([lcrisci](https://github.com/lcrisci))
|
||||
- Add initial support for PHP7 [\#97](https://github.com/fission/fission/pull/97) ([dgoujard](https://github.com/dgoujard))
|
||||
- kubewatcher example: send watch updates to slack [\#96](https://github.com/fission/fission/pull/96) ([soamvasani](https://github.com/soamvasani))
|
||||
- bugfix \(cli\) Update the URL check to work with https [\#94](https://github.com/fission/fission/pull/94) ([andrewstuart](https://github.com/andrewstuart))
|
||||
- Primary Helm chart for fission [\#90](https://github.com/fission/fission/pull/90) ([sanketsudake](https://github.com/sanketsudake))
|
||||
- Wait for Pod IP while waiting for pod ready [\#89](https://github.com/fission/fission/pull/89) ([soamvasani](https://github.com/soamvasani))
|
||||
- Added support for running C\# code in a dotnet core environment [\#84](https://github.com/fission/fission/pull/84) ([ktrance](https://github.com/ktrance))
|
||||
- Poolmgr: fix pod leak bugs on specializePod failure [\#70](https://github.com/fission/fission/pull/70) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
## [alpha20170124](https://github.com/fission/fission/tree/alpha20170124) (2017-01-24)
|
||||
[Full Changelog](https://github.com/fission/fission/compare/kubecon...alpha20170124)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Make go vet happy [\#87](https://github.com/fission/fission/pull/87) ([AlekSi](https://github.com/AlekSi))
|
||||
- Ignore glide cache in gofmt check [\#86](https://github.com/fission/fission/pull/86) ([soamvasani](https://github.com/soamvasani))
|
||||
- Bugfix for internal routes [\#81](https://github.com/fission/fission/pull/81) ([soamvasani](https://github.com/soamvasani))
|
||||
- Bug fix for handling a route's HTTP method in router [\#79](https://github.com/fission/fission/pull/79) ([soamvasani](https://github.com/soamvasani))
|
||||
- fission-bundle: allow setting the namespace [\#77](https://github.com/fission/fission/pull/77) ([frodenas](https://github.com/frodenas))
|
||||
- Delete generic pools when environments are deleted [\#75](https://github.com/fission/fission/pull/75) ([soamvasani](https://github.com/soamvasani))
|
||||
- Poolmgr: ensure orphaned resources are cleaned up [\#69](https://github.com/fission/fission/pull/69) ([soamvasani](https://github.com/soamvasani))
|
||||
- Implement 'fission route update' [\#68](https://github.com/fission/fission/pull/68) ([soamvasani](https://github.com/soamvasani))
|
||||
- Update router cache on new function version [\#67](https://github.com/fission/fission/pull/67) ([soamvasani](https://github.com/soamvasani))
|
||||
- Changed Package Names to Match new Github Organization [\#66](https://github.com/fission/fission/pull/66) ([jgavinray](https://github.com/jgavinray))
|
||||
- Add HTTP route create params to function create command [\#65](https://github.com/fission/fission/pull/65) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add kubectl download to install instructions [\#61](https://github.com/fission/fission/pull/61) ([soamvasani](https://github.com/soamvasani))
|
||||
- Readme minikube instructions [\#60](https://github.com/fission/fission/pull/60) ([soamvasani](https://github.com/soamvasani))
|
||||
- Check for name in 'function delete' [\#59](https://github.com/fission/fission/pull/59) ([soamvasani](https://github.com/soamvasani))
|
||||
- adding go-report card and fixing minor typo in README [\#57](https://github.com/fission/fission/pull/57) ([kphatak](https://github.com/kphatak))
|
||||
- Kubewatcher: trigger functions from Kubernetes Watch callbacks [\#56](https://github.com/fission/fission/pull/56) ([soamvasani](https://github.com/soamvasani))
|
||||
- adding commonly used python libraries [\#49](https://github.com/fission/fission/pull/49) ([kphatak](https://github.com/kphatak))
|
||||
- Setup app.logger for python environment [\#48](https://github.com/fission/fission/pull/48) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add build badge [\#46](https://github.com/fission/fission/pull/46) ([soamvasani](https://github.com/soamvasani))
|
||||
- Install and run etcd on travis [\#45](https://github.com/fission/fission/pull/45) ([soamvasani](https://github.com/soamvasani))
|
||||
- Bugfix in functionServiceCache test [\#44](https://github.com/fission/fission/pull/44) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fix cache test [\#43](https://github.com/fission/fission/pull/43) ([soamvasani](https://github.com/soamvasani))
|
||||
- \#25 Continuous Testing [\#42](https://github.com/fission/fission/pull/42) ([jgavinray](https://github.com/jgavinray))
|
||||
- add travis integration test [\#41](https://github.com/fission/fission/pull/41) ([carmark](https://github.com/carmark))
|
||||
- Fix `environment` command typo. [\#39](https://github.com/fission/fission/pull/39) ([pirogoeth](https://github.com/pirogoeth))
|
||||
- Edit readme [\#38](https://github.com/fission/fission/pull/38) ([soamvasani](https://github.com/soamvasani))
|
||||
- Updated README to include protocol scheme for FISSION\_URL prefix [\#36](https://github.com/fission/fission/pull/36) ([efexen](https://github.com/efexen))
|
||||
- Add minikube example in readme [\#34](https://github.com/fission/fission/pull/34) ([johscheuer](https://github.com/johscheuer))
|
||||
- README: use kubectl create -f http [\#32](https://github.com/fission/fission/pull/32) ([philips](https://github.com/philips))
|
||||
- Python environment improvements [\#30](https://github.com/fission/fission/pull/30) ([soamvasani](https://github.com/soamvasani))
|
||||
- Readme updates [\#29](https://github.com/fission/fission/pull/29) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add "fission function edit \<function\>" command [\#28](https://github.com/fission/fission/pull/28) ([soamvasani](https://github.com/soamvasani))
|
||||
- Move client-go dependency to 1.5 [\#27](https://github.com/fission/fission/pull/27) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
## [kubecon](https://github.com/fission/fission/tree/kubecon) (2016-11-11)
|
||||
**Merged pull requests:**
|
||||
|
||||
- Reap idle pods [\#20](https://github.com/fission/fission/pull/20) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fission CLI [\#19](https://github.com/fission/fission/pull/19) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fix resource store errors on empty db [\#18](https://github.com/fission/fission/pull/18) ([soamvasani](https://github.com/soamvasani))
|
||||
- fission-bundle: executable package for router, controller, poolmgr [\#17](https://github.com/fission/fission/pull/17) ([soamvasani](https://github.com/soamvasani))
|
||||
- Router integration with poolmgr and controller [\#16](https://github.com/fission/fission/pull/16) ([soamvasani](https://github.com/soamvasani))
|
||||
- Poolmgr -- manage generic containers and their specialization [\#15](https://github.com/fission/fission/pull/15) ([soamvasani](https://github.com/soamvasani))
|
||||
- Fetcher is a helper for function run containers [\#14](https://github.com/fission/fission/pull/14) ([soamvasani](https://github.com/soamvasani))
|
||||
- Cache -- simple threadsafe map [\#13](https://github.com/fission/fission/pull/13) ([soamvasani](https://github.com/soamvasani))
|
||||
- Change controller and router exports to make them usable as libraries [\#12](https://github.com/fission/fission/pull/12) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add API version to URLs [\#11](https://github.com/fission/fission/pull/11) ([soamvasani](https://github.com/soamvasani))
|
||||
- Nodejs improvements [\#10](https://github.com/fission/fission/pull/10) ([soamvasani](https://github.com/soamvasani))
|
||||
- Base64 encode the code in json objects. [\#9](https://github.com/fission/fission/pull/9) ([soamvasani](https://github.com/soamvasani))
|
||||
- API for environments [\#8](https://github.com/fission/fission/pull/8) ([soamvasani](https://github.com/soamvasani))
|
||||
- Add HTTP trigger API and client [\#7](https://github.com/fission/fission/pull/7) ([soamvasani](https://github.com/soamvasani))
|
||||
- Move some fission structs to top level package [\#6](https://github.com/fission/fission/pull/6) ([soamvasani](https://github.com/soamvasani))
|
||||
- Controller [\#5](https://github.com/fission/fission/pull/5) ([soamvasani](https://github.com/soamvasani))
|
||||
- Move packages to root dir from src/ [\#4](https://github.com/fission/fission/pull/4) ([soamvasani](https://github.com/soamvasani))
|
||||
- Router [\#3](https://github.com/fission/fission/pull/3) ([soamvasani](https://github.com/soamvasani))
|
||||
- NodeJS Function Run Container [\#2](https://github.com/fission/fission/pull/2) ([soamvasani](https://github.com/soamvasani))
|
||||
- Initial docs commit [\#1](https://github.com/fission/fission/pull/1) ([soamvasani](https://github.com/soamvasani))
|
||||
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
Compiling Fission
|
||||
=================
|
||||
|
||||
[You only need to do this if you're making Fission changes; if you're
|
||||
just deploying Fission, use fission.yaml which points to prebuilt
|
||||
images.]
|
||||
|
||||
You'll need the `go` compiler and tools installed, along with the
|
||||
[glide dependency management
|
||||
tool](https://github.com/Masterminds/glide#install). You'll also need
|
||||
docker for building images.
|
||||
|
||||
The server side is compiled as one binary ("fission-bundle") which
|
||||
contains controller, poolmgr and router; it invokes the right one
|
||||
based on command-line arguments.
|
||||
|
||||
To build fission-bundle: clone this repo to
|
||||
`$GOPATH/src/github.com/fission/fission`, then from the top level
|
||||
directory (if you want to build the image with the docker inside
|
||||
minikube, you'll need to set the proper environment variables with
|
||||
`eval $(minikube docker-env)`):
|
||||
|
||||
```
|
||||
# Get dependencies
|
||||
$ glide install
|
||||
|
||||
# Build fission server and an image
|
||||
$ pushd fission-bundle
|
||||
$ ./build.sh
|
||||
```
|
||||
|
||||
You now need to build the docker image for fission. You can use
|
||||
`push.sh` and push it to a docker hub account. But it's easiest to use
|
||||
minikube and its built-in docker daemon:
|
||||
|
||||
```
|
||||
$ eval $(minikube docker-env)
|
||||
$ docker build -t minikube/fission-bundle .
|
||||
```
|
||||
|
||||
Next, install fission on your kubernetes cluster:
|
||||
|
||||
```
|
||||
# To install, update fission.yaml to point to the image you just made: "minikube/fission-bundle"
|
||||
$ $EDITOR fission.yaml
|
||||
$ kubectl create -f fission.yaml
|
||||
$ kubectl create -f fission-nodeport.yaml
|
||||
```
|
||||
|
||||
And if you're changing the CLI too, you can build it with:
|
||||
|
||||
```
|
||||
# Build Fission CLI
|
||||
$ cd fission && go install
|
||||
```
|
||||
@@ -24,7 +24,7 @@ Language-neutral components:
|
||||
|
||||
Language-specific components:
|
||||
|
||||
* Environment container
|
||||
* Environment container(s)
|
||||
|
||||
|
||||
Controller
|
||||
@@ -112,13 +112,13 @@ Environment Container
|
||||
---------------------
|
||||
|
||||
Environment containers run user-defined functions. Environment
|
||||
containers are language specific. They must contain an HTTP server
|
||||
and a loader for functions.
|
||||
containers are language specific. Each environment container must
|
||||
contain an HTTP server and a loader for functions.
|
||||
|
||||
Poolmgr deploys the environment container into a pod with fetcher
|
||||
(fetcher is a simple utility that can fetch an HTTP url to a file at a
|
||||
configured location). This pod forms a "generic pod", because it can
|
||||
be loaded with any function.
|
||||
be loaded with any function in that language.
|
||||
|
||||
When poolmgr needs to create a service for a function, it calls
|
||||
fetcher to fetch the function. Fetcher downloads the function into a
|
||||
@@ -134,7 +134,7 @@ Following is a diagram describe how log service works:
|
||||
|
||||

|
||||
|
||||
1. Pool manager choose a pod from pool to execute user function
|
||||
1. Pool manager chooses a pod from the pool to execute user function
|
||||
2. Pool manager makes a HTTP POST to logger helper, once helper receives
|
||||
the request it creates a symlink to container log for fluentd.
|
||||
3. Fluentd reads log from symlink and pipes to influxdb
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Fission Document
|
||||
=================
|
||||
|
||||
* Please visit [here](https://docs.fission.io/) for fission documentation.
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
## Fission API ([area-api](https://github.com/fission/fission/labels/area-api))
|
||||
|
||||
- TPR-based controller
|
||||
- CRD-based controller
|
||||
- API authentication
|
||||
- Aggregated API server
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
_Function_: A fission function is something that's mapped to a
|
||||
_trigger_ and run on demand. Though we call it a "function", this is
|
||||
a bit imprecise, since it's actually a module with an function as an
|
||||
entry point -- it doesn't have to be just one function.
|
||||
|
||||
_Trigger_: Triggers are what cause functions to be called. For
|
||||
example, an HTTP trigger causes functions to be called on HTTP
|
||||
requests. Kubernetes Watch triggers cause functions to be called when
|
||||
a Kubernetes watch changes. Future triggers will include message
|
||||
queues, timers, storage systems, etc.
|
||||
|
||||
_Environments_: Environments are the language-specific parts of
|
||||
Fission. Environment containers wrap the user's function and present
|
||||
a common interface to the rest of the fission framework.
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
# Multi-tenancy in Fission
|
||||
|
||||
Multi-tenancy in Fission allows users to create Fission objects, i.e functions, packages, environments and triggers in different namespaces.
|
||||
It mandates that a function reference secrets, configmaps and its package (if explicity referenced during function creation/updation) to be present in the same namespace as the function.
|
||||
This allows user separation and prevents in-advertent access to sensitive data of other users sharing the same cluster.
|
||||
However, users are allowed and encouraged to share environments to ensure optimal utilization of cluster resources. To achieve this, users can create all the necessary environments in a ns, say ns1 and then go on to create functions in different namespaces and refer to env in ns1.
|
||||
Users that prefer complete isolation can create their env, functions in the same ns.
|
||||
|
||||
## Roles and privileges
|
||||
|
||||
1. Cluster-Admin Role : Fission's services need cluster-admin privileges to monitor, create, update and delete resources across namespaces.
|
||||
2. Package-getter Role : This role has privileges to do a get, watch and list on fission package objects.
|
||||
3. Secret-Configmap-getter Role : This role has privileges to do a get, watch and list on secrets and configmaps.
|
||||
|
||||
## Service Accounts
|
||||
|
||||
1. fission-fetcher
|
||||
|
||||
This SA is created in every namespace that a user creates runtime environments in.
|
||||
Also created in function namespaces where a user creates functions that use NewDeploy executor backend.
|
||||
|
||||
2. fission-builder
|
||||
|
||||
This SA is created in every namespace that a user creates builder environments in.
|
||||
|
||||
## Role-bindings
|
||||
|
||||
1. Package-getter-binding
|
||||
|
||||
Every time a user creates a package explicity in a namespace, this rolebinding is created in package's namespace (which is also function's namespace). This grants package-getter role to fission-fetcher SA present in the referenced environment's namespace.
|
||||
If the package is a source package, then, fission-builder SA present in the environment namespace is also added to this rolebinding.
|
||||
|
||||
Next when the user creates a function in the same namespace, if the function's executor type is newdeploy, then, the fission-fetcher SA present in function namespace is also added to the same rolebinding.
|
||||
|
||||
Note : For functions that have executor type poolmgr, the env pods are created in the namespace that env object is created. Whereas, for those functions that have executor type New deploy mgr, the function pods are created in the namespace that function object is created in.
|
||||
|
||||
This is because, poolmgr allows env sharing and optimal resource utilization. so generic env pools are created in a different namespace and all functions that prefer sharing this env pool can reference these pools.
|
||||
If users require strict isolation, they can either create functions with new deploy backend, or, create env's in different namespaces and not share them across functions.
|
||||
|
||||
2. Secret-Configmap-getter-binding
|
||||
|
||||
Every time a user creates a function in a namespace, Secret-Configmap-getter-binding is created in the same namespace, granting secret-configmap-getter role to fission-fetcher SA present in the referenced environment's namespace in case the executor type is poolmgr.
|
||||
If the executor type is newdeploymgr, then the same rolebinding is created in the same namespace as the function, granting the same secret-configmap-getter role to fission-fetcher SA present in the function namespace.
|
||||
|
||||
## Examples
|
||||
|
||||
1. create a generic python runtime env in ns 1 and function with poolmgr executor type in ns 2 that references it.
|
||||
|
||||
```bash
|
||||
$ fission env create --name python --image fission/python-env --envns ns1
|
||||
$ fission function create --name func1 --env python --code hello.py --fns ns2
|
||||
```
|
||||
|
||||
2. create a builder and runtime environment in ns3, a source pkg in ns3 and a function referring to this src pkg also in ns3. (for complete isolation, all objs are in ns3)
|
||||
|
||||
```bash
|
||||
$ fission env create --name python-builder-env --builder fission/python-builder --image fission/python-env --ns3
|
||||
$ fission package create --src src-pkg.zip --env python-builder-env --buildcmd "./build.sh" --pkgns ns3
|
||||
$ fission fn create --name func3 --fns ns3 --pkg $pkg --entrypoint "user.main"
|
||||
```
|
||||
|
||||
## Note
|
||||
|
||||
1. To maintain backward compatibility, fission objects that are created without the ns flags are created in default namespace. Also, the run time env pods in such a case will continue to live in fission-function ns and builder env pods in fission-builder ns
|
||||
2. Since all envs in a namespace have the same fission-fetcher SA mounted in them, even though multiple envs are created in a namespace and referenced by functions in different namespaces, the SA will have previleges to view those function's secrets if any.
|
||||
3. Similarly, if there are multiple functions in different namespaces but all sharing an env in one namespace, the fission-fetcher SA in that namespace will have previleges to see all of their secrets.
|
||||
@@ -0,0 +1,91 @@
|
||||
# Annotations
|
||||
|
||||
Annotations are used by the core Kubernetes system and to even larger extent by projects such as Istio Ingress Controllers and Prometheus and such.
|
||||
|
||||
Users want to add annotations to some objects such as ingress (https://github.com/fission/fission/issues/989).
|
||||
|
||||
To enable the users to use annotations, here are some thoughts and ideas:
|
||||
|
||||
## Defining annotations
|
||||
|
||||
Annotations can be defined fairly easily in the spec file for any object as part of metadata.
|
||||
|
||||
``` yaml
|
||||
apiVersion: fission.io/v1
|
||||
kind: HTTPTrigger
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: spectest
|
||||
namespace: default
|
||||
annotations:
|
||||
test-anno: some-test-value
|
||||
spec:
|
||||
createingress: true
|
||||
```
|
||||
|
||||
These annotations can be merged to target object using a merging mechanism - so that additional annotations put by Fission can also be preserved.
|
||||
|
||||
## Considerations
|
||||
|
||||
- More often than not the annotations are needed by a Kubernetes objects created by one of the function CRDs/controllers. For example ingress created by route needs the annotation and not the route object itself.
|
||||
|
||||
### Implementation 1
|
||||
|
||||
- Most annotations use a convention which we can use to determine if an annotation is meant for an ingress object or to be applied on a pod.
|
||||
|
||||
For example. look at annotations:
|
||||
|
||||
|Annotation name| Description|
|
||||
|:-------------|:-------------|
|
||||
|`prometheus.io/scrape`| Prometheus - applied to pod|
|
||||
|`sidecar.istio.io/inject`|Istio - applied to pod|
|
||||
|`helm.sh/hook`| Used by helm to apply to pods/jobs|
|
||||
|`traefik.ingress.kubernetes.io/app-root`|Used by Trafeik ingress controller, applied to ingress|
|
||||
|`nginx.ingress.kubernetes.io/add-base-url`|Used by Nginx ingress controller, applied to ingress|
|
||||
|
||||
So we can write a simple logic - to check if a annotation is applicable for an ingress and based on that apply or not apply annotations to ingress.
|
||||
|
||||
|
||||
### Implementation 2
|
||||
|
||||
- One of side effects of this is that the annotations will still stay on the source CRD object - for example annotation will stay on the httptrigger as well as the ingress object. This can cause problems in certain cases where something like Prometheus uses annotations to scrape objects. So instead we wrap the annotations needed by an object into another annotation name. This also solves problem of having to guess which annotations to apply to which object.
|
||||
|
||||
```yaml
|
||||
apiVersion: fission.io/v1
|
||||
kind: HTTPTrigger
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: spectest
|
||||
namespace: default
|
||||
annotations:
|
||||
ingress-annotations: '{"nginx.ingress.kubernetes.io/add-base-url": "true", "nginx.ingress.kubernetes.io/app-root": "somevalue"}'
|
||||
```
|
||||
|
||||
|
||||
This is specifically important because for example newdeploy function will create a deployment, service and HPA and all three might have different set of annotations.
|
||||
|
||||
```yaml
|
||||
annotations:
|
||||
service-annotations: '{"service.annotation1": "somevalue"}'
|
||||
deployment-annotations: '{"deploy.annotation1": "somevalue"}'
|
||||
```
|
||||
|
||||
### Implementation 3
|
||||
|
||||
Based on discussion in the team there is a additional option of adding a explicit field in the spec to hold the annotations. For now this assumes that we are only considering HTTPTriggers for annotations and not other objects such as Functions.
|
||||
|
||||
```
|
||||
HTTPTriggerSpec struct {
|
||||
Host string `json:"host"`
|
||||
RelativeURL string `json:"relativeurl"`
|
||||
CreateIngress bool `json:"createingress"`
|
||||
Method string `json:"method"`
|
||||
FunctionReference FunctionReference `json:"functionref"`
|
||||
Annotations map[string]string `json:annotations`
|
||||
}
|
||||
```
|
||||
|
||||
## Final thoughts
|
||||
|
||||
- The implementation idea 2 & 3 look better than 1. The third option involves HTTPTrigger Spec change.
|
||||
- For both (2) & (3) - if in future we have to implement annotations for Functions etc. we will have to consider the fact that a function will in turn create 3 objects (Service, Pod & HPA) and annotations for all three would need to be accommodated.
|
||||
@@ -0,0 +1,101 @@
|
||||
# Continuous Integration and Delivery of Fission functions
|
||||
|
||||
This document outlines a simple CI/CD process for Fission functions which can be extended to any CI/CD tool. Before we start, some level setting for terminology used as the terms are used rather broadly in industry.
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
CI is made up of a series of broad areas:
|
||||
|
||||
- The first step is to compile the source code and convert into artifact which is pushed to artifact repository. Traditionally this has been building a Py or wheel package (Python) or Jar file (Java) but as containers became mainstream the container image became the package. The traditional artifact repositories were replaced by the Docker registries.
|
||||
|
||||
- Execution and reporting of unit testing has been a crucial part of the CI cycle and is done after the source code can be compiled successfully.
|
||||
|
||||
- Running a static/dynamic code analyzer is the next step in continuous integration. The static code analysis is usually used to measure and report quality metrics and dynamic code scanning/analysis for security.
|
||||
|
||||
In the draft version of this proposal we will only consider the source to artifact conversion part and will not dive into unit testing or code scanning/analysis cycles of the CI.
|
||||
|
||||
## Continuous Delivery
|
||||
|
||||
CD is also composed of a few broad areas focusing on different aspects:
|
||||
|
||||
- After CI cycle completes successfully - deploying the artifact to a Dev/Staging environment so that it can be tested by developers and QA teams.
|
||||
|
||||
- Once the tests & teams have verified that a function works, the same function should be promoted from Dev/Stage to higher/production environment. The number of environment that a organization maintains varies but the idea of promotion from one environment to higher environment does exist. There are very few organizations who deploy the newer versions of functions directly in production with a A/B setup but that is as of this writing is an exception and not the norm.
|
||||
|
||||
- Another aspect of promoting from one environment to higher environment is the configuration for both environments will be different. For ex. the DB connection string will be different for each environment. Or the "maxscale" property for production environment could be higher than that for Dev. The ability to store all these environment specific configurations in some sort of system (Github for normal values and some sort of KMS for sensitive data) and being able to combine the logic and configurations for each environment when deploying is important.
|
||||
|
||||
Beyond these points there are integration/automation points such as being able to call a test suite after deployment is done etc. but we will skip for now for brevity.
|
||||
|
||||
## 1 Fission specs in a container
|
||||
|
||||
Let's start with a simple Fission function which uses specs. A typical directory structure looks like below:
|
||||
|
||||
```
|
||||
.
|
||||
├── multifile
|
||||
│ ├── README.md
|
||||
│ ├── __init__.py
|
||||
│ ├── main.py
|
||||
│ ├── message.txt
|
||||
│ └── readfile.py
|
||||
└── specs
|
||||
├── README
|
||||
├── env-python.yaml
|
||||
├── fission-deployment-config.yaml
|
||||
└── function-pyz.yaml
|
||||
```
|
||||
|
||||
Irrespective of if source code that needs to be built or not, there is a simple command to fire to update the function, which will build (if applicable) and deploy the function:
|
||||
|
||||
```
|
||||
$ fission spec apply
|
||||
```
|
||||
|
||||
If we look at this from CI/CD perspective this process requires:
|
||||
1. Source code & specs
|
||||
2. A github push event when any one of the two change
|
||||
3. Fission CLI
|
||||
4. Kubernetes Config so that the apply command can be run
|
||||
|
||||
So if we build a container - which has the above requirements met as installed software (Ex. Fission & Kubectl CLI) or available as environment variable (Github pull token or Kubeconfig), the container can be used as part of CI workflow in any tool such as - Jenkins, Argo, Github Actions, Gitlab etc.
|
||||
|
||||
The idea is to build a generic container with Fission CLI, Kubernetes CLI and a way to read Github token and Kubeconfig from env variable/mounted files and being able to run `fission spec apply` command.
|
||||
|
||||
### 1.1
|
||||
|
||||
Instead of building a container in previous section - the same can be achieved by a function. The Github webhook can call a function endpoint which in turn can execute the process similar to inside the container.
|
||||
|
||||
## 2 Environment Configurations
|
||||
|
||||
There are use cases and reasons to have environment configuration different for each environment such as Dev/Staging etc. Let's assume that we want to vary the `maxscale` in functions and `DB_CONNECTION` in environment
|
||||
|
||||
```
|
||||
spec:
|
||||
InvokeStrategy:
|
||||
ExecutionStrategy:
|
||||
ExecutorType: newdeploy
|
||||
MaxScale: 2 // <-- Varies based on environment deployed in
|
||||
MinScale: 1
|
||||
```
|
||||
|
||||
```
|
||||
container:
|
||||
env:
|
||||
- name: DB_CONNECTION
|
||||
value: "http://database.url" // <-- Varies based on environment deployed in
|
||||
```
|
||||
|
||||
Without changing anything in Fission spec it is possible to change these things from environment to environment and some of strategies used by people are:
|
||||
|
||||
1. Generate and maintain specs for each environment. This is not a best practice as it leads to drift in code and configuration between environment over time.
|
||||
2. Use placeholder variables (i.e. $DB_CONNECTION_VALUE) and replace them for each environment before deploying. This is better in the sense that you are combining changes specific to each environment with spec code but is still a work around sort of.
|
||||
|
||||
For environment specific configurations, it is possible to use some sort of templating or overlay mechanism. One of interesting projects using overlays is [Kustomize](https://github.com/kubernetes-sigs/kustomize). In any case as of today the fission spec command does not have a way to use template or modify values using overlay and it is worth exploring this approach for fission spec.
|
||||
|
||||
## 3 Promotion from one environment to another
|
||||
|
||||
This necessarily does not fall in the area of Fission per se but it would be fairly easy to build a pipeline in the the tool used for CI/CD if we have container mentioned in (1) and even work around mentioned in (2).
|
||||
|
||||
## Action Items
|
||||
|
||||
As a first step it would be good to build a simple container mentioned in (1) and use it in various tools to understand the value it adds and any unknowns. The next steps would be to build a full end to end pipeline from source to production.
|
||||
@@ -0,0 +1,128 @@
|
||||
# Fission CLI Extensibility
|
||||
|
||||
### Approach
|
||||
To sum up the approach: git-style plugins.
|
||||
|
||||
Plugins are named with the fission prefix `fission-*`. When fission is invoked with an undefined/non-core subcommand
|
||||
is called (like `fission foo`). Fission will look in the PATH
|
||||
|
||||
**Installing Fission**
|
||||
```bash
|
||||
# The same as before
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/0.7.2/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
```
|
||||
|
||||
**Installing Fission Workflows**
|
||||
```bash
|
||||
# The same process as Fission cli itself
|
||||
$ curl -Lo fission https://github.com/fission/fission-workflows/releases/download/0.4.0/fission-workflows-osx && chmod +x fission-workflows && sudo mv fission-workflows /usr/local/bin/
|
||||
```
|
||||
|
||||
**Invoking Fission Workflows**
|
||||
```bash
|
||||
$ fission workflows invocation get b1278e802a
|
||||
# Which is equivalent to:
|
||||
$ fission-workflows invocation get b1278e802a
|
||||
```
|
||||
General flow:
|
||||
1. fission does not recognize `workflows` subcommand
|
||||
2. fission checks the path for a binary called `fission-workflows`
|
||||
3. fission finds the binary.
|
||||
4. fission invokes the `fission-workflows`, passing the remainder of the arguments.
|
||||
|
||||
**Discoverability: fission --help**
|
||||
```bash
|
||||
$ fission --help
|
||||
USAGE:
|
||||
fission [global options] command [command options] [arguments...]
|
||||
|
||||
VERSION:
|
||||
0.6.0
|
||||
|
||||
COMMANDS:
|
||||
function, fn Create, update and manage functions
|
||||
httptrigger, ht, route Manage HTTP triggers (routes) for functions
|
||||
timetrigger, tt, timer Manage Time triggers (timers) for functions
|
||||
mqtrigger, mqt, messagequeue Manage message queue triggers for functions
|
||||
environment, env Manage environments
|
||||
watch, w Manage watches
|
||||
package, pkg Manage packages
|
||||
spec, specs Manage a declarative app specification
|
||||
upgrade Upgrade tool from fission v0.1
|
||||
tpr2crd Migrate tool for TPR to CRD
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
PLUGINS:
|
||||
workflows, wf Inspect and manage workflow executions
|
||||
ui Start the user interface
|
||||
|
||||
GLOBAL OPTIONS:
|
||||
--server value Fission server URL (default: "http://127.0.0.1:65356")
|
||||
--help, -h show help
|
||||
--version, -v print the version
|
||||
```
|
||||
Of course Fission needs to be able to find all plugins for this. There are several ways in which we can provide discoverability. The simplest one is for Fission to look in the path for all binaries starting with the `fission-*` prefix. Optionally, fission could invoke a specific command on the subcommand to get info about the plugin (such as version, help text, aliases...)
|
||||
|
||||
With Fission Workflows this info would look something like this:
|
||||
```bash
|
||||
$ fission-workflows --plugin
|
||||
name: workflows
|
||||
version: 0.4.0
|
||||
help: Inspect and manage workflow executions
|
||||
```
|
||||
The idea is that this plugin info is all completely optional.
|
||||
If it is not available, we simply degrade the results to user.
|
||||
This way users/we can easily prototype or add plugins without having to worry about adhering to some interface.
|
||||
|
||||
**List version**
|
||||
```bash
|
||||
$ fission --version
|
||||
client:
|
||||
fission: 0.8.0
|
||||
fission-workflows: 0.4.0
|
||||
server:
|
||||
fission: 0.8.1
|
||||
fission-workflows: 0.3.0
|
||||
```
|
||||
Again, versioning info for fission-workflows is taken from the plugin info of the commands.
|
||||
Note: a related issue is to have some more formalized plugin support/discoverability on the server-side,
|
||||
but that is out of the scope of this issue.
|
||||
|
||||
### Other (optional) extensions and notes
|
||||
- Like git we could setup a preferred binary path, where fission looks first when searching for the subcommand.
|
||||
This could optionally be defined with a `FISSION_EXEC_PATH`.
|
||||
- With the current approach we cannot have aliases for commands---fission will not be able to find fission-workflows
|
||||
when the user calls `fission wf`. This might be UX issue, with these long path names. One option is let the user fix
|
||||
it themselves by symlinking `fission-wf` to `fission-workflows`; using the plugin info Fission can recognize and
|
||||
merge aliases together.
|
||||
- To help detect versioning conflicts (old version of fission, too new version of fission workflows). We could add
|
||||
a `requires` field to the fission-workflows plugin info. Then we could throw a warning or error, when two out of sync
|
||||
versions are being used.
|
||||
- To avoid unhelpful errors to the user when they have not installed a plugin, we could add a heuristic to check
|
||||
`https://github.com/fission/SUBCOMMAND` to see if the subcommand might be an uninstalled plugin.
|
||||
OR, we could lookup a simple text file that contains common plugins `https://github.com/fission/fission/plugins.txt`
|
||||
and list them as suggestions to the user. OR we could of course just default to a bit help text that says something
|
||||
like `unknown subcommand 'foo'. If this is a plugin, ensure that it is present on your PATH`.
|
||||
|
||||
---
|
||||
|
||||
### Motivation
|
||||
|
||||
The proposed approach is to use the git-based plugin system for now. Reasons for this approach over a sophisticated,
|
||||
integrated plugin-based approach:
|
||||
- It is low effort to implement.
|
||||
- It is easy to extend with minimal to no required interface.
|
||||
- The binaries remain standalone, allowing users to separate them if needed and make independent development on the
|
||||
binaries easy.
|
||||
|
||||
Limitations of the proposed approach:
|
||||
- The user still has to do some work, adding binaries to the PATH; ensuring that permissions are correct; ensuring
|
||||
that the binary is executable; how to deal with duplicate binaries on the PATH. All this makes this approach assume
|
||||
basic/intermediate knowledge of the OS from the user.
|
||||
- I have to admit: I am not entirely sure if this approach requires any changes for Windows. Probably not.
|
||||
- Upgrading fission with many plugins could be cumbersome, as you would need to upgrade each binary one by one.
|
||||
Improving this is probably best left to future work.
|
||||
|
||||
|
||||
The more heavyweight solution solves some of these limitations to an extent, but these do not way up to the increased
|
||||
development and maintainance cost IMO. If needed we could explore this option (or some hybrid option) in the future.
|
||||
@@ -0,0 +1,47 @@
|
||||
|
||||
# Fission Pool manager
|
||||
|
||||
Fission's currently uses a pool of running "environments" and specialized them for execution of a function. This design served the cold start use cases well but this is not the only strategy for creation and execution of functions. For example requirements for a new execution backend have been discussed in https://github.com/fission/fission/issues/193. This document aims to discuss the currently under development "newdeploy" backend and related thoughts
|
||||
|
||||
# Executor
|
||||
|
||||
A new layer - executor now sits between the router and actual backends are responsible for all of heavy lifting for execution of functions. Executor layer is responsible for accepting requests from router and checking with cache before calling on a backend for execution of a function.
|
||||
|
||||
# Backend
|
||||
|
||||
A backend is responsible for execution of a function - which can involve provisioning appropriate objects in Kubernetes. So with the new design Pool manager becomes one of backends. As of this writing there are two backends which are described as:
|
||||
|
||||
### Pool Manager Backend
|
||||
|
||||
Pool manager backend uses a pool of environment pods and specialized them when a function is invoked. The specialized pods are cleaned up if not in use after a few minutes. More details on Pool manager can be found here: https://github.com/fission/fission/blob/5c470735185b980c1f7987921db360e91c65573b/Documentation/Architecture.md
|
||||
|
||||
### New Deploy Backend
|
||||
|
||||
New Deploy backend create a Kubernetes deployment, a Kubernetes Service for a given function. It additionally creates a HorizontalPodAutoscaler if scale parameters are provided. The creation of deployment and service can be eager or lazy based on input.
|
||||
|
||||
### Execution Strategy
|
||||
|
||||
While this is still a WIP, parameters that affect execution behaviour of function are based on `InvokeStrategy`. A invoke strategy defines the `strategyType` and actual strategy parameters encapsulated in the strategy object.
|
||||
|
||||
```
|
||||
InvokeStrategy struct {
|
||||
ExecutionStrategy ExecutionStrategy
|
||||
StrategyType StrategyType
|
||||
}
|
||||
```
|
||||
For example in above case the strategy type is `ExecutionStrategy` and the corresponding parameters are listed below.
|
||||
|
||||
```
|
||||
ExecutionStrategy struct {
|
||||
Backend BackendType
|
||||
MinScale int
|
||||
MaxScale int
|
||||
EagerCreation bool
|
||||
}
|
||||
```
|
||||
|
||||
In future there could be more strategies for different use cases.
|
||||
|
||||
## Dispatch to backend
|
||||
|
||||
As of now one of the backends is chosen based on a simple flag in `ExecutionStrategy`. In future there might be a intelligent/hybrid ways of choosing a backend. For example initial requests of a function could be served from a pool manager while later scaling could be served by a NewDeploy backend
|
||||
@@ -0,0 +1,67 @@
|
||||
# Java Environment : Design & considerations
|
||||
|
||||
This document documents the design and thoughts that lead to design of Java environment. Before we dive deeper, some important points:
|
||||
|
||||
- When we say Java, we really mean JVM. That does not mean that all languages will work seamlessly, so support will be added gradually based on validation. Some of popular languages as of today are:
|
||||
- Scala
|
||||
- Groovy
|
||||
- Kotlin (Server side with Spring)
|
||||
|
||||
- In Java there are a few prominent frameworks which have a ecosystem of their own (See list below). How these framework fit in the environment will be detailed later, but it is important to understand their place in ecosystem and design for it.
|
||||
- A large percentage of entertprise developers use [Spring framework](https://spring.io/) as has been shown by multiple surveys
|
||||
- Reactive has taken up recently with data intensive operations [Reactive extensions for JVM](https://github.com/ReactiveX/RxJava)
|
||||
- [Spark](http://sparkjava.com/) is a micro web framework
|
||||
|
||||
A draft implementation of the Java environment design is in the branch [java_env_alpha](https://github.com/fission/fission/tree/java_env_alpha). Also a earlier implementation based on Vort.x framework [can be found here](https://github.com/tobias/fission-java-env/)
|
||||
|
||||
## Function interface
|
||||
|
||||
The goal is here is to minimize the lock in for the user into any framework as much as possible. Java 8 introduced an interface called ```Function``` which could be a great fit here. The user has to implement the ```Function<T, R>``` class and to meet the contract implement the apply method:
|
||||
|
||||
```
|
||||
public class HelloWorld implements Function<T, R> {
|
||||
|
||||
public R apply(T str) {
|
||||
|
||||
```
|
||||
|
||||
Now - the T & R could be different things and we discuss some options below:
|
||||
|
||||
### Body in request and response
|
||||
|
||||
From the early implementation in the branch mentioned above, the environment extracts the body and send it as a JSON string. The JSON then can be transformed into the appropriate object by the function.
|
||||
|
||||
This works well, but has one major limitation: the function does not get access to other things like headers etc. The same thing applies to the reponse: function can send the body but looses control over status code etc.
|
||||
|
||||
### HttpServletRequest and HttpServletResponse
|
||||
|
||||
It is possible to send the [HttpServeletRequest](https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html) request object as it is to the function class but then the interface becomes a bit too low level. For example the function user has to retrieve the body of request using ```getInputStream``` which gives raw input stream and needs additional work.
|
||||
|
||||
Also most enterprise applications today use a framework of some sort for web applications instead of dealing with the raw HttpServlet
|
||||
|
||||
### Custom/Context Object
|
||||
|
||||
A custom object which encapsulates all needed fields etc. can be used to pass the data from environment to the function. But this means the user has to import a Fission object/library for this object in the application code.
|
||||
|
||||
This approach has been taken in the implementation done earlier for a Java environment in Fission and [object interface can be found here](https://github.com/tobias/fission-java-env/blob/master/src/main/java/io/fission/api/Context.java). Related discussion is in the [issue](https://github.com/fission/fission/issues/91)
|
||||
|
||||
AWS Lambda also uses a context object, but the purpose is very different, [details of context object here](https://docs.aws.amazon.com/lambda/latest/dg/java-context-object.html).
|
||||
|
||||
### Spring's HttpEntity
|
||||
|
||||
If we have to depend on a class/library, it is probably better to depend on a class which is part of ecosystem. So instead of using the low level interface of Servlet, we can use [HttpEntity's subclasses RequestEntity and ResponseEntity](https://docs.spring.io/spring/docs/5.0.5.RELEASE/javadoc-api/org/springframework/http/HttpEntity.html). This ensures that the function user is not locked in the Fission object contract, but also gets the full access to request/response object.
|
||||
|
||||
The Spring cloud function project also discusses the issue of not having access to other things in request and [related issues are here](https://github.com/spring-cloud/spring-cloud-function/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+header)
|
||||
|
||||
### Thoughts
|
||||
|
||||
- If we only intend to pass request/response object to function - then using HttpEntity might be a good choice
|
||||
|
||||
- If there is a need for additional exchange of information between the environment and function execution in future, then a custom/context object is a better option. We can wrap the HttpEntity's fields and additional fields in the custom context object
|
||||
|
||||
## Environment Design
|
||||
|
||||
JVM environment design is based on Spring boot and Spring MVC frameworks. The details can be found in branch, but here are some key points:
|
||||
|
||||
- All classes in the function and dependent classes are loaded into JVM. Which means the user should supply the uber/fat jar for execution.
|
||||
- The entrypoint class is specified by the user as ```entrypoint``` flag on the class. The method is by convention (```apply``` as per the Function interface contract)
|
||||
@@ -0,0 +1,62 @@
|
||||
# Fission Support Tool
|
||||
Fission now has rich functionality supported by multiple services, however, it brings the complexity of troubleshooting.
|
||||
This proposal tends to give a picture of fission support tool that can help both user and developer to locate the problem in short time.
|
||||
To achieve this, the support tool will dump related kubernetes objects, fission resources and pod logs from the given cluster.
|
||||
|
||||
# Functionality
|
||||
|
||||
## Environment Information Collection
|
||||
|
||||
Before troubleshooting, some of the basic information is needed to give others an overview of kubernetes/fission user test with so that we can locate the problem in short time.
|
||||
|
||||
* Fission version
|
||||
* Client/Server version
|
||||
|
||||
* Kubernetes cluster version
|
||||
* Cluster version (i.e v1.9.7-gke.0)
|
||||
* Running environment (i.e GKE, AKS and minikube)
|
||||
* Nodes version and other information
|
||||
|
||||
## Service Logs Collection
|
||||
|
||||
The component logs and the logs of interaction between components are important for people to understand what really happened in cluster. Following are components need to collect logs from.
|
||||
|
||||
* All fission component pods
|
||||
* Function pods
|
||||
* Builder pods
|
||||
* Environment pods
|
||||
|
||||
## Object dumping
|
||||
|
||||
Fission is deeply coupled with Kubernetes, most of the objects are created and maintained by it. There is two major type of objects need to be dumped from kubernetes:
|
||||
|
||||
* K8S objects
|
||||
* CRD resources
|
||||
|
||||
All objects should be dumped into a readable file format. It will be great if people can reproduce similar environment with these files.
|
||||
|
||||
## Information upload
|
||||
|
||||
Upload dump files to the specific backend server for support channel to analysis
|
||||
|
||||
# CLI Interface
|
||||
|
||||
```
|
||||
$ fission support collect
|
||||
NAME:
|
||||
fission support collect - Collect pod logs, fission resources and related kubernetes objects for troubleshooting
|
||||
|
||||
USAGE:
|
||||
fission support collect [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--dumpdir value Directory to save dump kubernetes objects and fission resources (default: "fission-dump")
|
||||
--fissionns value Namespace of fission installation (default: "fission")
|
||||
--builderns value Namespace of fission package builder (default: "fission-builder")
|
||||
--funcns value Namespace of fission function pod (default: "fission-function")
|
||||
```
|
||||
|
||||
# Thoughts?
|
||||
|
||||
1. What to do with sensitive objects like secrets and configmap? Ignore the dump for such objects?
|
||||
2. The functionality is necessary but not listed above?
|
||||
@@ -0,0 +1,209 @@
|
||||
# Testing Proposal
|
||||
|
||||
This proposal was initially started as a upgrade testing proposal but soon problems that were posed resulted in a bigger proposal.
|
||||
### Kinds of testing
|
||||
|
||||
Most of current integration tests are CLI driven. Fission CLI is used to test execute various test cases. In future we would have to also focus on API level testing as a UI is built for Fission.
|
||||
## Needs & patterns
|
||||
|
||||
This section only explains the problems/best practices without going into tooling and language used for implementation.
|
||||
### Separating the test & data
|
||||
|
||||
Seperating the tests from test data has two aspects - one is separation of concerns and second is scaling the tests without touching the test logic. The test data is a simple data structure which holds all information and test can take data and execute the logic.
|
||||
|
||||
As an example today we test "Hello world" for nodejs environment with a simple hello.js like this:
|
||||
|
||||
```
|
||||
fission env create --name nodejs --image fission/node-env
|
||||
fission fn create --name $fn --env nodejs --code $ROOT/examples/nodejs/hello.js
|
||||
fission route create --function $fn --url /$fn --method GET
|
||||
response=$(curl http://$FISSION_ROUTER/$fn)
|
||||
```
|
||||
The variables here are environment image, function code & route URL.
|
||||
|
||||
If tomorrow if we had to scale this test for all environments, we will have to repeat ourselves. (Violate DRY principle). Instead of that if we encapsulate the test setup & test in a simple function:
|
||||
|
||||
```
|
||||
test_hello_env(envImage, codePath, routeURL){
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
And feed it with a dictionary which has all possible combination of tests:
|
||||
|
||||
```
|
||||
{
|
||||
node: {"fission/node-env", "test/hello.js", "/hellonode"},
|
||||
python: {"fission/python-env", "test/hello.py", "/hellopy"},
|
||||
golang: {"fission/go-env", "test/hello.go", "/hellogo"},
|
||||
binray: {"fission/binary-env", "test/hello.sh", "/hellobinary"},
|
||||
}
|
||||
|
||||
```
|
||||
This would achieve a few things:
|
||||
|
||||
- Separate the test execution logic from the data it needs clearly.
|
||||
- For adding new kind of environments, you just need to add one more entry into data structure.
|
||||
|
||||
Testing all environments may not be most apt example for this, but there can be potential use cases like this.
|
||||
### Separating the test & setup/teardown
|
||||
|
||||
When we run a test there are typically three distinct phases:
|
||||
|
||||
- Setup (Create env, fn, route)
|
||||
- Test (Curl the function)
|
||||
- Cleanup (Delete fn, route & env)
|
||||
|
||||
It should be possible to separate the before test and after test parts from actual tests at two levels:
|
||||
- Each test
|
||||
- A whole test suite
|
||||
|
||||
The ability to have clean and separate before and after blocks, apart from separation of concerns, enables:
|
||||
|
||||
- Running a suite of tests for same setup (See tagging for suite of tests)
|
||||
### Tagging tests & running a selection
|
||||
|
||||
Over a period of time as tests grow, there will be unit, smkoe, integration, performance, soak tests and so on. Ability to run a perticular test suite only or a combination of them makes it easy to run for specific purpose.
|
||||
### Measuring test times
|
||||
|
||||
[Good to have, not a must] Measuring time for tests and reporting somewhere helps over time to monitor trends. Although this job is better done by performance/benchmark tests so it is not a strict requirement
|
||||
|
||||
### Cleaner Logging
|
||||
It would be good to have cleaner/relevant logging as part of build & test. For example something that Ginkgo framework does is it shows error logs only for failed tests.
|
||||
### Tests in Parallel
|
||||
|
||||
It would be good to be able to run tests in parallel.
|
||||
|
||||
## Evalutaing the tools/alternatives
|
||||
### BATS
|
||||
|
||||
Bash Automated Testing System is like a enhanced version of bash with support for @test tags and before and after steps & ability to skip tests etc. While it enhances the bash to certain extent, the overall improvement is only marginal.
|
||||
|
||||
```
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "addition using bc" {
|
||||
result="$(echo 2+2 | bc)"
|
||||
[ "$result" -eq 4 ]
|
||||
}
|
||||
|
||||
$ bats addition.bats
|
||||
✓ addition using bc
|
||||
✓ addition using dc
|
||||
|
||||
2 tests, 0 failures
|
||||
|
||||
```
|
||||
#### Links
|
||||
- Bats repo: https://github.com/sstephenson/bats
|
||||
- Runc uses Bats https://github.com/opencontainers/runc/tree/master/tests/integration
|
||||
### Go Test
|
||||
|
||||
The testing package of Go also is quite feature rich for most of the use cases we need. Go 1.7 onwards there is support for setup & teardown parts and parallelism etc.
|
||||
#### Go - Testing package
|
||||
|
||||
- Support for setup and teardown based on https://golang.org/pkg/testing/#hdr-Main
|
||||
- Go testing already supports and has examples of table driven tests (Separating test & data), measuring test times and parallel tests
|
||||
#### Shell execution: Go's Exec Library
|
||||
GO provides a built in Exec library for working with CLI commands. The package seems good enough for us to work, though a few working examples will help decide better
|
||||
|
||||
https://golang.org/pkg/os/exec
|
||||
|
||||
### Using CLI package
|
||||
|
||||
Currently we build a CLI and then execute the tests. The tests basically call one of functions from CLI package. If we decide to use a go lang based framework, then we can import the CLI package and then call those functions by providing them context. This is as good as calling the Fission from CLI, with added benefit of programmibility of Go langugage.
|
||||
|
||||
```
|
||||
func TestSomething(t *testing.T) {
|
||||
// Build the Cli context with flags etc.
|
||||
ctx := cli.Context{}
|
||||
|
||||
// Pass the ctx to create function
|
||||
fnCreate(ctx)
|
||||
}
|
||||
```
|
||||
|
||||
Some of benefits of using above pattern are:
|
||||
- We can build a small framework around above core where we can pass various flag combinations etc. and exercise all flags in great detail
|
||||
- We can use rest of Go testing library and other libraries to build matchers, looping, parallelism etc.
|
||||
- It allows us to exercise the logic in CLI as well as validate the API at the same time.
|
||||
|
||||
### Ginkgo & Gomega
|
||||
|
||||
Ginkgo is a BDD framework which works with Gomega matcher library. I will state relevant portions of these two frameworks which can be utilized:
|
||||
|
||||
From Ginkgo:
|
||||
|
||||
- Global `BeforeSuite` and after `AfterSuite` can be used to have global setup and tear down phases
|
||||
- For tests `BeforeEach` and `AfterEach` and more such varients to do before and after test tasks.
|
||||
|
||||
From Gomega:
|
||||
|
||||
Gomega is a matcher library but the `gexec` library makes it really easy to interact with OS execution environment. Some working examples:
|
||||
|
||||
- Build and cleanup the Fission CLI before & after the tests
|
||||
```
|
||||
var fissionCli string
|
||||
|
||||
BeforeSuite(func() {
|
||||
var err error
|
||||
fissionCli, err = gexec.Build("github.com/fission/fission")
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
|
||||
AfterSuite(func() {
|
||||
gexec.CleanupBuildArtifacts()
|
||||
})
|
||||
```
|
||||
|
||||
- Following will run Fission commands with Fission CLI and print error if there is one (verbosity is configurable)
|
||||
|
||||
```
|
||||
command := exec.Command(fissionCli, "fission env create --name nodejs --image fission/node-env")
|
||||
session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
```
|
||||
|
||||
- Use Fission CLI's output to validate test results
|
||||
|
||||
```
|
||||
Eventually(session.Out).Should(gbytes.Say("hello [A-Za-z], world"))
|
||||
```
|
||||
#### Gomega Matchers
|
||||
|
||||
- Gomega provides quite a few built in matchers - so you don't have to code those small usual checks, for example:
|
||||
```
|
||||
Ω(ACTUAL).Should(BeTrue()) // The output should be true
|
||||
|
||||
Ω(ACTUAL).Should(BeAnExistingFile()) // The file should already exist
|
||||
|
||||
```
|
||||
There are many more matchers which cane be found here: http://onsi.github.io/gomega/#provided-matchers
|
||||
|
||||
- We can build custom mathers in Go language for reusable logic.
|
||||
|
||||
#### Links
|
||||
Ginkgo: http://onsi.github.io/ginkgo/
|
||||
Gomega: http://onsi.github.io/gomega/
|
||||
## Thoughts & Next actions
|
||||
|
||||
Based on the discussion with team, here are current thoughts and next action items:
|
||||
|
||||
### Thoughts
|
||||
- As far as possible we should stick to Go's built in testing package
|
||||
- Ginkgo's cleaner logging feature (Onlu log if there are errors) - is very useful. We can decide to incorporate this in future.
|
||||
- Gomega's (gexec)[http://onsi.github.io/gomega/#gexec-testing-external-processes] is really neat and some matchers can be used if necessary
|
||||
|
||||
### Action items
|
||||
- How will upgrade test for Fission fit in the framework?
|
||||
- How will migration of tests happen over time:
|
||||
- Aim is to keep existing tests around so that enough validation is in place
|
||||
- May be migrate one test at a time
|
||||
- How much of current setup etc. will move into framework? For example it is clear that helm commands should be part of test framework as part of setup/teardown. But other sections may or may not be. A RCA needs to be done to analyze and come up with clear demarkation.
|
||||
|
||||
## References
|
||||
|
||||
- EngineYard uses BATS: https://www.engineyard.com/blog/bats-test-command-line-tools
|
||||
- AWS CLI Tests, written in Python (CLI itself is also in Python): https://github.com/aws/aws-cli/tree/develop/tests
|
||||
- Kubernetes uses Ginkgo and Gomega extensively: https://github.com/kubernetes/kubernetes/search?l=Go&q=onsi&type=
|
||||
- Hashicorp's Mitchell's talk on Advanced testing with go talks about some good patterns to use: https://www.youtube.com/watch?v=8hQG7QlcLBk
|
||||
-221
@@ -1,221 +0,0 @@
|
||||
|
||||
- [Running Fission on your Cluster](#running-fission-on-your-cluster)
|
||||
* [Setup Kubernetes](#setup-kubernetes)
|
||||
+ [Install and start Kubernetes on OSX:](#install-and-start-kubernetes-on-osx)
|
||||
+ [Or, install and start Kubernetes on Linux:](#or-install-and-start-kubernetes-on-linux)
|
||||
* [Verify access to the cluster](#verify-access-to-the-cluster)
|
||||
* [Get and Run Fission: Minikube or Local cluster](#get-and-run-fission-minikube-or-local-cluster)
|
||||
* [Get and Run Fission: GKE or other Cloud](#get-and-run-fission-gke-or-other-cloud)
|
||||
* [Get and Run Fission: OpenShift](#get-and-run-fission-openshift)
|
||||
+ [Using Minishift or Local Cluster](#using-minishift-or-local-cluster)
|
||||
+ [Using other clouds](#using-other-clouds)
|
||||
* [Install the client CLI](#install-the-client-cli)
|
||||
* [Run an example](#run-an-example)
|
||||
* [Enable Persistent Function Logs (Optional)](#enable-persistent-function-logs-optional)
|
||||
* [Use the web based Fission-ui (Optional)](#use-the-web-based-fission-ui-optional)
|
||||
|
||||
## Running Fission on your Cluster
|
||||
|
||||
### Setup Kubernetes
|
||||
|
||||
You can install Kubernetes on your laptop with [minikube](https://github.com/kubernetes/minikube):
|
||||
|
||||
#### Install and start Kubernetes on OSX:
|
||||
```bash
|
||||
$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin
|
||||
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.16.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
|
||||
$ minikube start
|
||||
```
|
||||
|
||||
#### Or, install and start Kubernetes on Linux:
|
||||
```bash
|
||||
$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin
|
||||
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.16.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
|
||||
$ minikube start
|
||||
```
|
||||
|
||||
Or, you can use [Google Container Engine's](https://cloud.google.com/container-engine/) free trial to get a 3 node cluster.
|
||||
|
||||
### Verify access to the cluster
|
||||
|
||||
```
|
||||
$ kubectl version
|
||||
```
|
||||
|
||||
### Get and Run Fission: Minikube or Local cluster
|
||||
|
||||
If you're using minikube or no cloud provider, use these commands to
|
||||
set up services with NodePort. This exposes fission on ports 31313
|
||||
and 31314.
|
||||
|
||||
```
|
||||
$ kubectl create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-rbac.yaml
|
||||
$ kubectl create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-nodeport.yaml
|
||||
```
|
||||
|
||||
Set the FISSION_URL and FISSION_ROUTER environment variables.
|
||||
FISSION_URL is used by the fission CLI to find the server.
|
||||
FISSION_URL should be prefixed with a `http://`. (FISSION_ROUTER is
|
||||
only needed for the examples below to work.)
|
||||
|
||||
If you're using minikube, use these commands:
|
||||
|
||||
```
|
||||
$ export FISSION_URL=http://$(minikube ip):31313
|
||||
$ export FISSION_ROUTER=$(minikube ip):31314
|
||||
```
|
||||
|
||||
|
||||
### Get and Run Fission: GKE or other Cloud
|
||||
|
||||
If you're using GKE or any other cloud provider that supports the
|
||||
LoadBalancer service type, use these commands:
|
||||
|
||||
```
|
||||
$ kubectl create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-rbac.yaml
|
||||
$ kubectl create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-cloud.yaml
|
||||
```
|
||||
|
||||
Save the external IP addresses of controller and router services in
|
||||
FISSION_URL and FISSION_ROUTER, respectively. Wait for services to
|
||||
get IP addresses (check this with ```kubectl --namespace fission get
|
||||
svc```). Then:
|
||||
|
||||
```
|
||||
$ export FISSION_URL=http://$(kubectl --namespace fission get svc controller -o=jsonpath='{..ip}')
|
||||
$ export FISSION_ROUTER=$(kubectl --namespace fission get svc router -o=jsonpath='{..ip}')
|
||||
```
|
||||
|
||||
### Get and Run Fission: OpenShift
|
||||
|
||||
If you're using OpenShift, it's possible to run Fission on it! The
|
||||
deployment template needs to be deployed as a user with cluster-admin
|
||||
permissions (like `system:admin`), as it needs to create a
|
||||
`ClusterRole` for deploying function containers from the `fission`
|
||||
namespace/project.
|
||||
|
||||
Identically as with Kubernetes, you need to set the FISSION_URL and FISSION_ROUTER environment variables. If you're using minishift, use these commands:
|
||||
|
||||
```
|
||||
$ export FISSION_URL=http://$(minishift ip):31313¬
|
||||
$ export FISSION_ROUTER=$(minishift ip):31314¬
|
||||
```
|
||||
#### Using Minishift or Local Cluster
|
||||
|
||||
If you're using minishift or no cloud provider, use these commands to set up services with NodePort. This exposes fission on ports 31313 and 31314.
|
||||
|
||||
```
|
||||
$ oc login -u system:admin
|
||||
$ oc create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-openshift.yaml
|
||||
$ oc create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-nodeport.yaml
|
||||
```
|
||||
|
||||
#### Using other clouds
|
||||
|
||||
If you're using any cloud provider that supports the LoadBalancer service type, use these commands:
|
||||
|
||||
```
|
||||
$ oc login -u system:admin
|
||||
$ oc create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-openshift.yaml
|
||||
$ oc create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-cloud.yaml
|
||||
```
|
||||
After these steps, you should be able to run fission client as with kubernetes.
|
||||
|
||||
### Install the client CLI
|
||||
|
||||
#### Mac OS
|
||||
|
||||
Get the CLI binary for Mac:
|
||||
|
||||
```
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
```
|
||||
|
||||
#### Linux
|
||||
|
||||
```
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
For Windows, you can use the linux binary on WSL. Or you can download
|
||||
this windows executable: [fission.exe](https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-windows.exe)
|
||||
|
||||
### Run an example
|
||||
|
||||
Finally, you're ready to use Fission!
|
||||
|
||||
```
|
||||
$ fission env create --name nodejs --image fission/node-env
|
||||
|
||||
$ curl https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello.js > hello.js
|
||||
|
||||
$ fission function create --name hello --env nodejs --code hello.js
|
||||
|
||||
$ fission route create --method GET --url /hello --function hello
|
||||
|
||||
$ curl http://$FISSION_ROUTER/hello
|
||||
Hello, world!
|
||||
```
|
||||
|
||||
|
||||
### Enable Persistent Function Logs (Optional)
|
||||
|
||||
Fission uses InfluxDB to store logs and fluentd to forward them from
|
||||
function pods into InfluxDB.
|
||||
|
||||
```
|
||||
$ kubectl create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-logger.yaml
|
||||
```
|
||||
|
||||
That's it for the basic setup. You can now use following command to view function logs:
|
||||
|
||||
```
|
||||
$ fission function logs --name hello
|
||||
```
|
||||
|
||||
You can also list the all the pods that have hosted the function
|
||||
(including ones that aren't alive any more) and view logs for a
|
||||
particular pod:
|
||||
|
||||
```
|
||||
$ fission function pods --name hello
|
||||
|
||||
$ fission function logs --name hello --pod <pod name>
|
||||
```
|
||||
|
||||
### Use the web based Fission-ui (Optional)
|
||||
|
||||
[Fission-ui](https://github.com/fission/fission-ui) is the ui for fission maintained by the community.
|
||||
It allows users to observe and manage fission. It also provides a simple online development environment for serverless functions.
|
||||
|
||||
To setup Fission-ui with fission in k8s is simple:
|
||||
|
||||
```bash
|
||||
# Run this after fission is deployed
|
||||
$ kubectl create -f https://raw.githubusercontent.com/fission/fission-ui/master/docker/fission-ui.yaml
|
||||
```
|
||||
|
||||
Then open `http://node-ip:31319` to use Fission-ui.
|
||||
|
||||
For more infomation, please check out [Fission-ui Readme](https://github.com/fission/fission-ui/blob/master/README.md).
|
||||
|
||||
### Install NATS for message-queue based triggers (Optional)
|
||||
|
||||
Fission supports message queue triggers that allow you to invoke
|
||||
functions based on events in a queue. For now, NATS-Streaming is the
|
||||
only supported message queue.
|
||||
|
||||
You can install NATS Streaming on your Kubernetes cluster with:
|
||||
|
||||
```
|
||||
$ kubectl create -f https://github.com/fission/fission/releases/download/nightly20170705/fission-nats.yaml
|
||||
```
|
||||
|
||||
You can subscribe to a NATS Streaming queue with a command like this:
|
||||
(See `fission mqtrigger --help` for details)
|
||||
|
||||
```
|
||||
$ fission mqtrigger create --name myQueueTrigger --function processEvent --topic "myQueue.request"
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
# Copyright 2017 The Fission 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.
|
||||
.PHONY: test
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
IMAGE ?= fission/fission-bundle
|
||||
VERSION ?= latest
|
||||
ARCH ?= amd64
|
||||
OS ?= linux
|
||||
|
||||
test:
|
||||
go test -v $(go list ./... | grep -v /examples/ | grep -v /environments/)
|
||||
|
||||
build: build-bundle build-client
|
||||
|
||||
build-client:
|
||||
go build -o cmd/fission-cli/fission ./cmd/fission-cli/
|
||||
|
||||
build-bundle:
|
||||
CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o cmd/fission-bundle/fission-bundle ./cmd/fission-bundle/
|
||||
|
||||
build-image:
|
||||
docker build --rm --tag "$(IMAGE):$(VERSION)" cmd/fission-bundle/
|
||||
|
||||
install:
|
||||
go install ./cmd/fission-cli/
|
||||
|
||||
image: build-bundle build-image
|
||||
|
||||
image-push: image
|
||||
docker push "$(IMAGE):$(VERSION)"
|
||||
|
||||
clean:
|
||||
@rm -f fission-bundle/fission-bundle
|
||||
@rm -f fission/fission
|
||||
@@ -4,7 +4,7 @@ Fission: Serverless Functions for Kubernetes
|
||||
[](https://goreportcard.com/report/github.com/fission/fission)
|
||||
[](http://slack.fission.io)
|
||||
|
||||
[fission.io](http://fission.io) [@fissionio](http://twitter.com/fissionio)
|
||||
[fission.io](http://fission.io) [@fissionio](http://twitter.com/fissionio)
|
||||
|
||||
Fission is a fast serverless framework for Kubernetes with a focus on
|
||||
developer productivity and high performance.
|
||||
@@ -37,65 +37,37 @@ Building on Kubernetes also means that anything you do for operations
|
||||
on your Kubernetes cluster — such as monitoring or log
|
||||
aggregation — also helps with ops on your Fission deployment.
|
||||
|
||||
|
||||
Fission Concepts
|
||||
----------------
|
||||
|
||||
A _function_ is a piece of code that follows the fission function
|
||||
interface.
|
||||
|
||||
An _environment_ contains the language- and runtime-specific parts of
|
||||
running a function. Fission comes with NodeJS and Python
|
||||
environments; you can also extend environments or create entirely new
|
||||
ones if you want. (An environment is essentially just a container
|
||||
with a webserver and dynamic loader.)
|
||||
|
||||
A _trigger_ is something that maps an event to a function; Fission
|
||||
supports HTTP routes as triggers today, with upcoming support for
|
||||
other types of event triggers, such as timers and Kubernetes events.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
```bash
|
||||
|
||||
# Add the stock NodeJS env to your Fission deployment
|
||||
$ fission env create --name nodejs --image fission/node-env
|
||||
|
||||
# A javascript one-liner that prints "hello world"
|
||||
$ curl https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello.js > hello.js
|
||||
|
||||
# Upload your function code to fission
|
||||
$ fission function create --name hello --env nodejs --code hello.js
|
||||
|
||||
# Map GET /hello to your new function
|
||||
$ fission route create --method GET --url /hello --function hello
|
||||
|
||||
# Run the function. This takes about 100msec the first time.
|
||||
$ curl http://$FISSION_ROUTER/hello
|
||||
Hello, world!
|
||||
```
|
||||
|
||||
See the [examples](examples) directory for more.
|
||||
|
||||
Running Fission on your Cluster
|
||||
Getting started and documentation
|
||||
===============================
|
||||
|
||||
See the [installation guide](INSTALL.md).
|
||||
You can learn more about Fission and get started from [Fission Docs](https://docs.fission.io).
|
||||
* See the [installation guide](https://docs.fission.io/installation/) for installing and running Fission.
|
||||
* See the [troubleshooting guide](https://docs.fission.io/trouble-shooting/) for debugging your functions and Fission installation.
|
||||
|
||||
Compiling Fission
|
||||
Contributing
|
||||
=================
|
||||
|
||||
See the [compilation guide](Compiling.md).
|
||||
|
||||
Status
|
||||
======
|
||||
|
||||
Fission is in early alpha. It's not suitable for production use just
|
||||
yet.
|
||||
### Building Fission
|
||||
See the [compilation guide](https://docs.fission.io/contributing/).
|
||||
|
||||
### Contact
|
||||
Reach us on [slack](http://slack.fission.io) or
|
||||
[twitter](https://twitter.com/fissionio).
|
||||
|
||||
Fission is a project by [Platform9 Systems](https://platform9.com/fission/)
|
||||
and [many contributors](https://github.com/fission/fission/graphs/contributors).
|
||||
Fission is a project by [many contributors](https://github.com/fission/fission/graphs/contributors).
|
||||
|
||||
### Community meeting
|
||||
|
||||
A regular community meeting takes place every other Thursday at 08:30 AM PT (Pacific Time). [Convert to your local timezone](http://www.thetimezoneconverter.com/?t=08:30&tz=PT%20%28Pacific%20Time%29).
|
||||
|
||||
## Official Releases
|
||||
|
||||
Official releases of Fission can be found on [the releases page](https://github.com/fission/fission/releases).
|
||||
Please note that it is strongly recommended that you use official releases of Fission, as unreleased versions from
|
||||
the master branch are subject to changes and incompatibilities that will not be supported in the official releases.
|
||||
Builds from the master branch can have functionality changed and even removed at any time without compatibility support
|
||||
and without prior notice.
|
||||
|
||||
## Licensing
|
||||
|
||||
Fission is under the Apache 2.0 license.
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 builder
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/dchest/uniuri"
|
||||
)
|
||||
|
||||
const (
|
||||
// supported environment variables
|
||||
envSrcPkg = "SRC_PKG"
|
||||
envDeployPkg = "DEPLOY_PKG"
|
||||
)
|
||||
|
||||
type (
|
||||
PackageBuildRequest struct {
|
||||
SrcPkgFilename string `json:"srcPkgFilename"`
|
||||
// Command for builder to run with.
|
||||
// A build command consists of commands, parameters and environment variables.
|
||||
// For now, two environment variables are supported:
|
||||
// 1. SRC_PKG: path to source package directory
|
||||
// 2. DEPLOY_PKG: path to deployment package directory
|
||||
BuildCommand string `json:"command"`
|
||||
}
|
||||
|
||||
PackageBuildResponse struct {
|
||||
ArtifactFilename string `json:"artifactFilename"`
|
||||
BuildLogs string `json:"buildLogs"`
|
||||
}
|
||||
|
||||
Builder struct {
|
||||
sharedVolumePath string
|
||||
}
|
||||
)
|
||||
|
||||
func MakeBuilder(sharedVolumePath string) *Builder {
|
||||
return &Builder{
|
||||
sharedVolumePath: sharedVolumePath,
|
||||
}
|
||||
}
|
||||
|
||||
func (builder *Builder) Handler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != "POST" {
|
||||
http.Error(w, "", 405)
|
||||
return
|
||||
}
|
||||
|
||||
startTime := time.Now()
|
||||
defer func() {
|
||||
elapsed := time.Now().Sub(startTime)
|
||||
log.Printf("elapsed time in build request = %v", elapsed)
|
||||
}()
|
||||
|
||||
// parse request
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
log.Printf("Error reading request body")
|
||||
http.Error(w, err.Error(), 500)
|
||||
return
|
||||
}
|
||||
var req PackageBuildRequest
|
||||
err = json.Unmarshal(body, &req)
|
||||
if err != nil {
|
||||
log.Printf("Error parsing json body: %v", err)
|
||||
http.Error(w, err.Error(), 400)
|
||||
return
|
||||
}
|
||||
log.Printf("Builder received request: %v", req)
|
||||
|
||||
log.Println("Starting build...")
|
||||
srcPkgPath := filepath.Join(builder.sharedVolumePath, req.SrcPkgFilename)
|
||||
deployPkgFilename := fmt.Sprintf("%v-%v", req.SrcPkgFilename, strings.ToLower(uniuri.NewLen(6)))
|
||||
deployPkgPath := filepath.Join(builder.sharedVolumePath, deployPkgFilename)
|
||||
buildLogs, err := builder.build(req.BuildCommand, srcPkgPath, deployPkgPath)
|
||||
if err != nil {
|
||||
e := errors.New(fmt.Sprintf("Error building source package: %v", err))
|
||||
http.Error(w, e.Error(), 500)
|
||||
return
|
||||
}
|
||||
|
||||
resp := PackageBuildResponse{
|
||||
ArtifactFilename: deployPkgFilename,
|
||||
BuildLogs: buildLogs,
|
||||
}
|
||||
|
||||
rBody, err := json.Marshal(resp)
|
||||
if err != nil {
|
||||
e := errors.New(fmt.Sprintf("Error encoding response body: %v", err))
|
||||
http.Error(w, e.Error(), 500)
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
w.Write(rBody)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
func (builder *Builder) build(command string, srcPkgPath string, deployPkgPath string) (string, error) {
|
||||
cmd := exec.Command(command)
|
||||
cmd.Dir = srcPkgPath
|
||||
// set env variables for build command
|
||||
cmd.Env = append(os.Environ(),
|
||||
fmt.Sprintf("%v=%v", envSrcPkg, srcPkgPath),
|
||||
fmt.Sprintf("%v=%v", envDeployPkg, deployPkgPath),
|
||||
)
|
||||
|
||||
cmdReader, err := cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
return "", errors.New(fmt.Sprintf("Error creating stdout pipe for cmd: %v", err.Error()))
|
||||
}
|
||||
|
||||
scanner := bufio.NewScanner(cmdReader)
|
||||
|
||||
err = cmd.Start()
|
||||
if err != nil {
|
||||
return "", errors.New(fmt.Sprintf("Error starting cmd: %v", err.Error()))
|
||||
}
|
||||
|
||||
var buildLogs string
|
||||
|
||||
fmt.Println("\n=== Build Logs ===")
|
||||
for scanner.Scan() {
|
||||
output := scanner.Text()
|
||||
fmt.Println(output)
|
||||
buildLogs += fmt.Sprintf("%v\n", output)
|
||||
}
|
||||
fmt.Println("==================\n")
|
||||
|
||||
if err := scanner.Err(); err != nil {
|
||||
return "", errors.New(fmt.Sprintf("Error reading cmd output: %v", err.Error()))
|
||||
}
|
||||
|
||||
err = cmd.Wait()
|
||||
if err != nil {
|
||||
return "", errors.New(fmt.Sprintf("Error waiting for cmd: %v", err.Error()))
|
||||
}
|
||||
|
||||
return buildLogs, nil
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
FROM alpine:3.4
|
||||
|
||||
ADD builder /
|
||||
|
||||
EXPOSE 8000
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
GOOS=linux GOARCH=386 go build -o builder .
|
||||
+62
-25
@@ -5,7 +5,7 @@
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.6+ with Beta APIs enabled
|
||||
- Kubernetes 1.9 or later
|
||||
|
||||
|
||||
## Helm charts
|
||||
@@ -37,30 +37,67 @@ $ helm delete my-release
|
||||
|
||||
The following table lists the configurable parameters of the Fission chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------- | ------------------------------------------ | ------------------------ |
|
||||
| `serviceType` | Type of service to use | `LoadBalancer`. |
|
||||
| `image` | Fission image | `fission/fission-bundle` |
|
||||
| `imageTag` | Fission image tag | `alpha20170124` |
|
||||
| `fetcherImage` | Fission fetcher image | `fission/fetcher` |
|
||||
| `fetcherImageTag` | Fission fetcher image tag | `latest` |
|
||||
| `controllerPort` | Fission Controller Service Port | `31313` |
|
||||
| `routerPort` | Fission Router Service Port | `31314` |
|
||||
| `functionNamespace` | Namespace for Fission functions | `fission-function` |
|
||||
| `openshift` | RBAC for openshift | `false` |
|
||||
Parameter | Description | Default
|
||||
--------- | ----------- | -------
|
||||
`serviceType` | Type of Fission Controller service to use. For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP. | `ClusterIP`
|
||||
`routerServiceType` | Type of Fission Router service to use. For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP. | `LoadBalancer`
|
||||
`repository` | Image base repository | `index.docker.io`
|
||||
`image` | Fission image repository | `fission/fission-bundle`
|
||||
`imageTag` | Fission image tag | `1.6.0`
|
||||
`pullPolicy` | Image pull policy | `IfNotPresent`
|
||||
`fetcherImage` | Fission fetcher repository | `fission/fetcher`
|
||||
`fetcherImageTag` | Fission fetcher image tag | `1.6.0`
|
||||
`controllerPort` | Fission Controller service port | `31313`
|
||||
`routerPort` | Fission Router service port | ` 31314`
|
||||
`functionNamespace` | Namespace in which to run fission functions (this is different from the release namespace) | `fission-function`
|
||||
`builderNamespace` | Namespace in which to run fission builders (this is different from the release namespace) | `fission-builder`
|
||||
`enableIstio` | Enable istio integration | `false`
|
||||
`persistence.enabled` | If true, persist data to a persistent volume | `true`
|
||||
`persistence.existingClaim` | Provide an existing PersistentVolumeClaim instead of creating a new one | `nil`
|
||||
`persistence.storageClass` | PersistentVolumeClaim storage class | `nil`
|
||||
`persistence.accessMode` | PersistentVolumeClaim access mode | `ReadWriteOnce`
|
||||
`persistence.size` | PersistentVolumeClaim size | `8Gi`
|
||||
`analytics` | Analytics let us count how many people installed fission. Set to false to disable analytics | `true`
|
||||
`analyticsNonHelmInstall` | Internally used for generating an analytics job for non-helm installs | `false`
|
||||
`pruneInterval` | The frequency of archive pruner (in minutes) | `60`
|
||||
`preUpgradeChecksImage` | Fission pre-install/pre-upgrade checks live in this image | `fission/pre-upgrade-checks`
|
||||
`debugEnv` | If there are any pod specialization errors when a function is triggered and this flag is set to true, the error summary is returned as part of http response | `true`
|
||||
`prometheusDeploy` | Set to true if prometheus needs to be deployed along with fission | `true` in `fission-all`, `false` in `fission-core`
|
||||
`canaryDeployment.enabled` | Set to true if you need canary deployment feature | `true` in `fission-all`, `false` in `fission-core`
|
||||
`extraCoreComponentPodConfig` | Extend the container specs for the core fission pods. Can be used to add things like affinty/tolerations/nodeSelectors/etc. | None
|
||||
`router.deployAsDaemonSet` | Deploy router as DaemonSet instead of Deployment | `false`
|
||||
`router.svcAddressMaxRetries` | Max retries times for router to retry on a certain service URL returns from cache/executor | `5`
|
||||
`router.svcAddressUpdateTimeout` | The length of update lock expiry time for router to get a service URL returns from executor | `30`
|
||||
`router.svcAnnotations` | Annotations for router service | None
|
||||
`router.useEncodedPath` | For router to match encoded path. If true, "/foo%2Fbar" will match the path "/{var}"; Otherwise, it will match the path "/foo/bar". | `false`
|
||||
`router.roundTrip.disableKeepAlive` | Disable transport keep-alive for fast switching function version | `true`
|
||||
`router.roundTrip.keepAliveTime` | The keep-alive period for an active network connection to function pod | `30s`
|
||||
`router.roundTrip.timeout` | HTTP transport request timeout | `50ms`
|
||||
`router.roundTrip.timeoutExponent` | The length of request timeout will multiply with timeoutExponent after each retry | `2`
|
||||
`router.roundTrip.maxRetries` | Max retries times of a failed request | `10`
|
||||
|
||||
### Extra configuration for `fission-all`
|
||||
|
||||
* Extra configuration for `fission-all`
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ---------------------- | --------------------------- | -------------------------- |
|
||||
| `logger.influxdbAdmin` | Log database admin username | `admin`. |
|
||||
| `logger.fluentdImage` | Logger fluentd image | `fission/fluentd` |
|
||||
| `fissionUiImage` | Fission ui image | `fission/fission-ui:0.1.0` |
|
||||
| `nats.authToken` | Nats streaming auth token | `defaultFissionAuthToken` |
|
||||
| `nats.clusterID` | Nats streaming clusterID | `fissionMQTrigger` |
|
||||
|
||||
Parameter | Description | Default
|
||||
--------- | ----------- | -------
|
||||
`createNamespace` | If true, create `fission-function` and `fission-builder` namespaces | ` true`
|
||||
`logger.influxdbAdmin` | Log database admin username | `admin`
|
||||
`logger.fluentdImageRepository` | Logger fluentbit image repository | `index.docker.io`
|
||||
`logger.fluentdImage` | Logger fluentbit image | `fluent/fluent-bit`
|
||||
`logger.fluentdImageTag` | Logger fluentbit image tag | `1.0.4`
|
||||
`nats.enabled` | Nats streaming enabled | `true`
|
||||
`nats.authToken` | Nats streaming auth token | `defaultFissionAuthToken`
|
||||
`nats.clusterID` | Nats streaming clusterID | `fissionMQTrigger`
|
||||
`natsStreamingPort` | Nats streaming service port | `31316`
|
||||
`azureStorageQueue.enabled` | Azure storage account name | `false`
|
||||
`azureStorageQueue.key` | Azure storage account name | `""`
|
||||
`azureStorageQueue.accountName` | Azure storage access key | `""`
|
||||
`kafka.enabled` | Kafka trigger enabled | `false`
|
||||
`kafka.brokers` | Kafka brokers uri | `broker.kafka:9092`
|
||||
`kafka.version` | Kafka broker version | `nil`
|
||||
`heapster` | Enable Heapster (only enable this in clusters where heapster does not exist already) | `false`
|
||||
|
||||
Please note that deploying of Azure Storage Queue or Kafka is not done by Fission chart and you will have to explicitly deploy them.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
@@ -68,13 +105,13 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
|
||||
$ helm install --name my-release --set image=custom/fission-bundle,imageTag=v1 fission-all
|
||||
```
|
||||
|
||||
If you're using minikube, set serviceType to NodePort:
|
||||
If you're using minikube, set serviceType and routerServiceType to NodePort:
|
||||
|
||||
```bash
|
||||
$ helm install --name my-release --set serviceType=NodePort fission-all
|
||||
$ helm install --name my-release --set serviceType=NodePort,routerServiceType=NodePort fission-all
|
||||
```
|
||||
|
||||
You can also set parameters with a yaml file (see values.yaml for
|
||||
You can also set parameters with a yaml file (see [values.yaml](fission-all/values.yaml) for
|
||||
what it should look like):
|
||||
|
||||
```bash
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
apiVersion: v1
|
||||
name: fission-all
|
||||
version: v0.2.0-20170822
|
||||
version: 1.6.0
|
||||
description: Fission is a fast serverless framework for Kubernetes.
|
||||
keywords:
|
||||
- fission
|
||||
- serverless
|
||||
home: http://fission.io/
|
||||
maintainers:
|
||||
- name: Sanket Sudake
|
||||
email: sanketsudake@gmail.com
|
||||
- name: Soam Vasani
|
||||
email: soamvasani@platform9.com
|
||||
- name: Ta Ching Chen
|
||||
email: contact@tachingchen.com
|
||||
engine: gotpl
|
||||
appVersion: 1.6.0
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# Some stuff in this file is copied out of https://github.com/fluent/fluent-bit-kubernetes-logging/blob/master/output/kafka/fluent-bit-configmap.yaml
|
||||
[SERVICE]
|
||||
Flush 5
|
||||
Log_Level info
|
||||
Parsers_File parsers.conf
|
||||
|
||||
[INPUT]
|
||||
Name tail
|
||||
Tag log.*
|
||||
Path ${LOG_PATH}
|
||||
Mem_Buf_Limit 5MB
|
||||
Parser docker
|
||||
DB /var/log/fission/flb_kube.db
|
||||
Skip_Long_Lines On
|
||||
Refresh_Interval 10
|
||||
|
||||
[FILTER]
|
||||
Name kubernetes
|
||||
Match log.*
|
||||
Kube_URL https://kubernetes.default.svc.cluster.local:443
|
||||
|
||||
#
|
||||
# Flatten kubernetes labels so we can tag and query functionuid with influxdb
|
||||
#
|
||||
[FILTER]
|
||||
Name nest
|
||||
Match log.*
|
||||
Operation lift
|
||||
Nested_under kubernetes
|
||||
Prefix_with kubernetes_
|
||||
|
||||
[FILTER]
|
||||
Name nest
|
||||
Match log.*
|
||||
Operation lift
|
||||
Nested_under kubernetes_labels
|
||||
Prefix_with kubernetes_labels_
|
||||
|
||||
[OUTPUT]
|
||||
Name influxdb
|
||||
Match log.*
|
||||
Host ${INFLUXDB_ADDRESS}
|
||||
Port ${INFLUXDB_PORT}
|
||||
Database ${INFLUXDB_DBNAME}
|
||||
HTTP_User ${INFLUXDB_USERNAME}
|
||||
HTTP_Passwd ${INFLUXDB_PASSWD}
|
||||
Tag_Keys kubernetes_labels_functionUid
|
||||
Sequence_Tag _seq
|
||||
|
||||
|
||||
# Useful for testing config changes
|
||||
#[OUTPUT]
|
||||
# Name file
|
||||
# Match log.*
|
||||
# Path /flbout.txt
|
||||
@@ -0,0 +1,12 @@
|
||||
[PARSER]
|
||||
Name docker
|
||||
Format json
|
||||
Time_Key time
|
||||
Time_Format %Y-%m-%dT%H:%M:%S.%L
|
||||
Time_Keep On
|
||||
|
||||
# next bit is useful when the logs from the function itself are in json
|
||||
# Command | Decoder | Field | Optional Action
|
||||
# =============|==================|=================
|
||||
#Decode_Field_As escaped log
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
version: 7.1.0
|
||||
digest: sha256:867c8666d4dee6ae36b0e418f132f3187fd189bcbb36875f2c06e3fbe2402cfe
|
||||
generated: 2019-01-03T16:29:53.158684+01:00
|
||||
@@ -0,0 +1,5 @@
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
version: 7.1.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
condition: prometheusDeploy
|
||||
@@ -1,40 +1,25 @@
|
||||
1. Install the client CLI.
|
||||
|
||||
Mac:
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.6.0/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
|
||||
Linux:
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.6.0/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
|
||||
Windows:
|
||||
For Windows, you can use the linux binary on WSL. Or you can download this windows executable: https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-windows.exe
|
||||
For Windows, you can use the linux binary on WSL. Or you can download this windows executable: https://github.com/fission/fission/releases/download/1.6.0/fission-cli-windows.exe
|
||||
|
||||
2. Set the FISSION_URL and FISSION_ROUTER environment variables.
|
||||
FISSION_URL is used by the fission CLI to find the server.
|
||||
FISSION_URL should be prefixed with a http://. (FISSION_ROUTER is only needed for the examples below to work.)
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
$ export FISSION_URL=http://$(minikube ip):{{ .Values.controllerPort }}
|
||||
$ export FISSION_ROUTER=$(minikube ip):{{ .Values.routerPort }}
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl --namespace fission get -w svc' and 'kubectl --namespace fission get svc -w router'
|
||||
|
||||
$ export FISSION_URL=http://$(kubectl --namespace fission get svc controller -o=jsonpath='{..ip}')
|
||||
$ export FISSION_ROUTER=$(kubectl --namespace fission get svc router -o=jsonpath='{..ip}')
|
||||
|
||||
{{- end }}
|
||||
|
||||
3. Finally, you're ready to use Fission!
|
||||
2. You're ready to use Fission!
|
||||
|
||||
# Create an environment
|
||||
$ fission env create --name nodejs --image fission/node-env
|
||||
|
||||
# Get a hello world
|
||||
$ curl https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello.js > hello.js
|
||||
|
||||
# Register this function with Fission
|
||||
$ fission function create --name hello --env nodejs --code hello.js
|
||||
|
||||
$ fission route create --method GET --url /hello --function hello
|
||||
|
||||
$ curl http://$FISSION_ROUTER/hello
|
||||
# Run this function
|
||||
$ fission function test --name hello
|
||||
Hello, world!
|
||||
|
||||
@@ -14,3 +14,30 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
This is a template with config parameters for optional features in fission. This gets mounted on to the controller pod
|
||||
as a config map.
|
||||
To add new features with config parameters, create a yaml block below with the feature name and define a corresponding struct in
|
||||
controller/config.go
|
||||
*/}}
|
||||
{{- define "config" -}}
|
||||
canary:
|
||||
enabled: {{ .Values.canaryDeployment.enabled }}
|
||||
{{- if .Values.prometheusDeploy }}
|
||||
prometheusSvc: "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"
|
||||
{{- end }}
|
||||
{{- printf "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
This template generates the image name for the deployment depending on the value of "repository" field in values.yaml file.
|
||||
*/}}
|
||||
{{- define "fission-bundleImage" -}}
|
||||
{{- if .Values.repository -}}
|
||||
{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}
|
||||
{{- else -}}
|
||||
{{ .Values.image }}:{{ .Values.imageTag }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,78 +1,4 @@
|
||||
{{ if .Values.openshift }}
|
||||
|
||||
# For openshift
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ProjectRequest
|
||||
metadata:
|
||||
name: fission
|
||||
labels:
|
||||
name: fission
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ProjectRequest
|
||||
metadata:
|
||||
name: {{ .Values.functionNamespace }}
|
||||
labels:
|
||||
name: fission-function
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: fission-admin
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: fission:fission-admin
|
||||
rules:
|
||||
- apiGroups:
|
||||
- extensions
|
||||
attributeRestrictions: null
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
attributeRestrictions: null
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
groupNames: null
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: fission:fission-admin
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
roleRef:
|
||||
name: fission:fission-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-admin
|
||||
namespace: {{ .Release.Namespace }}
|
||||
userNames:
|
||||
- system:serviceaccount:fission:fission-admin
|
||||
|
||||
{{ else }}
|
||||
|
||||
# For all environments except openshift
|
||||
|
||||
---
|
||||
{{- if .Values.createNamespace }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
@@ -80,6 +6,52 @@ metadata:
|
||||
labels:
|
||||
name: fission-function
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
{{- if .Values.enableIstio }}
|
||||
istio-injection: enabled
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ .Values.builderNamespace }}
|
||||
labels:
|
||||
name: fission-builder
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
{{- if .Values.enableIstio }}
|
||||
istio-injection: enabled
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: secret-configmap-getter
|
||||
rules:
|
||||
- apiGroups:
|
||||
- '*'
|
||||
resources:
|
||||
- secrets
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: package-getter
|
||||
rules:
|
||||
- apiGroups:
|
||||
- '*'
|
||||
resources:
|
||||
- packages
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
@@ -90,7 +62,7 @@ metadata:
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: fission-admin
|
||||
namespace: {{ .Release.Namespace }}
|
||||
@@ -103,26 +75,11 @@ roleRef:
|
||||
name: admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: fission-function-admin
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-svc
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: fission-tpr
|
||||
name: fission-crd
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-svc
|
||||
@@ -138,119 +95,228 @@ kind: ServiceAccount
|
||||
metadata:
|
||||
name: fission-fetcher
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: fission-fetcher-tpr
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-fetcher
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
{{ end }}
|
||||
name: fission-builder
|
||||
namespace: {{ .Values.builderNamespace }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: feature-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
"config.yaml": {{ include "config" . | b64enc }}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: controller
|
||||
application: fission-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: controller
|
||||
application: fission-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: controller
|
||||
application: fission-api
|
||||
spec:
|
||||
containers:
|
||||
- name: controller
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--controllerPort", "8888"]
|
||||
args: ["--controllerPort", "8888", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: FISSION_FUNCTION_NAMESPACE
|
||||
value: "{{ .Values.functionNamespace }}"
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config/config.yaml
|
||||
subPath: config.yaml
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: feature-config
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: router
|
||||
name: executor
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: executor
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: router
|
||||
spec:
|
||||
containers:
|
||||
- name: router
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--routerPort", "8888", "--poolmgrUrl", "http://poolmgr.{{ .Release.Namespace }}"]
|
||||
serviceAccount: fission-svc
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: poolmgr
|
||||
labels:
|
||||
svc: poolmgr
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
selector:
|
||||
svc: poolmgr
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: poolmgr
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
matchLabels:
|
||||
svc: executor
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: poolmgr
|
||||
svc: executor
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/path: "/metrics"
|
||||
prometheus.io/port: "8080"
|
||||
spec:
|
||||
containers:
|
||||
- name: poolmgr
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
- name: executor
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--poolmgrPort", "8888", "--namespace", "{{ .Values.functionNamespace }}", "--fission-namespace", "{{ .Release.Namespace }}"]
|
||||
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: FETCHER_IMAGE
|
||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
||||
- name: FETCHER_IMAGE_PULL_POLICY
|
||||
value: "{{ .Values.pullPolicy }}"
|
||||
- name: RUNTIME_IMAGE_PULL_POLICY
|
||||
value: "{{ .Values.pullPolicy }}"
|
||||
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
||||
value: "{{ .Values.traceCollectorEndpoint }}"
|
||||
- name: ENABLE_ISTIO
|
||||
value: "{{ .Values.enableIstio }}"
|
||||
- name: FETCHER_MINCPU
|
||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
||||
- name: FETCHER_MINMEM
|
||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
||||
- name: FETCHER_MAXCPU
|
||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
||||
- name: FETCHER_MAXMEM
|
||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: metrics
|
||||
- containerPort: 8888
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: buildermgr
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: buildermgr
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: buildermgr
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: buildermgr
|
||||
spec:
|
||||
containers:
|
||||
- name: buildermgr
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: FETCHER_IMAGE
|
||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
||||
- name: FETCHER_IMAGE_PULL_POLICY
|
||||
value: "{{ .Values.pullPolicy }}"
|
||||
- name: BUILDER_IMAGE_PULL_POLICY
|
||||
value: "{{ .Values.pullPolicy }}"
|
||||
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
||||
value: "{{ .Values.traceCollectorEndpoint }}"
|
||||
- name: ENABLE_ISTIO
|
||||
value: "{{ .Values.enableIstio }}"
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: FETCHER_MINCPU
|
||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
||||
- name: FETCHER_MINMEM
|
||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
||||
- name: FETCHER_MAXCPU
|
||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
||||
- name: FETCHER_MAXMEM
|
||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kubewatcher
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: kubewatcher
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: kubewatcher
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -258,11 +324,19 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: kubewatcher
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--kubewatcher"]
|
||||
args: ["--kubewatcher", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
@@ -281,14 +355,18 @@ spec:
|
||||
svc: influxdb
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: influxdb
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: influxdb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: influxdb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -296,105 +374,85 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: influxdb
|
||||
image: tutum/influxdb
|
||||
image: fission/influxdb
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
env:
|
||||
- name: PRE_CREATE_DB
|
||||
value: fissionFunctionLog
|
||||
- name: ADMIN_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: username
|
||||
- name: INFLUXDB_INIT_PWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: password
|
||||
- name: PRE_CREATE_DB
|
||||
value: fissionFunctionLog
|
||||
- name: ADMIN_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: username
|
||||
- name: INFLUXDB_INIT_PWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: password
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.heapster }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: logger
|
||||
name: heapster
|
||||
namespace: kube-system
|
||||
labels:
|
||||
svc: heapster
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
kubernetes.io/cluster-service: 'true'
|
||||
kubernetes.io/name: heapster
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8082
|
||||
selector:
|
||||
svc: heapster
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: heapster
|
||||
namespace: kube-system
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: heapster
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: heapster
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: logger
|
||||
svc: heapster
|
||||
spec:
|
||||
containers:
|
||||
- name: logger
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--logger"]
|
||||
volumeMounts:
|
||||
- name: container-log
|
||||
mountPath: /var/log/containers
|
||||
readOnly: true
|
||||
- name: docker-log
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
- name: fission-log
|
||||
mountPath: /var/log/fission
|
||||
readOnly: false
|
||||
ports:
|
||||
- containerPort: 1234
|
||||
hostPort: 1234
|
||||
protocol: TCP
|
||||
- name: fluentd
|
||||
image: {{ .Values.logger.fluentdImage }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
env:
|
||||
- name: INFLUXDB_ADDRESS
|
||||
value: influxdb
|
||||
- name: INFLUXDB_PORT
|
||||
value: "8086"
|
||||
- name: INFLUXDB_DBNAME
|
||||
value: "fissionFunctionLog"
|
||||
- name: INFLUXDB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: username
|
||||
- name: INFLUXDB_PASSWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: password
|
||||
volumeMounts:
|
||||
- name: container-log
|
||||
mountPath: /var/log/containers
|
||||
readOnly: true
|
||||
- name: docker-log
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
- name: fission-log
|
||||
mountPath: /var/log/fission
|
||||
readOnly: false
|
||||
serviceAccount: fission-svc
|
||||
volumes:
|
||||
- name: container-log
|
||||
hostPath:
|
||||
path: /var/log/containers
|
||||
- name: docker-log
|
||||
hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
- name: fission-log
|
||||
hostPath:
|
||||
path: /var/log/fission
|
||||
|
||||
- name: heapster
|
||||
image: gcr.io/google_containers/heapster-amd64:v1.5.0
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command:
|
||||
- /heapster
|
||||
- --source=kubernetes:https://kubernetes.default
|
||||
serviceAccount: {{ .Release.Namespace }}/fission-svc
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: timer
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: timer
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: timer
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -402,11 +460,17 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: timer
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--timer"]
|
||||
args: ["--timer", "--routerUrl", "http://router.{{ .Release.Namespace }}"]
|
||||
env:
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
#
|
||||
# This is commented out until fission-ui allows configuring the
|
||||
@@ -414,7 +478,7 @@ spec:
|
||||
# "fission".
|
||||
#
|
||||
#---
|
||||
#apiVersion: extensions/v1beta1
|
||||
#apiVersion: apps/v1
|
||||
#kind: Deployment
|
||||
#metadata:
|
||||
# name: fission-ui
|
||||
@@ -429,14 +493,16 @@ spec:
|
||||
# spec:
|
||||
# containers:
|
||||
# - name: nginx
|
||||
# image: {{ .Values.fissionUiImage }}
|
||||
# image: {{ .Values.repository }}/{{ .Values.fissionUiImage }}
|
||||
# imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
# - name: kubectl-proxy
|
||||
# image: lachlanevenson/k8s-kubectl
|
||||
# image: {{ .Values.repository }}/lachlanevenson/k8s-kubectl
|
||||
# args: ["proxy", "--port", "8001", "--address", "127.0.0.1"]
|
||||
# serviceAccount: fission-svc
|
||||
|
||||
{{- if .Values.nats.enabled }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -444,6 +510,9 @@ metadata:
|
||||
name: nats-streaming
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: nats-streaming
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -452,35 +521,275 @@ spec:
|
||||
containers:
|
||||
- name: nats-streaming
|
||||
image: nats-streaming
|
||||
args: ["--cluster_id", "{{ .Values.nats.clusterID }}", "--auth", "{{ .Values.nats.authToken }}"]
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
args: [
|
||||
"--cluster_id", "{{ .Values.nats.clusterID }}",
|
||||
"--auth", "{{ .Values.nats.authToken }}",
|
||||
"--max_channels", "0",
|
||||
"--http_port", "4223"
|
||||
]
|
||||
ports:
|
||||
- containerPort: 4222
|
||||
hostPort: 4222
|
||||
protocol: TCP
|
||||
|
||||
- containerPort: 4223
|
||||
hostPort: 4223
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/streaming/serverz"
|
||||
port: 4223
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/streaming/serverz"
|
||||
port: 4223
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 5
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mqtrigger
|
||||
name: mqtrigger-nats-streaming
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: mqtrigger
|
||||
messagequeue: nats-streaming
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: mqtrigger
|
||||
messagequeue: nats-streaming
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: mqtrigger
|
||||
messagequeue: nats-streaming
|
||||
spec:
|
||||
containers:
|
||||
- name: mqtrigger
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--mqt", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: MESSAGE_QUEUE_TYPE
|
||||
value: nats-streaming
|
||||
- name: MESSAGE_QUEUE_URL
|
||||
value: nats://{{ .Values.nats.authToken }}@nats-streaming:4222
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.kafka.enabled }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mqtrigger-kafka
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: mqtrigger
|
||||
messagequeue: kafka
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: mqtrigger
|
||||
messagequeue: kafka
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: mqtrigger
|
||||
messagequeue: kafka
|
||||
spec:
|
||||
containers:
|
||||
- name: mqtrigger
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--mqt"]
|
||||
args: ["--mqt", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: MESSAGE_QUEUE_TYPE
|
||||
value: nats-streaming
|
||||
value: kafka
|
||||
- name: MESSAGE_QUEUE_URL
|
||||
value: nats://{{ .Values.nats.authToken }}@nats-streaming:4222
|
||||
value: "{{.Values.kafka.brokers}}"
|
||||
- name: MESSAGE_QUEUE_KAFKA_VERSION
|
||||
value: "{{.Values.kafka.version}}"
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
# TLS authentication is TLS with authentication (2 way)
|
||||
# More info: https://docs.confluent.io/current/kafka/authentication_ssl.html#ssl-overview
|
||||
{{- if .Values.kafka.authentication.tls.enabled }}
|
||||
- name: TLS_ENABLED
|
||||
value: "true"
|
||||
- name: MESSAGE_QUEUE_SECRETS
|
||||
value: /etc/fission/secrets
|
||||
volumeMounts:
|
||||
- name: kafka-secrets
|
||||
mountPath: /etc/fission/secrets
|
||||
{{- end }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.kafka.authentication.tls.enabled }}
|
||||
volumes:
|
||||
- name: kafka-secrets
|
||||
secret:
|
||||
secretName: mqtrigger-kafka-secrets
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
{{- if .Values.kafka.authentication.tls.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: mqtrigger-kafka-secrets
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
data:
|
||||
{{- if .Files.Get (printf "%s" .Values.kafka.authentication.tls.caCert) }}
|
||||
caCert: {{ .Files.Get (printf "%s" .Values.kafka.authentication.tls.caCert) | b64enc }}
|
||||
{{- else }}
|
||||
{{ fail "Invalid chart. CA Certificate not found." }}
|
||||
{{- end }}
|
||||
{{- if .Files.Get (printf "%s" .Values.kafka.authentication.tls.userCert) }}
|
||||
userCert: {{ .Files.Get (printf "%s" .Values.kafka.authentication.tls.userCert) | b64enc }}
|
||||
{{- else }}
|
||||
{{ fail "Invalid chart. User Certificate not found." }}
|
||||
{{- end }}
|
||||
{{- if .Files.Get (printf "%s" .Values.kafka.authentication.tls.userKey) }}
|
||||
userKey: {{ .Files.Get (printf "%s" .Values.kafka.authentication.tls.userKey) | b64enc }}
|
||||
{{- else }}
|
||||
{{ fail "Invalid chart. User Key not found." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.azureStorageQueue.enabled }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mqtrigger-azure-storage-queue
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: mqtrigger
|
||||
messagequeue: azure-storage-queue
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: mqtrigger
|
||||
messagequeue: azure-storage-queue
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: mqtrigger
|
||||
messagequeue: azure-storage-queue
|
||||
spec:
|
||||
containers:
|
||||
- name: mqtrigger
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--mqt", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: MESSAGE_QUEUE_TYPE
|
||||
value: azure-storage-queue
|
||||
- name: AZURE_STORAGE_ACCOUNT_NAME
|
||||
value: {{ required "An Azure storage account name is required." .Values.azureStorageQueue.accountName }}
|
||||
- name: AZURE_STORAGE_ACCOUNT_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: azure-storage-account-key
|
||||
key: key
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: storagesvc
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
spec:
|
||||
containers:
|
||||
- name: storagesvc
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--storageServicePort", "8000", "--filePath", "/fission", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: PRUNE_INTERVAL
|
||||
value: "{{.Values.pruneInterval}}"
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
volumeMounts:
|
||||
- name: fission-storage
|
||||
mountPath: /fission
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8000
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8000
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
volumes:
|
||||
- name: fission-storage
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.existingClaim | default "fission-storage-pvc" }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
# Fluentbit deployment for Fission
|
||||
#
|
||||
# Requires:
|
||||
# - service account: fission-svc
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-fission-fluentbit
|
||||
data:
|
||||
{{- if .Files.Get "config/fluentbit.conf" }}
|
||||
fluentbit.conf: |
|
||||
{{ .Files.Get "config/fluentbit.conf" | indent 3 }}
|
||||
{{ else }}
|
||||
{{ fail "invalid chart" }}
|
||||
{{- end }}
|
||||
{{- if .Files.Get "config/parsers.conf" }}
|
||||
parsers.conf: |
|
||||
{{ .Files.Get "config/parsers.conf" | indent 3 }}
|
||||
{{ else }}
|
||||
{{ fail "invalid chart" }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: logger
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: logger
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: logger
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: logger
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init
|
||||
image: busybox
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ['mkdir', '-p', '/var/log/fission']
|
||||
volumeMounts:
|
||||
- name: container-log
|
||||
mountPath: /var/log/
|
||||
readOnly: false
|
||||
containers:
|
||||
- name: logger
|
||||
{{ if .Values.repository }}
|
||||
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
{{ else }}
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
{{ end }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
env:
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--logger"]
|
||||
volumeMounts:
|
||||
- name: container-log
|
||||
mountPath: /var/log/
|
||||
readOnly: false
|
||||
- name: docker-log
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
- name: fluentbit
|
||||
{{- if .Values.repository }}
|
||||
image: "{{ .Values.logger.fluentdImageRepository }}/{{ .Values.logger.fluentdImage }}:{{ .Values.logger.fluentdImageTag }}"
|
||||
{{ else }}
|
||||
image: "{{ .Values.logger.fluentdImage }}:{{ .Values.logger.fluentdImageTag }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
# CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
|
||||
command: ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluentbit.conf"]
|
||||
env:
|
||||
- name: INFLUXDB_ADDRESS
|
||||
value: influxdb
|
||||
- name: INFLUXDB_PORT
|
||||
value: "8086"
|
||||
- name: INFLUXDB_DBNAME
|
||||
value: "fissionFunctionLog"
|
||||
- name: INFLUXDB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: username
|
||||
- name: INFLUXDB_PASSWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb
|
||||
key: password
|
||||
- name: LOG_PATH
|
||||
value: /var/log/fission/*.log
|
||||
volumeMounts:
|
||||
- name: container-log
|
||||
mountPath: /var/log/
|
||||
readOnly: false
|
||||
- name: docker-log
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
- name: fluentbit-config
|
||||
mountPath: /fluent-bit/etc/
|
||||
readOnly: true
|
||||
serviceAccount: fission-svc
|
||||
volumes:
|
||||
- name: container-log
|
||||
hostPath:
|
||||
path: /var/log/
|
||||
- name: docker-log
|
||||
hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
# Fluentbit config location: /fluent-bit/etc/*.conf
|
||||
- name: fluentbit-config
|
||||
configMap:
|
||||
name: {{ .Release.Name }}-fission-fluentbit
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
@@ -0,0 +1,32 @@
|
||||
{{- if .Values.analyticsNonHelmInstall }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}-{{ randNumeric 3 }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: {{ .Release.Name }}
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
spec:
|
||||
#ttlSecondsAfterFinished: 120
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
{{- if .Values.enableIstio }}
|
||||
"sidecar.istio.io/inject": "false"
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: post-install-job
|
||||
image: "fission/alpinecurl"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,36 @@
|
||||
{{- if .Values.analytics }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: {{ .Release.Name }}
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
# This is what defines this resource as a hook. Without this line, the
|
||||
# job is considered part of the release.
|
||||
"helm.sh/hook": post-install
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
{{- if .Values.enableIstio }}
|
||||
"sidecar.istio.io/inject": "false"
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: post-install-job
|
||||
image: "fission/alpinecurl"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,36 @@
|
||||
{{- if .Values.analytics }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: {{ .Release.Name }}
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
# This is what defines this resource as a hook. Without this line, the
|
||||
# job is considered part of the release.
|
||||
"helm.sh/hook": post-upgrade
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
{{- if .Values.enableIstio }}
|
||||
"sidecar.istio.io/inject": "false"
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: post-upgrade-job
|
||||
image: "fission/alpinecurl"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-upgrade\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,33 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}-{{ randNumeric 3 }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: "{{ .Release.Name }}"
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
# This is what defines this resource as a hook. Without this line, the
|
||||
# job is considered part of the release.
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
spec:
|
||||
backoffLimit: 0
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: "{{ .Release.Name }}"
|
||||
app: {{ template "name" . }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: pre-upgrade-job
|
||||
image: {{ .Values.preUpgradeChecksImage }}:{{ .Values.imageTag }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: [ "/pre-upgrade-checks" ]
|
||||
args: ["--fn-pod-namespace", "{{ .Values.functionNamespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
||||
serviceAccount: fission-svc
|
||||
@@ -0,0 +1,23 @@
|
||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: fission-storage-pvc
|
||||
labels:
|
||||
app: fission-storage
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
protocol: TCP
|
||||
name: redis
|
||||
selector:
|
||||
app: redis
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: redis
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
serviceName: redis
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:3.2-alpine
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: redis
|
||||
@@ -0,0 +1,90 @@
|
||||
apiVersion: apps/v1
|
||||
{{- if not .Values.router.deployAsDaemonSet }}
|
||||
kind: Deployment
|
||||
{{- else }}
|
||||
kind: DaemonSet
|
||||
{{- end }}
|
||||
metadata:
|
||||
name: router
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: router
|
||||
application: fission-router
|
||||
spec:
|
||||
{{- if not .Values.router.deployAsDaemonSet }}
|
||||
replicas: 1
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
application: fission-router
|
||||
svc: router
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
application: fission-router
|
||||
svc: router
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/path: "/metrics"
|
||||
prometheus.io/port: "8080"
|
||||
spec:
|
||||
containers:
|
||||
- name: router
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--routerPort", "8888", "--executorUrl", "http://executor.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: ROUTER_ROUND_TRIP_TIMEOUT
|
||||
value: {{ .Values.router.roundTrip.timeout | default "50ms" | quote }}
|
||||
- name: ROUTER_ROUNDTRIP_TIMEOUT_EXPONENT
|
||||
value: {{ .Values.router.roundTrip.timeoutExponent | default 2 | quote }}
|
||||
- name: ROUTER_ROUND_TRIP_KEEP_ALIVE_TIME
|
||||
value: {{ .Values.router.roundTrip.keepAliveTime | default "30s" | quote }}
|
||||
- name: ROUTER_ROUND_TRIP_DISABLE_KEEP_ALIVE
|
||||
value: {{ .Values.router.roundTrip.disableKeepAlive | default true | quote }}
|
||||
- name: ROUTER_ROUND_TRIP_MAX_RETRIES
|
||||
value: {{ .Values.router.roundTrip.maxRetries | default 10 | quote }}
|
||||
- name: ROUTER_SVC_ADDRESS_MAX_RETRIES
|
||||
value: {{ .Values.router.svcAddressMaxRetries | default 5 | quote }}
|
||||
- name: ROUTER_SVC_ADDRESS_UPDATE_TIMEOUT
|
||||
value: {{ .Values.router.svcAddressUpdateTimeout | default "30s" | quote }}
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: USE_ENCODED_PATH
|
||||
value: {{ .Values.router.useEncodedPath | default false | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
{{- if .Values.analytics }}
|
||||
- name: ANALYTICS_URL
|
||||
value: "https://g.fission.sh/metrics"
|
||||
{{- else if .Values.analyticsNonHelmInstall }}
|
||||
- name: ANALYTICS_URL
|
||||
value: "https://g.fission.sh/metrics"
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/router-healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/router-healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: metrics
|
||||
- containerPort: 8888
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
@@ -7,4 +7,17 @@ metadata:
|
||||
type: Opaque
|
||||
data:
|
||||
username: {{ .Values.logger.influxdbAdmin | b64enc | quote }}
|
||||
password: {{ randAlphaNum 20 | b64enc | quote }}
|
||||
password: {{ randAlphaNum 20 | b64enc | quote }}
|
||||
|
||||
{{- if .Values.azureStorageQueue.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: azure-storage-account-key
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
type: Opaque
|
||||
data:
|
||||
key: {{ required "An Azure storage access key is required." .Values.azureStorageQueue.key | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -4,13 +4,20 @@ metadata:
|
||||
name: router
|
||||
labels:
|
||||
svc: router
|
||||
application: fission-router
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
{{- if .Values.router.svcAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.router.svcAnnotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
type: {{ .Values.routerServiceType }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
{{- if eq .Values.routerServiceType "NodePort" }}
|
||||
nodePort: {{ .Values.routerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
svc: router
|
||||
|
||||
@@ -21,33 +28,20 @@ metadata:
|
||||
name: controller
|
||||
labels:
|
||||
svc: controller
|
||||
application: fission-api
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
{{- if eq .Values.serviceType "NodePort" }}
|
||||
nodePort: {{ .Values.controllerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
svc: controller
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: fission-ui
|
||||
labels:
|
||||
svc: fission-ui
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
nodePort: 31319
|
||||
selector:
|
||||
svc: fission-ui
|
||||
|
||||
{{- if .Values.nats.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@@ -61,7 +55,41 @@ spec:
|
||||
ports:
|
||||
- port: 4222
|
||||
targetPort: 4222
|
||||
nodePort: 31316
|
||||
{{- if eq .Values.serviceType "NodePort" }}
|
||||
nodePort: {{ .Values.natsStreamingPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
svc: nats-streaming
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: storagesvc
|
||||
labels:
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
selector:
|
||||
svc: storagesvc
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: executor
|
||||
labels:
|
||||
svc: executor
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
selector:
|
||||
svc: executor
|
||||
|
||||
+178
-11
@@ -1,10 +1,17 @@
|
||||
#
|
||||
# Fission chart configuration
|
||||
#
|
||||
#
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer.
|
||||
serviceType: LoadBalancer
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP.
|
||||
serviceType: ClusterIP
|
||||
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP.
|
||||
routerServiceType: LoadBalancer
|
||||
|
||||
## Image base repository
|
||||
## Leave it empty for using existing local image
|
||||
repository: index.docker.io
|
||||
|
||||
## Fission image repository
|
||||
image: fission/fission-bundle
|
||||
@@ -13,13 +20,13 @@ image: fission/fission-bundle
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
## Fission image version
|
||||
imageTag: v0.2.0-20170822
|
||||
imageTag: 1.6.0
|
||||
|
||||
## Fission fetcher repository
|
||||
fetcherImage: fission/fetcher
|
||||
|
||||
## Fission fetcher image version
|
||||
fetcherImageTag: v0.2.0-20170822
|
||||
fetcherImageTag: 1.6.0
|
||||
|
||||
## Port at which Fission controller service should be exposed
|
||||
controllerPort: 31313
|
||||
@@ -27,24 +34,184 @@ controllerPort: 31313
|
||||
## Port at which Fission router service should be exposed
|
||||
routerPort: 31314
|
||||
|
||||
## Port at which NATS streaming service should be exposed
|
||||
natsStreamingPort: 31316
|
||||
|
||||
## Set to false if you create the namespaces manually
|
||||
createNamespace: true
|
||||
|
||||
## Namespace in which to run fission functions (this is different from
|
||||
## the release namespace)
|
||||
functionNamespace: fission-function
|
||||
|
||||
## Set up openshift RBAC rule
|
||||
openshift: false
|
||||
## Namespace in which to run fission builders (this is different from
|
||||
## the release namespace)
|
||||
builderNamespace: fission-builder
|
||||
|
||||
## Enable istio integration
|
||||
enableIstio: false
|
||||
|
||||
## Logger config
|
||||
logger:
|
||||
influxdbAdmin: "admin"
|
||||
fluentdImage: fission/fluentd
|
||||
fluentdImageRepository: index.docker.io
|
||||
fluentdImage: fluent/fluent-bit
|
||||
fluentdImageTag: 1.0.4
|
||||
|
||||
## Fission ui config
|
||||
fissionUiImage: fission/fission-ui:0.1.0
|
||||
## Router config
|
||||
router:
|
||||
deployAsDaemonSet: false
|
||||
svcAddressMaxRetries: 5
|
||||
svcAddressUpdateTimeout: 30s
|
||||
## Add annotations for router
|
||||
# svcAnnotations:
|
||||
# cloud.google.com/load-balancer-type: Internal
|
||||
|
||||
## For router to match encoded path.
|
||||
## If true, "/foo%2Fbar" will match the path "/{var}";
|
||||
## Otherwise, it will match the path "/foo/bar".
|
||||
useEncodedPath: false
|
||||
|
||||
roundTrip:
|
||||
## If true, router will disable the HTTP keep-alive which result in performance degradation.
|
||||
## But it ensures that router can redirect new coming requests to new function pods.
|
||||
##
|
||||
## If false, router will enable transport keep-alive feature for better performance.
|
||||
## However, the drawback is it takes longer to switch to newly created function pods
|
||||
## if using newdeploy as executor type for function. If you want to preserve the
|
||||
## performance while keeping the short switching time to new function, you can create
|
||||
## an environment with short grace period by setting flag "--graceperiod" (default 360s),
|
||||
## so that kubernetes will be able to reap old function pod quickly.
|
||||
##
|
||||
## For details, see https://github.com/fission/fission/issues/723
|
||||
disableKeepAlive: false
|
||||
|
||||
## The keep-alive period for an active network connection to function pod.
|
||||
keepAliveTime: 30s
|
||||
|
||||
## HTTP transport request timeout
|
||||
timeout: 50ms
|
||||
|
||||
## The length of request timeout will multiply with timeoutExponent after each retry
|
||||
timeoutExponent: 2
|
||||
|
||||
## Max retries times of a failed request
|
||||
maxRetries: 10
|
||||
|
||||
## Message queue trigger config
|
||||
### NATS Streaming
|
||||
### NATS Streaming, enabled by default
|
||||
nats:
|
||||
enabled: true
|
||||
authToken: "defaultFissionAuthToken"
|
||||
clusterID: "fissionMQTrigger"
|
||||
|
||||
## Azure-storage-queue: enable and configure the details
|
||||
azureStorageQueue:
|
||||
enabled: false
|
||||
key: ""
|
||||
accountName: ""
|
||||
|
||||
## Kafka: enable and configure the details
|
||||
kafka:
|
||||
enabled: false
|
||||
# note: below link is only for reference.
|
||||
# Please use the brokers link for your kafka here.
|
||||
brokers: 'broker.kafka:9092' # or your-bootstrap-server.kafka:9092/9093
|
||||
authentication:
|
||||
tls:
|
||||
enabled: false
|
||||
caCert: '' # path to certificate containing public key of CA authority
|
||||
userCert: '' # path to certificate containing public key of the user signed by CA authority
|
||||
userKey: '' # path to private key of the user
|
||||
|
||||
# brokers: 'my-broker.kafka:9092' # or my-bootstrap-server.kafka:9092/9093
|
||||
# Sample config for authentication
|
||||
# authentication:
|
||||
# tls:
|
||||
# enabled: true
|
||||
# caCert: 'auth/kafka/ca.crt'
|
||||
# userCert: 'auth/kafka/user.crt'
|
||||
# userKey: 'auth/kafka/user.key'
|
||||
|
||||
## version of Kafka broker
|
||||
## For 0.x it must be a string in the format
|
||||
## "major.minor.veryMinor.patch" example: 0.8.2.0
|
||||
## For 1.x it must be a string in the format
|
||||
## "major.major.veryMinor" example: 2.0.1
|
||||
## Should be >= 0.11.2.0 to enable Kafka record headers support
|
||||
# version: "0.11.2.0"
|
||||
|
||||
## Persist data to a persistent volume.
|
||||
persistence:
|
||||
## If true, fission will create/use a Persistent Volume Claim
|
||||
## If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## A manually managed Persistent Volume Claim name
|
||||
## Requires persistence.enabled: true
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
|
||||
accessMode: ReadWriteOnce
|
||||
size: 8Gi
|
||||
|
||||
## Extend the container specs for the core fission pods.
|
||||
## Can be used to add things like affinty/tolerations/nodeSelectors/etc.
|
||||
## For example:
|
||||
## extraCoreComponentPodConfig:
|
||||
## affinity:
|
||||
## nodeAffinity:
|
||||
## requiredDuringSchedulingIgnoredDuringExecution:
|
||||
## nodeSelectorTerms:
|
||||
## - matchExpressions:
|
||||
## - key: capability
|
||||
## operator: In
|
||||
## values:
|
||||
## - app
|
||||
extraCoreComponentPodConfig:
|
||||
# affinity:
|
||||
# tolerations:
|
||||
# nodeSelector:
|
||||
|
||||
## Analytics let us count how many people installed fission. Set to
|
||||
## false to disable analytics.
|
||||
analytics: true
|
||||
|
||||
## Internally used for generating an analytics job for non-helm installs
|
||||
analyticsNonHelmInstall: false
|
||||
|
||||
## Enable Heapster only in clusters where heapster does not exist already
|
||||
heapster: false
|
||||
|
||||
## Archive pruner is a garbage collector for archives on the fission storage service.
|
||||
## This interval configures the frequency at which it runs inside the storagesvc pod.
|
||||
## The value is in minutes.
|
||||
pruneInterval: 60
|
||||
|
||||
## Fission pre-install/pre-upgrade checks live in this image
|
||||
preUpgradeChecksImage: fission/pre-upgrade-checks
|
||||
|
||||
## if there are any pod specialization errors when a function is triggered and this flag is set to true, the error
|
||||
## summary is returned as part of http response
|
||||
debugEnv: false
|
||||
|
||||
## set this flag to true if prometheus needs to be deployed along with fission
|
||||
prometheusDeploy: true
|
||||
|
||||
## set this flag to false if you dont need canary deployment feature
|
||||
canaryDeployment:
|
||||
enabled: true
|
||||
|
||||
# Use these flags to enable opentracing, the variable is endpoint of Jaeger collector in the format shown below
|
||||
#traceCollectorEndpoint: "http://jaeger-collector.jaeger.svc:14268/api/traces?format=jaeger.thrift"
|
||||
#traceSamplingRate: 0.75
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
apiVersion: v1
|
||||
name: fission-core
|
||||
version: v0.2.0-20170822
|
||||
version: 1.6.0
|
||||
description: Fission is a fast serverless framework for Kubernetes.
|
||||
keywords:
|
||||
- fission
|
||||
- serverless
|
||||
home: http://fission.io/
|
||||
maintainers:
|
||||
- name: Sanket Sudake
|
||||
email: sanketsudake@gmail.com
|
||||
- name: Soam Vasani
|
||||
email: soamvasani@platform9.com
|
||||
- name: Ta Ching Chen
|
||||
email: contact@tachingchen.com
|
||||
engine: gotpl
|
||||
appVersion: 1.6.0
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
version: 7.1.0
|
||||
digest: sha256:867c8666d4dee6ae36b0e418f132f3187fd189bcbb36875f2c06e3fbe2402cfe
|
||||
generated: 2019-06-03T10:47:50.335101619Z
|
||||
@@ -0,0 +1,5 @@
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
version: 7.1.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
condition: prometheusDeploy
|
||||
@@ -1,40 +1,25 @@
|
||||
1. Install the client CLI.
|
||||
|
||||
Mac:
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.6.0/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
|
||||
Linux:
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.6.0/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/
|
||||
|
||||
Windows:
|
||||
For Windows, you can use the linux binary on WSL. Or you can download this windows executable: https://github.com/fission/fission/releases/download/nightly20170705/fission-cli-windows.exe
|
||||
For Windows, you can use the linux binary on WSL. Or you can download this windows executable: https://github.com/fission/fission/releases/download/1.6.0/fission-cli-windows.exe
|
||||
|
||||
2. Set the FISSION_URL and FISSION_ROUTER environment variables.
|
||||
FISSION_URL is used by the fission CLI to find the server.
|
||||
FISSION_URL should be prefixed with a http://. (FISSION_ROUTER is only needed for the examples below to work.)
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
$ export FISSION_URL=http://$(minikube ip):{{ .Values.controllerPort }}
|
||||
$ export FISSION_ROUTER=$(minikube ip):{{ .Values.routerPort }}
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl --namespace fission get -w svc' and 'kubectl --namespace fission get svc -w router'
|
||||
|
||||
$ export FISSION_URL=http://$(kubectl --namespace fission get svc controller -o=jsonpath='{..ip}')
|
||||
$ export FISSION_ROUTER=$(kubectl --namespace fission get svc router -o=jsonpath='{..ip}')
|
||||
|
||||
{{- end }}
|
||||
|
||||
3. Finally, you're ready to use Fission!
|
||||
2. You're ready to use Fission!
|
||||
|
||||
# Create an environment
|
||||
$ fission env create --name nodejs --image fission/node-env
|
||||
|
||||
# Get a hello world
|
||||
$ curl https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello.js > hello.js
|
||||
|
||||
# Register this function with Fission
|
||||
$ fission function create --name hello --env nodejs --code hello.js
|
||||
|
||||
$ fission route create --method GET --url /hello --function hello
|
||||
|
||||
$ curl http://$FISSION_ROUTER/hello
|
||||
# Run this function
|
||||
$ fission function test --name hello
|
||||
Hello, world!
|
||||
|
||||
@@ -14,3 +14,29 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
This is a template with config parameters for optional features in fission. This gets mounted on to the controller pod
|
||||
as a config map.
|
||||
To add new features with config parameters, create a yaml block below with the feature name and define a corresponding struct in
|
||||
controller/config.go
|
||||
*/}}
|
||||
{{- define "config" -}}
|
||||
canary:
|
||||
enabled: {{ .Values.canaryDeployment.enabled }}
|
||||
{{- if .Values.prometheusDeploy }}
|
||||
prometheusSvc: "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"
|
||||
{{- end }}
|
||||
{{- printf "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
This template generates the image name for the deployment depending on the value of "repository" field in values.yaml file.
|
||||
*/}}
|
||||
{{- define "fission-bundleImage" -}}
|
||||
{{- if .Values.repository -}}
|
||||
{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}
|
||||
{{- else -}}
|
||||
{{ .Values.image }}:{{ .Values.imageTag }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,77 +1,3 @@
|
||||
{{ if .Values.openshift }}
|
||||
|
||||
# For openshift
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ProjectRequest
|
||||
metadata:
|
||||
name: fission
|
||||
labels:
|
||||
name: fission
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ProjectRequest
|
||||
metadata:
|
||||
name: {{ .Values.functionNamespace }}
|
||||
labels:
|
||||
name: fission-function
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: fission-admin
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: fission:fission-admin
|
||||
rules:
|
||||
- apiGroups:
|
||||
- extensions
|
||||
attributeRestrictions: null
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
attributeRestrictions: null
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
groupNames: null
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: fission:fission-admin
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
roleRef:
|
||||
name: fission:fission-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-admin
|
||||
namespace: {{ .Release.Namespace }}
|
||||
userNames:
|
||||
- system:serviceaccount:fission:fission-admin
|
||||
|
||||
{{ else }}
|
||||
|
||||
# For all environments except openshift
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
@@ -80,6 +6,52 @@ metadata:
|
||||
labels:
|
||||
name: fission-function
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
{{- if .Values.enableIstio }}
|
||||
istio-injection: enabled
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ .Values.builderNamespace }}
|
||||
labels:
|
||||
name: fission-builder
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
{{- if .Values.enableIstio }}
|
||||
istio-injection: enabled
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: secret-configmap-getter
|
||||
rules:
|
||||
- apiGroups:
|
||||
- '*'
|
||||
resources:
|
||||
- secrets
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: package-getter
|
||||
rules:
|
||||
- apiGroups:
|
||||
- '*'
|
||||
resources:
|
||||
- packages
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
@@ -90,7 +62,7 @@ metadata:
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: fission-admin
|
||||
namespace: {{ .Release.Namespace }}
|
||||
@@ -103,26 +75,11 @@ roleRef:
|
||||
name: admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: fission-function-admin
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-svc
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: fission-tpr
|
||||
name: fission-crd
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-svc
|
||||
@@ -140,117 +97,220 @@ metadata:
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: fission-fetcher-tpr
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: fission-fetcher
|
||||
namespace: {{ .Values.functionNamespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
{{ end }}
|
||||
name: fission-builder
|
||||
namespace: {{ .Values.builderNamespace }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: feature-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
"config.yaml": {{ include "config" . | b64enc }}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: controller
|
||||
application: fission-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: controller
|
||||
application: fission-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: controller
|
||||
application: fission-api
|
||||
spec:
|
||||
containers:
|
||||
- name: controller
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--controllerPort", "8888"]
|
||||
args: ["--controllerPort", "8888", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: FISSION_FUNCTION_NAMESPACE
|
||||
value: "{{ .Values.functionNamespace }}"
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config/config.yaml
|
||||
subPath: config.yaml
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: feature-config
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: router
|
||||
name: executor
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: executor
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: router
|
||||
spec:
|
||||
containers:
|
||||
- name: router
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--routerPort", "8888", "--poolmgrUrl", "http://poolmgr.{{ .Release.Namespace }}"]
|
||||
serviceAccount: fission-svc
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: poolmgr
|
||||
labels:
|
||||
svc: poolmgr
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
selector:
|
||||
svc: poolmgr
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: poolmgr
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
matchLabels:
|
||||
svc: executor
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: poolmgr
|
||||
svc: executor
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/path: "/metrics"
|
||||
prometheus.io/port: "8080"
|
||||
spec:
|
||||
containers:
|
||||
- name: poolmgr
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
- name: executor
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--poolmgrPort", "8888", "--namespace", "{{ .Values.functionNamespace }}", "--fission-namespace", "{{ .Release.Namespace }}"]
|
||||
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: FETCHER_IMAGE
|
||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
||||
- name: FETCHER_IMAGE_PULL_POLICY
|
||||
value: "{{ .Values.pullPolicy }}"
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: ENABLE_ISTIO
|
||||
value: "{{ .Values.enableIstio }}"
|
||||
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
||||
value: "{{ .Values.traceCollectorEndpoint }}"
|
||||
- name: FETCHER_MINCPU
|
||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
||||
- name: FETCHER_MINMEM
|
||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
||||
- name: FETCHER_MAXCPU
|
||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
||||
- name: FETCHER_MAXMEM
|
||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: metrics
|
||||
- containerPort: 8888
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: buildermgr
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: buildermgr
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: buildermgr
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: buildermgr
|
||||
spec:
|
||||
containers:
|
||||
- name: buildermgr
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: FETCHER_IMAGE
|
||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
||||
- name: FETCHER_IMAGE_PULL_POLICY
|
||||
value: "{{ .Values.pullPolicy }}"
|
||||
- name: BUILDER_IMAGE_PULL_POLICY
|
||||
value: "{{ .Values.pullPolicy }}"
|
||||
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
||||
value: "{{ .Values.traceCollectorEndpoint }}"
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: ENABLE_ISTIO
|
||||
value: "{{ .Values.enableIstio }}"
|
||||
- name: FETCHER_MINCPU
|
||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
||||
- name: FETCHER_MINMEM
|
||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
||||
- name: FETCHER_MAXCPU
|
||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
||||
- name: FETCHER_MAXMEM
|
||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kubewatcher
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: kubewatcher
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: kubewatcher
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -258,21 +318,31 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: kubewatcher
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--kubewatcher"]
|
||||
args: ["--kubewatcher", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: timer
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: timer
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: timer
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -280,8 +350,65 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: timer
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--timer"]
|
||||
args: ["--timer", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: storagesvc
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
spec:
|
||||
containers:
|
||||
- name: storagesvc
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--storageServicePort", "8000", "--filePath", "/fission", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: PRUNE_INTERVAL
|
||||
value: "{{.Values.pruneInterval}}"
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
volumeMounts:
|
||||
- name: fission-storage
|
||||
mountPath: /fission
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
volumes:
|
||||
- name: fission-storage
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.existingClaim | default "fission-storage-pvc" }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{{- if .Values.analyticsNonHelmInstall }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}-{{ randNumeric 3 }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: {{ .Release.Name }}
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
spec:
|
||||
#ttlSecondsAfterFinished: 120
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
{{- if .Values.enableIstio }}
|
||||
"sidecar.istio.io/inject": "false"
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: post-install-job
|
||||
image: "fission/alpinecurl"
|
||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,35 @@
|
||||
{{- if .Values.analytics }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: {{ .Release.Name }}
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
# This is what defines this resource as a hook. Without this line, the
|
||||
# job is considered part of the release.
|
||||
"helm.sh/hook": post-install
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
{{- if .Values.enableIstio }}
|
||||
"sidecar.istio.io/inject": "false"
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: post-install-job
|
||||
image: "fission/alpinecurl"
|
||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,35 @@
|
||||
{{- if .Values.analytics }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: {{ .Release.Name }}
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
# This is what defines this resource as a hook. Without this line, the
|
||||
# job is considered part of the release.
|
||||
"helm.sh/hook": post-upgrade
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
{{- if .Values.enableIstio }}
|
||||
"sidecar.istio.io/inject": "false"
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: post-upgrade-job
|
||||
image: "fission/alpinecurl"
|
||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-upgrade\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,33 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-{{ .Chart.Version }}-{{ randNumeric 3 }}
|
||||
labels:
|
||||
# The "release" convention makes it easy to tie a release to all of the
|
||||
# Kubernetes resources that were created as part of that release.
|
||||
release: "{{ .Release.Name }}"
|
||||
# This makes it easy to audit chart usage.
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app: {{ template "name" . }}
|
||||
annotations:
|
||||
# This is what defines this resource as a hook. Without this line, the
|
||||
# job is considered part of the release.
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
spec:
|
||||
backoffLimit: 0
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
release: "{{ .Release.Name }}"
|
||||
app: {{ template "name" . }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: pre-upgrade-job
|
||||
image: {{ .Values.preUpgradeChecksImage }}:{{ .Values.imageTag }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: [ "/pre-upgrade-checks" ]
|
||||
args: ["--fn-pod-namespace", "{{ .Values.functionNamespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
||||
serviceAccount: fission-svc
|
||||
@@ -0,0 +1,23 @@
|
||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: fission-storage-pvc
|
||||
labels:
|
||||
app: fission-storage
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,90 @@
|
||||
apiVersion: apps/v1
|
||||
{{- if not .Values.router.deployAsDaemonSet }}
|
||||
kind: Deployment
|
||||
{{- else }}
|
||||
kind: DaemonSet
|
||||
{{- end }}
|
||||
metadata:
|
||||
name: router
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
svc: router
|
||||
application: fission-router
|
||||
spec:
|
||||
{{- if not .Values.router.deployAsDaemonSet }}
|
||||
replicas: 1
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
application: fission-router
|
||||
svc: router
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
application: fission-router
|
||||
svc: router
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/path: "/metrics"
|
||||
prometheus.io/port: "8080"
|
||||
spec:
|
||||
containers:
|
||||
- name: router
|
||||
image: {{ include "fission-bundleImage" . | quote }}
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--routerPort", "8888", "--executorUrl", "http://executor.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: ROUTER_ROUND_TRIP_TIMEOUT
|
||||
value: {{ .Values.router.roundTrip.timeout | default "50ms" | quote }}
|
||||
- name: ROUTER_ROUNDTRIP_TIMEOUT_EXPONENT
|
||||
value: {{ .Values.router.roundTrip.timeoutExponent | default 2 | quote }}
|
||||
- name: ROUTER_ROUND_TRIP_KEEP_ALIVE_TIME
|
||||
value: {{ .Values.router.roundTrip.keepAliveTime | default "30s" | quote }}
|
||||
- name: ROUTER_ROUND_TRIP_DISABLE_KEEP_ALIVE
|
||||
value: {{ .Values.router.roundTrip.disableKeepAlive | default true | quote }}
|
||||
- name: ROUTER_ROUND_TRIP_MAX_RETRIES
|
||||
value: {{ .Values.router.roundTrip.maxRetries | default 10 | quote }}
|
||||
- name: ROUTER_SVC_ADDRESS_MAX_RETRIES
|
||||
value: {{ .Values.router.svcAddressMaxRetries | default 5 | quote }}
|
||||
- name: ROUTER_SVC_ADDRESS_UPDATE_TIMEOUT
|
||||
value: {{ .Values.router.svcAddressUpdateTimeout | default "30s" | quote }}
|
||||
- name: TRACING_SAMPLING_RATE
|
||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||
- name: USE_ENCODED_PATH
|
||||
value: {{ .Values.router.useEncodedPath | default false | quote }}
|
||||
- name: DEBUG_ENV
|
||||
value: {{ .Values.debugEnv | quote }}
|
||||
{{- if .Values.analytics }}
|
||||
- name: ANALYTICS_URL
|
||||
value: "https://g.fission.sh/metrics"
|
||||
{{- else if .Values.analyticsNonHelmInstall }}
|
||||
- name: ANALYTICS_URL
|
||||
value: "https://g.fission.sh/metrics"
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/router-healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/router-healthz"
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: metrics
|
||||
- containerPort: 8888
|
||||
name: http
|
||||
serviceAccount: fission-svc
|
||||
{{- if .Values.extraCoreComponentPodConfig }}
|
||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||
{{- end }}
|
||||
@@ -4,13 +4,20 @@ metadata:
|
||||
name: router
|
||||
labels:
|
||||
svc: router
|
||||
application: fission-router
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
{{- if .Values.router.svcAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.router.svcAnnotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
type: {{ .Values.routerServiceType }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
{{- if eq .Values.routerServiceType "NodePort" }}
|
||||
nodePort: {{ .Values.routerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
svc: router
|
||||
|
||||
@@ -21,12 +28,48 @@ metadata:
|
||||
name: controller
|
||||
labels:
|
||||
svc: controller
|
||||
application: fission-api
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
{{- if eq .Values.serviceType "NodePort" }}
|
||||
nodePort: {{ .Values.controllerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
svc: controller
|
||||
svc: controller
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: storagesvc
|
||||
labels:
|
||||
svc: storagesvc
|
||||
application: fission-storage
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
selector:
|
||||
svc: storagesvc
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: executor
|
||||
labels:
|
||||
svc: executor
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
selector:
|
||||
svc: executor
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
#
|
||||
# Fission chart configuration
|
||||
#
|
||||
#
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer.
|
||||
serviceType: LoadBalancer
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP.
|
||||
serviceType: ClusterIP
|
||||
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP.
|
||||
routerServiceType: LoadBalancer
|
||||
|
||||
## Image base repository
|
||||
## Leave it empty for using existing local image
|
||||
repository: index.docker.io
|
||||
|
||||
## Fission image repository
|
||||
image: fission/fission-bundle
|
||||
|
||||
## Fission image version
|
||||
imageTag: v0.2.0-20170822
|
||||
imageTag: 1.6.0
|
||||
|
||||
## Image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
@@ -19,7 +26,7 @@ pullPolicy: IfNotPresent
|
||||
fetcherImage: fission/fetcher
|
||||
|
||||
## Fission fetcher image version
|
||||
fetcherImageTag: v0.2.0-20170822
|
||||
fetcherImageTag: 1.6.0
|
||||
|
||||
## Port at which Fission controller service should be exposed
|
||||
controllerPort: 31313
|
||||
@@ -31,5 +38,121 @@ routerPort: 31314
|
||||
## the release namespace)
|
||||
functionNamespace: fission-function
|
||||
|
||||
## Set up openshift RBAC rule
|
||||
openshift: false
|
||||
## Namespace in which to run fission builders (this is different from
|
||||
## the release namespace)
|
||||
builderNamespace: fission-builder
|
||||
|
||||
## Enable istio integration
|
||||
enableIstio: false
|
||||
|
||||
## Router config
|
||||
router:
|
||||
deployAsDaemonSet: false
|
||||
svcAddressMaxRetries: 5
|
||||
svcAddressUpdateTimeout: 30s
|
||||
## Add annotations for router
|
||||
# svcAnnotations:
|
||||
# cloud.google.com/load-balancer-type: Internal
|
||||
|
||||
## For router to match encoded path.
|
||||
## If true, "/foo%2Fbar" will match the path "/{var}";
|
||||
## Otherwise, it will match the path "/foo/bar".
|
||||
useEncodedPath: false
|
||||
|
||||
roundTrip:
|
||||
## If true, router will disable the HTTP keep-alive which result in performance degradation.
|
||||
## But it ensures that router can redirect new coming requests to new function pods.
|
||||
##
|
||||
## If false, router will enable transport keep-alive feature for better performance.
|
||||
## However, the drawback is it takes longer to switch to newly created function pods
|
||||
## if using newdeploy as executor type for function. If you want to preserve the
|
||||
## performance while keeping the short switching time to new function, you can create
|
||||
## an environment with short grace period by setting flag "--graceperiod" (default 360s),
|
||||
## so that kubernetes will be able to reap old function pod quickly.
|
||||
##
|
||||
## For details, see https://github.com/fission/fission/issues/723
|
||||
disableKeepAlive: true
|
||||
|
||||
## The keep-alive period for an active network connection to function pod.
|
||||
keepAliveTime: 30s
|
||||
|
||||
## HTTP transport request timeout
|
||||
timeout: 50ms
|
||||
|
||||
## The length of request timeout will multiply with timeoutExponent after each retry
|
||||
timeoutExponent: 2
|
||||
|
||||
## Max retries times of a failed request
|
||||
maxRetries: 10
|
||||
|
||||
## Persist data to a persistent volume.
|
||||
persistence:
|
||||
## If true, fission will create/use a Persistent Volume Claim
|
||||
## If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## A manually managed Persistent Volume Claim name
|
||||
## Requires persistence.enabled: true
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
##
|
||||
# existingClaim:
|
||||
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
|
||||
accessMode: ReadWriteOnce
|
||||
size: 8Gi
|
||||
|
||||
## Extend the container specs for the core fission pods.
|
||||
## Can be used to add things like affinty/tolerations/nodeSelectors/etc.
|
||||
## For example:
|
||||
## extraCoreComponentPodConfig:
|
||||
## affinity:
|
||||
## nodeAffinity:
|
||||
## requiredDuringSchedulingIgnoredDuringExecution:
|
||||
## nodeSelectorTerms:
|
||||
## - matchExpressions:
|
||||
## - key: capability
|
||||
## operator: In
|
||||
## values:
|
||||
## - app
|
||||
extraCoreComponentPodConfig:
|
||||
# affinity:
|
||||
# tolerations:
|
||||
# nodeSelector:
|
||||
|
||||
## Analytics let us count how many people installed fission. Set to
|
||||
## false to disable analytics.
|
||||
analytics: true
|
||||
|
||||
## Internally used for generating an analytics job for non-helm installs
|
||||
analyticsNonHelmInstall: false
|
||||
|
||||
## Archive pruner is a garbage collector for archives on the fission storage service.
|
||||
## This interval configures the frequency at which it runs inside the storagesvc pod.
|
||||
## The value is in minutes.
|
||||
pruneInterval: 60
|
||||
|
||||
## Fission pre-install/pre-upgrade checks live in this image
|
||||
preUpgradeChecksImage: fission/pre-upgrade-checks
|
||||
|
||||
## if there are any pod specialization errors when a function is triggered and this flag is set to true, the error
|
||||
## summary is returned as part of http response
|
||||
debugEnv: false
|
||||
|
||||
## set this flag to true if prometheus needs to be deployed along with fission
|
||||
prometheusDeploy: false
|
||||
|
||||
## set this flag to false if you dont need canary deployment feature
|
||||
canaryDeployment:
|
||||
enabled: false
|
||||
|
||||
# Use these flags to enable opentracing, the variable is endpoint of Jaeger collector in the format shown below
|
||||
#traceCollectorEndpoint: "http://jaeger-collector.jaeger.svc:14268/api/traces?format=jaeger.thrift"
|
||||
#traceSamplingRate: 0.75
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
FROM golang:1.12-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
ENV GO111MODULE=on
|
||||
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# To reuse build cache, copy go.mod & go.sum and download dependencies first.
|
||||
COPY go.* ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
From godep as builder
|
||||
|
||||
ARG GOPKG
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# Copy whole fission directory to work dir
|
||||
COPY ./ ./
|
||||
|
||||
WORKDIR /go/src/${GOPKG}/cmd/builder
|
||||
|
||||
ARG GITCOMMIT=unknown
|
||||
# E.g. GITCOMMIT=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDVERSION=unknown
|
||||
# E.g. BUILDVERSION=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDDATE=unknown
|
||||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
|
||||
-o /go/bin/builder \
|
||||
-gcflags=-trimpath=$GOPATH \
|
||||
-asmflags=-trimpath=$GOPATH \
|
||||
-ldflags "-X github.com/fission/fission/pkg/info.GitCommit=${GITCOMMIT} -X github.com/fission/fission/pkg/info.BuildDate=${BUILDDATE} -X github.com/fission/fission/pkg/info.Version=${BUILDVERSION}"
|
||||
|
||||
FROM alpine:3.10 as base
|
||||
RUN apk add --update ca-certificates
|
||||
COPY --from=builder /go/bin/builder /
|
||||
EXPOSE 8001
|
||||
|
||||
ENTRYPOINT ["/builder"]
|
||||
@@ -14,29 +14,24 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package main
|
||||
package app
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
builder "github.com/fission/fission/builder"
|
||||
"go.uber.org/zap"
|
||||
|
||||
builder "github.com/fission/fission/pkg/builder"
|
||||
)
|
||||
|
||||
// Usage: builder <shared volume path>
|
||||
func main() {
|
||||
dir := os.Args[1]
|
||||
if _, err := os.Stat(dir); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(dir, os.ModeDir|0700)
|
||||
if err != nil {
|
||||
log.Fatalf("Error creating directory: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
builder := builder.MakeBuilder(dir)
|
||||
func Run(logger *zap.Logger, shareVolume string) error {
|
||||
builder := builder.MakeBuilder(logger, shareVolume)
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/", builder.Handler)
|
||||
http.ListenAndServe(":8000", mux)
|
||||
mux.HandleFunc("/version", builder.VersionHandler)
|
||||
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
})
|
||||
return http.ListenAndServe(":8001", mux)
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2018 The Fission 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 main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/fission/fission/cmd/builder/app"
|
||||
)
|
||||
|
||||
// Usage: builder <shared volume path>
|
||||
func main() {
|
||||
logger, err := zap.NewProduction()
|
||||
if err != nil {
|
||||
log.Fatalf("can't initialize zap logger: %v", err)
|
||||
}
|
||||
defer logger.Sync()
|
||||
|
||||
shareVolume := os.Args[1]
|
||||
if _, err := os.Stat(shareVolume); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(shareVolume, os.ModeDir|0700)
|
||||
if err != nil {
|
||||
logger.Fatal("error creating directory: %v", zap.Error(err), zap.String("directory", shareVolume))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
err = app.Run(logger, shareVolume)
|
||||
logger.Error("error running builder", zap.Error(err))
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
FROM golang:1.12-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
ENV GO111MODULE=on
|
||||
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# To reuse build cache, copy go.mod & go.sum and download dependencies first.
|
||||
COPY go.* ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
From godep as builder
|
||||
|
||||
ARG GOPKG
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# Copy whole fission directory to work dir
|
||||
COPY ./ ./
|
||||
|
||||
WORKDIR /go/src/${GOPKG}/cmd/fetcher
|
||||
|
||||
ARG GITCOMMIT=unknown
|
||||
# E.g. GITCOMMIT=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDVERSION=unknown
|
||||
# E.g. BUILDVERSION=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDDATE=unknown
|
||||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
|
||||
-o /go/bin/fetcher \
|
||||
-gcflags=-trimpath=$GOPATH \
|
||||
-asmflags=-trimpath=$GOPATH \
|
||||
-ldflags "-X github.com/fission/fission/pkg/info.GitCommit=${GITCOMMIT} -X github.com/fission/fission/pkg/info.BuildDate=${BUILDDATE} -X github.com/fission/fission/pkg/info.Version=${BUILDVERSION}"
|
||||
|
||||
FROM alpine:3.10 as base
|
||||
RUN apk add --update ca-certificates
|
||||
COPY --from=builder /go/bin/fetcher /
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/fetcher"]
|
||||
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
Copyright 2019 The Fission 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 app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"contrib.go.opencensus.io/exporter/jaeger"
|
||||
"go.opencensus.io/plugin/ochttp"
|
||||
"go.opencensus.io/trace"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/fission/fission/pkg/fetcher"
|
||||
"github.com/fission/fission/pkg/types"
|
||||
)
|
||||
|
||||
func registerTraceExporter(collectorEndpoint string) error {
|
||||
if collectorEndpoint == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
serviceName := "Fission-Fetcher"
|
||||
exporter, err := jaeger.NewExporter(jaeger.Options{
|
||||
CollectorEndpoint: collectorEndpoint,
|
||||
Process: jaeger.Process{
|
||||
ServiceName: serviceName,
|
||||
Tags: []jaeger.Tag{
|
||||
jaeger.BoolTag("fission", true),
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
trace.RegisterExporter(exporter)
|
||||
trace.ApplyConfig(trace.Config{DefaultSampler: trace.AlwaysSample()})
|
||||
return nil
|
||||
}
|
||||
|
||||
func Run(logger *zap.Logger) {
|
||||
flag.Usage = fetcherUsage
|
||||
collectorEndpoint := flag.String("jaeger-collector-endpoint", "", "")
|
||||
specializeOnStart := flag.Bool("specialize-on-startup", false, "Flag to activate specialize process at pod starup")
|
||||
specializePayload := flag.String("specialize-request", "", "JSON payload for specialize request")
|
||||
secretDir := flag.String("secret-dir", "", "Path to shared secrets directory")
|
||||
configDir := flag.String("cfgmap-dir", "", "Path to shared configmap directory")
|
||||
|
||||
flag.Parse()
|
||||
if flag.NArg() == 0 {
|
||||
flag.Usage()
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
dir := flag.Arg(0)
|
||||
if _, err := os.Stat(dir); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(dir, os.ModeDir|0700)
|
||||
if err != nil {
|
||||
logger.Fatal("error creating directory", zap.Error(err), zap.String("directory", dir))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := registerTraceExporter(*collectorEndpoint); err != nil {
|
||||
logger.Fatal("could not register trace exporter", zap.Error(err), zap.String("collector_endpoint", *collectorEndpoint))
|
||||
}
|
||||
|
||||
f, err := fetcher.MakeFetcher(logger, dir, *secretDir, *configDir)
|
||||
if err != nil {
|
||||
logger.Fatal("error making fetcher", zap.Error(err))
|
||||
}
|
||||
|
||||
readyToServe := false
|
||||
|
||||
// do specialization in other goroutine to prevent blocking in newdeploy
|
||||
go func() {
|
||||
if *specializeOnStart {
|
||||
var specializeReq types.FunctionSpecializeRequest
|
||||
|
||||
err := json.Unmarshal([]byte(*specializePayload), &specializeReq)
|
||||
if err != nil {
|
||||
logger.Fatal("error decoding specialize request", zap.Error(err))
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
err = f.SpecializePod(ctx, specializeReq.FetchReq, specializeReq.LoadReq)
|
||||
if err != nil {
|
||||
logger.Fatal("error specializing function pod", zap.Error(err))
|
||||
}
|
||||
|
||||
readyToServe = true
|
||||
}
|
||||
}()
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/fetch", f.FetchHandler)
|
||||
mux.HandleFunc("/specialize", f.SpecializeHandler)
|
||||
mux.HandleFunc("/upload", f.UploadHandler)
|
||||
mux.HandleFunc("/version", f.VersionHandler)
|
||||
|
||||
readinessHandler := func(w http.ResponseWriter, r *http.Request) {
|
||||
if !*specializeOnStart || readyToServe {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
} else {
|
||||
w.WriteHeader(http.StatusServiceUnavailable)
|
||||
}
|
||||
}
|
||||
|
||||
mux.HandleFunc("/readiness-healthz", readinessHandler)
|
||||
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
})
|
||||
|
||||
// For backward compatibility
|
||||
// TODO: remove this path in future
|
||||
mux.HandleFunc("/readniess-healthz", readinessHandler)
|
||||
|
||||
logger.Info("fetcher ready to receive requests")
|
||||
http.ListenAndServe(":8000", &ochttp.Handler{
|
||||
Handler: mux,
|
||||
})
|
||||
}
|
||||
|
||||
func fetcherUsage() {
|
||||
fmt.Println("Usage: fetcher [-specialize-on-startup] [-specialize-request <json>] [-secret-dir <string>] [-cfgmap-dir <string>] <shared volume path>")
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2017 The Fission Authors.
|
||||
Copyright 2018 The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,21 +14,23 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package timer
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/fission/fission/publisher"
|
||||
"github.com/fission/fission/tpr"
|
||||
"log"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/fission/fission/cmd/fetcher/app"
|
||||
)
|
||||
|
||||
func Start(routerUrl string) error {
|
||||
fissionClient, _, err := tpr.MakeFissionClient()
|
||||
// Usage: fetcher <shared volume path>
|
||||
func main() {
|
||||
logger, err := zap.NewProduction()
|
||||
if err != nil {
|
||||
return err
|
||||
log.Fatalf("can't initialize zap logger: %v", err)
|
||||
}
|
||||
defer logger.Sync()
|
||||
|
||||
poster := publisher.MakeWebhookPublisher(routerUrl)
|
||||
MakeTimerSync(fissionClient, MakeTimer(poster))
|
||||
|
||||
return nil
|
||||
app.Run(logger)
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
FROM golang:1.12-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
ENV GO111MODULE=on
|
||||
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# To reuse build cache, copy go.mod & go.sum and download dependencies first.
|
||||
COPY go.* ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
From godep as builder
|
||||
|
||||
ARG GOPKG
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# Copy whole fission directory to work dir
|
||||
COPY ./ ./
|
||||
|
||||
WORKDIR /go/src/${GOPKG}/cmd/fission-bundle
|
||||
|
||||
ARG GITCOMMIT=unknown
|
||||
# E.g. GITCOMMIT=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDVERSION=unknown
|
||||
# E.g. BUILDVERSION=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDDATE=unknown
|
||||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
|
||||
-o /go/bin/fission-bundle \
|
||||
-gcflags=-trimpath=$GOPATH \
|
||||
-asmflags=-trimpath=$GOPATH \
|
||||
-ldflags "-X github.com/fission/fission/pkg/info.GitCommit=${GITCOMMIT} -X github.com/fission/fission/pkg/info.BuildDate=${BUILDDATE} -X github.com/fission/fission/pkg/info.Version=${BUILDVERSION}"
|
||||
|
||||
FROM alpine:3.10 as base
|
||||
RUN apk add --update ca-certificates
|
||||
COPY --from=builder /go/bin/fission-bundle /
|
||||
|
||||
ENTRYPOINT ["/fission-bundle"]
|
||||
@@ -0,0 +1,304 @@
|
||||
/*
|
||||
Copyright 2019 The Fission 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 main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"contrib.go.opencensus.io/exporter/jaeger"
|
||||
docopt "github.com/docopt/docopt-go"
|
||||
"go.opencensus.io/trace"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/fission/fission/pkg/buildermgr"
|
||||
"github.com/fission/fission/pkg/controller"
|
||||
"github.com/fission/fission/pkg/executor"
|
||||
"github.com/fission/fission/pkg/info"
|
||||
"github.com/fission/fission/pkg/kubewatcher"
|
||||
functionLogger "github.com/fission/fission/pkg/logger"
|
||||
messagequeue "github.com/fission/fission/pkg/mqtrigger"
|
||||
"github.com/fission/fission/pkg/router"
|
||||
"github.com/fission/fission/pkg/storagesvc"
|
||||
"github.com/fission/fission/pkg/timer"
|
||||
)
|
||||
|
||||
func runController(logger *zap.Logger, port int) {
|
||||
controller.Start(logger, port, false)
|
||||
logger.Fatal("controller exited")
|
||||
}
|
||||
|
||||
func runRouter(logger *zap.Logger, port int, executorUrl string) {
|
||||
router.Start(logger, port, executorUrl)
|
||||
logger.Fatal("router exited")
|
||||
}
|
||||
|
||||
func runExecutor(logger *zap.Logger, port int, functionNamespace, envBuilderNamespace string) {
|
||||
err := executor.StartExecutor(logger, functionNamespace, envBuilderNamespace, port)
|
||||
if err != nil {
|
||||
logger.Fatal("error starting executor", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
func runKubeWatcher(logger *zap.Logger, routerUrl string) {
|
||||
err := kubewatcher.Start(logger, routerUrl)
|
||||
if err != nil {
|
||||
logger.Fatal("error starting kubewatcher", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
func runTimer(logger *zap.Logger, routerUrl string) {
|
||||
err := timer.Start(logger, routerUrl)
|
||||
if err != nil {
|
||||
logger.Fatal("error starting timer", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
func runMessageQueueMgr(logger *zap.Logger, routerUrl string) {
|
||||
err := messagequeue.Start(logger, routerUrl)
|
||||
if err != nil {
|
||||
logger.Fatal("error starting message queue manager", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
func runStorageSvc(logger *zap.Logger, port int, filePath string) {
|
||||
subdir := os.Getenv("SUBDIR")
|
||||
if len(subdir) == 0 {
|
||||
subdir = "fission-functions"
|
||||
}
|
||||
enableArchivePruner := true
|
||||
storagesvc.RunStorageService(logger, storagesvc.StorageTypeLocal,
|
||||
filePath, subdir, port, enableArchivePruner)
|
||||
}
|
||||
|
||||
func runBuilderMgr(logger *zap.Logger, storageSvcUrl string, envBuilderNamespace string) {
|
||||
err := buildermgr.Start(logger, storageSvcUrl, envBuilderNamespace)
|
||||
if err != nil {
|
||||
logger.Fatal("error starting builder manager", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
func runLogger() {
|
||||
functionLogger.Start()
|
||||
log.Fatalf("Error: Logger exited.")
|
||||
}
|
||||
|
||||
func getPort(logger *zap.Logger, portArg interface{}) int {
|
||||
portArgStr := portArg.(string)
|
||||
port, err := strconv.Atoi(portArgStr)
|
||||
if err != nil {
|
||||
logger.Fatal("invalid port number", zap.Error(err), zap.String("port", portArgStr))
|
||||
}
|
||||
return port
|
||||
}
|
||||
|
||||
func getStringArgWithDefault(arg interface{}, defaultValue string) string {
|
||||
if arg != nil {
|
||||
return arg.(string)
|
||||
} else {
|
||||
return defaultValue
|
||||
}
|
||||
}
|
||||
|
||||
func registerTraceExporter(logger *zap.Logger, arguments map[string]interface{}) error {
|
||||
collectorEndpoint := getStringArgWithDefault(arguments["--collectorEndpoint"], "")
|
||||
if collectorEndpoint == "" {
|
||||
logger.Info("skipping trace exporter registration")
|
||||
return nil
|
||||
}
|
||||
|
||||
serviceName := "Fission-Unknown"
|
||||
|
||||
if arguments["--controllerPort"] != nil {
|
||||
serviceName = "Fission-Controller"
|
||||
} else if arguments["--routerPort"] != nil {
|
||||
serviceName = "Fission-Router"
|
||||
} else if arguments["--executorPort"] != nil {
|
||||
serviceName = "Fission-Executor"
|
||||
} else if arguments["--kubewatcher"] == true {
|
||||
serviceName = "Fission-KubeWatcher"
|
||||
} else if arguments["--timer"] == true {
|
||||
serviceName = "Fission-Timer"
|
||||
} else if arguments["--mqt"] == true {
|
||||
serviceName = "Fission-MessageQueueTrigger"
|
||||
} else if arguments["--builderMgr"] == true {
|
||||
serviceName = "Fission-BuilderMgr"
|
||||
} else if arguments["--storageServicePort"] != nil {
|
||||
serviceName = "Fission-StorageSvc"
|
||||
}
|
||||
|
||||
exporter, err := jaeger.NewExporter(jaeger.Options{
|
||||
CollectorEndpoint: collectorEndpoint,
|
||||
Process: jaeger.Process{
|
||||
ServiceName: serviceName,
|
||||
Tags: []jaeger.Tag{
|
||||
jaeger.BoolTag("fission", true),
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
samplingRate, err := strconv.ParseFloat(os.Getenv("TRACING_SAMPLING_RATE"), 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
trace.RegisterExporter(exporter)
|
||||
trace.ApplyConfig(trace.Config{DefaultSampler: trace.ProbabilitySampler(samplingRate)})
|
||||
return nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
// From https://github.com/containous/traefik/pull/1817/files
|
||||
// Tell glog to log into STDERR. Otherwise, we risk
|
||||
// certain kinds of API errors getting logged into a directory not
|
||||
// available in a `FROM scratch` Docker container, causing glog to abort
|
||||
// hard with an exit code > 0.
|
||||
flag.Set("logtostderr", "true")
|
||||
|
||||
usage := `fission-bundle: Package of all fission microservices: controller, router, executor.
|
||||
|
||||
Use it to start one or more of the fission servers:
|
||||
|
||||
Controller is a stateless API frontend for fission resources.
|
||||
|
||||
Pool manager maintains a pool of generalized function containers, and
|
||||
specializes them on-demand. Executor must be run from a pod in a
|
||||
Kubernetes cluster.
|
||||
|
||||
Router implements HTTP triggers: it routes to running instances,
|
||||
working with the controller and executor.
|
||||
|
||||
Kubewatcher implements Kubernetes Watch triggers: it watches
|
||||
Kubernetes resources and invokes functions described in the
|
||||
KubernetesWatchTrigger.
|
||||
|
||||
The storage service implements storage for functions too large to fit
|
||||
in the Kubernetes API resource object. It supports various storage
|
||||
backends.
|
||||
|
||||
Usage:
|
||||
fission-bundle --controllerPort=<port> [--collectorEndpoint=<url>]
|
||||
fission-bundle --routerPort=<port> [--executorUrl=<url>] [--collectorEndpoint=<url>]
|
||||
fission-bundle --executorPort=<port> [--namespace=<namespace>] [--fission-namespace=<namespace>] [--collectorEndpoint=<url>]
|
||||
fission-bundle --kubewatcher [--routerUrl=<url>] [--collectorEndpoint=<url>]
|
||||
fission-bundle --storageServicePort=<port> --filePath=<filePath> [--collectorEndpoint=<url>]
|
||||
fission-bundle --builderMgr [--storageSvcUrl=<url>] [--envbuilder-namespace=<namespace>] [--collectorEndpoint=<url>]
|
||||
fission-bundle --timer [--routerUrl=<url>] [--collectorEndpoint=<url>]
|
||||
fission-bundle --mqt [--routerUrl=<url>] [--collectorEndpoint=<url>]
|
||||
fission-bundle --logger
|
||||
fission-bundle --version
|
||||
Options:
|
||||
--collectorEndpoint=<url> Jaeger HTTP Thrift collector URL.
|
||||
--controllerPort=<port> Port that the controller should listen on.
|
||||
--routerPort=<port> Port that the router should listen on.
|
||||
--executorPort=<port> Port that the executor should listen on.
|
||||
--storageServicePort=<port> Port that the storage service should listen on.
|
||||
--executorUrl=<url> Executor URL. Not required if --executorPort is specified.
|
||||
--routerUrl=<url> Router URL.
|
||||
--etcdUrl=<etcdUrl> Etcd URL.
|
||||
--storageSvcUrl=<url> StorageService URL.
|
||||
--filePath=<filePath> Directory to store functions in.
|
||||
--namespace=<namespace> Kubernetes namespace in which to run function containers. Defaults to 'fission-function'.
|
||||
--kubewatcher Start Kubernetes events watcher.
|
||||
--timer Start Timer.
|
||||
--mqt Start message queue trigger.
|
||||
--builderMgr Start builder manager.
|
||||
--version Print version information
|
||||
`
|
||||
|
||||
var logger *zap.Logger
|
||||
var err error
|
||||
|
||||
isDebugEnv, _ := strconv.ParseBool(os.Getenv("DEBUG_ENV"))
|
||||
if isDebugEnv {
|
||||
logger, err = zap.NewDevelopment()
|
||||
} else {
|
||||
config := zap.NewProductionConfig()
|
||||
config.DisableStacktrace = true
|
||||
logger, err = config.Build()
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalf("can't initialize zap logger: %v", err)
|
||||
}
|
||||
defer logger.Sync()
|
||||
|
||||
version := fmt.Sprintf("Fission Bundle Version: %v", info.BuildInfo().String())
|
||||
arguments, err := docopt.Parse(usage, nil, true, version, false)
|
||||
if err != nil {
|
||||
logger.Fatal("Could not parse command line arguments", zap.Error(err))
|
||||
}
|
||||
|
||||
err = registerTraceExporter(logger, arguments)
|
||||
if err != nil {
|
||||
logger.Fatal("Could not register trace exporter", zap.Error(err), zap.Any("argument", arguments))
|
||||
}
|
||||
|
||||
functionNs := getStringArgWithDefault(arguments["--namespace"], "fission-function")
|
||||
envBuilderNs := getStringArgWithDefault(arguments["--envbuilder-namespace"], "fission-builder")
|
||||
|
||||
executorUrl := getStringArgWithDefault(arguments["--executorUrl"], "http://executor.fission")
|
||||
routerUrl := getStringArgWithDefault(arguments["--routerUrl"], "http://router.fission")
|
||||
storageSvcUrl := getStringArgWithDefault(arguments["--storageSvcUrl"], "http://storagesvc.fission")
|
||||
|
||||
if arguments["--controllerPort"] != nil {
|
||||
port := getPort(logger, arguments["--controllerPort"])
|
||||
runController(logger, port)
|
||||
}
|
||||
|
||||
if arguments["--routerPort"] != nil {
|
||||
port := getPort(logger, arguments["--routerPort"])
|
||||
runRouter(logger, port, executorUrl)
|
||||
}
|
||||
|
||||
if arguments["--executorPort"] != nil {
|
||||
port := getPort(logger, arguments["--executorPort"])
|
||||
runExecutor(logger, port, functionNs, envBuilderNs)
|
||||
}
|
||||
|
||||
if arguments["--kubewatcher"] == true {
|
||||
runKubeWatcher(logger, routerUrl)
|
||||
}
|
||||
|
||||
if arguments["--timer"] == true {
|
||||
runTimer(logger, routerUrl)
|
||||
}
|
||||
|
||||
if arguments["--mqt"] == true {
|
||||
runMessageQueueMgr(logger, routerUrl)
|
||||
}
|
||||
|
||||
if arguments["--builderMgr"] == true {
|
||||
runBuilderMgr(logger, storageSvcUrl, envBuilderNs)
|
||||
}
|
||||
|
||||
if arguments["--logger"] == true {
|
||||
runLogger()
|
||||
}
|
||||
|
||||
if arguments["--storageServicePort"] != nil {
|
||||
port := getPort(logger, arguments["--storageServicePort"])
|
||||
filePath := arguments["--filePath"].(string)
|
||||
runStorageSvc(logger, port, filePath)
|
||||
}
|
||||
|
||||
select {}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2016 The Fission Authors.
|
||||
Copyright 2018 The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,13 +14,14 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package fission
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
fcli "github.com/fission/fission/pkg/fission-cli"
|
||||
)
|
||||
|
||||
func UrlForFunction(name string) string {
|
||||
prefix := "/fission-function"
|
||||
return fmt.Sprintf("%v/%v", prefix, name)
|
||||
func main() {
|
||||
fcli.NewCliApp().Run(os.Args)
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
FROM golang:1.12-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
ENV GO111MODULE=on
|
||||
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# To reuse build cache, copy go.mod & go.sum and download dependencies first.
|
||||
COPY go.* ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
From godep as builder
|
||||
|
||||
ARG GOPKG
|
||||
WORKDIR /go/src/${GOPKG}
|
||||
|
||||
# Copy whole fission directory to work dir
|
||||
COPY ./ ./
|
||||
|
||||
WORKDIR /go/src/${GOPKG}/cmd/preupgradechecks
|
||||
|
||||
ARG GITCOMMIT=unknown
|
||||
# E.g. GITCOMMIT=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDVERSION=unknown
|
||||
# E.g. BUILDVERSION=$(git rev-parse HEAD)
|
||||
|
||||
ARG BUILDDATE=unknown
|
||||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
|
||||
-o /go/bin/pre-upgrade-checks \
|
||||
-gcflags=-trimpath=$GOPATH \
|
||||
-asmflags=-trimpath=$GOPATH \
|
||||
-ldflags "-X github.com/fission/fission/pkg/info.GitCommit=${GITCOMMIT} -X github.com/fission/fission/pkg/info.BuildDate=${BUILDDATE} -X github.com/fission/fission/pkg/info.Version=${BUILDVERSION}"
|
||||
|
||||
FROM alpine:3.10 as base
|
||||
RUN apk add --update ca-certificates
|
||||
COPY --from=builder /go/bin/pre-upgrade-checks /
|
||||
|
||||
ENTRYPOINT ["/pre-upgrade-checks"]
|
||||
EXPOSE 8001
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/docopt/docopt-go"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/fission/fission/pkg/info"
|
||||
)
|
||||
|
||||
func getStringArgWithDefault(arg interface{}, defaultValue string) string {
|
||||
if arg != nil {
|
||||
return arg.(string)
|
||||
} else {
|
||||
return defaultValue
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
logger, err := zap.NewProduction()
|
||||
if err != nil {
|
||||
log.Fatalf("can't initialize zap logger: %v", err)
|
||||
}
|
||||
defer logger.Sync()
|
||||
|
||||
usage := `Package to perform operations needed prior to fission installation
|
||||
Usage:
|
||||
pre-upgrade-checks --fn-pod-namespace=<podNamespace> --envbuilder-namespace=<envBuilderNamespace>
|
||||
Options:
|
||||
--fn-pod-namespace=<podNamespace> Namespace where function pods get deployed.
|
||||
--envbuilder-namespace=<envBuilderNamespace> Namespace where builder env pods are deployed.`
|
||||
|
||||
arguments, err := docopt.Parse(usage, nil, true, info.BuildInfo().String(), false)
|
||||
if err != nil {
|
||||
logger.Fatal("Could not parse command line arguments", zap.Error(err))
|
||||
}
|
||||
|
||||
functionPodNs := getStringArgWithDefault(arguments["--fn-pod-namespace"], "fission-function")
|
||||
envBuilderNs := getStringArgWithDefault(arguments["--envbuilder-namespace"], "fission-builder")
|
||||
|
||||
crdBackedClient, err := makePreUpgradeTaskClient(logger, functionPodNs, envBuilderNs)
|
||||
if err != nil {
|
||||
logger.Fatal("error creating a crd client, please retry helm upgrade",
|
||||
zap.Error(err))
|
||||
}
|
||||
|
||||
if !crdBackedClient.IsFissionReInstall() {
|
||||
logger.Info("nothing to do since CRDs are not present on the cluster")
|
||||
return
|
||||
}
|
||||
|
||||
crdBackedClient.VerifyFunctionSpecReferences()
|
||||
crdBackedClient.RemoveClusterAdminRolesForFissionSAs()
|
||||
crdBackedClient.SetupRoleBindings()
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
multierror "github.com/hashicorp/go-multierror"
|
||||
"github.com/pkg/errors"
|
||||
"go.uber.org/zap"
|
||||
apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
|
||||
fv1 "github.com/fission/fission/pkg/apis/fission.io/v1"
|
||||
"github.com/fission/fission/pkg/crd"
|
||||
"github.com/fission/fission/pkg/types"
|
||||
"github.com/fission/fission/pkg/utils"
|
||||
)
|
||||
|
||||
type (
|
||||
PreUpgradeTaskClient struct {
|
||||
logger *zap.Logger
|
||||
fissionClient *crd.FissionClient
|
||||
k8sClient *kubernetes.Clientset
|
||||
apiExtClient *apiextensionsclient.Clientset
|
||||
fnPodNs string
|
||||
envBuilderNs string
|
||||
}
|
||||
)
|
||||
|
||||
const (
|
||||
maxRetries = 5
|
||||
FunctionCRD = "functions.fission.io"
|
||||
)
|
||||
|
||||
func makePreUpgradeTaskClient(logger *zap.Logger, fnPodNs, envBuilderNs string) (*PreUpgradeTaskClient, error) {
|
||||
fissionClient, k8sClient, apiExtClient, err := crd.MakeFissionClient()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "error making fission client")
|
||||
}
|
||||
|
||||
return &PreUpgradeTaskClient{
|
||||
logger: logger.Named("pre_upgrade_task_client"),
|
||||
fissionClient: fissionClient,
|
||||
k8sClient: k8sClient,
|
||||
fnPodNs: fnPodNs,
|
||||
envBuilderNs: envBuilderNs,
|
||||
apiExtClient: apiExtClient,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// IsFissionReInstall checks if there is atleast one fission CRD, i.e. function in this case, on this cluster.
|
||||
// We need this to find out if fission had been previously installed on this cluster
|
||||
func (client *PreUpgradeTaskClient) IsFissionReInstall() bool {
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
_, err := client.apiExtClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(FunctionCRD, metav1.GetOptions{})
|
||||
if err != nil && k8serrors.IsNotFound(err) {
|
||||
return false
|
||||
}
|
||||
if err == nil {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// VerifyFunctionSpecReferences verifies that a function references secrets, configmaps, pkgs in its own namespace and
|
||||
// outputs a list of functions that don't adhere to this requirement.
|
||||
func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
|
||||
client.logger.Info("verifying function spec references for all functions in the cluster")
|
||||
|
||||
result := &multierror.Error{}
|
||||
var err error
|
||||
var fList *fv1.FunctionList
|
||||
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
fList, err = client.fissionClient.Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
client.logger.Fatal("error listing functions after max retries",
|
||||
zap.Error(err),
|
||||
zap.Int("max_retries", maxRetries))
|
||||
}
|
||||
|
||||
// check that all secrets, configmaps, packages are in the same namespace
|
||||
for _, fn := range fList.Items {
|
||||
secrets := fn.Spec.Secrets
|
||||
for _, secret := range secrets {
|
||||
if secret.Namespace != fn.Metadata.Namespace {
|
||||
result = multierror.Append(result, fmt.Errorf("function : %s.%s cannot reference a secret : %s in namespace : %s", fn.Metadata.Name, fn.Metadata.Namespace, secret.Name, secret.Namespace))
|
||||
}
|
||||
}
|
||||
|
||||
configmaps := fn.Spec.ConfigMaps
|
||||
for _, configmap := range configmaps {
|
||||
if configmap.Namespace != fn.Metadata.Namespace {
|
||||
result = multierror.Append(result, fmt.Errorf("function : %s.%s cannot reference a configmap : %s in namespace : %s", fn.Metadata.Name, fn.Metadata.Namespace, configmap.Name, configmap.Namespace))
|
||||
}
|
||||
}
|
||||
|
||||
if fn.Spec.Package.PackageRef.Namespace != fn.Metadata.Namespace {
|
||||
result = multierror.Append(result, fmt.Errorf("function : %s.%s cannot reference a package : %s in namespace : %s", fn.Metadata.Name, fn.Metadata.Namespace, fn.Spec.Package.PackageRef.Name, fn.Spec.Package.PackageRef.Namespace))
|
||||
}
|
||||
}
|
||||
|
||||
if result != nil {
|
||||
client.logger.Fatal("installation failed",
|
||||
zap.Error(err),
|
||||
zap.String("summary", "a function cannot reference secrets, configmaps and packages outside it's own namespace"))
|
||||
}
|
||||
|
||||
client.logger.Info("function spec references verified")
|
||||
}
|
||||
|
||||
// deleteClusterRoleBinding deletes the clusterRoleBinding passed as an argument to it.
|
||||
// If its not present, it just ignores and returns no errors
|
||||
func (client *PreUpgradeTaskClient) deleteClusterRoleBinding(clusterRoleBinding string) (err error) {
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
err = client.k8sClient.RbacV1beta1().ClusterRoleBindings().Delete(clusterRoleBinding, &metav1.DeleteOptions{})
|
||||
if err != nil && k8serrors.IsNotFound(err) || err == nil {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// RemoveClusterAdminRolesForFissionSAs deletes the clusterRoleBindings previously created on this cluster
|
||||
func (client *PreUpgradeTaskClient) RemoveClusterAdminRolesForFissionSAs() {
|
||||
clusterRoleBindings := []string{"fission-builder-crd", "fission-fetcher-crd"}
|
||||
for _, clusterRoleBinding := range clusterRoleBindings {
|
||||
err := client.deleteClusterRoleBinding(clusterRoleBinding)
|
||||
if err != nil {
|
||||
client.logger.Fatal("error deleting rolebinding",
|
||||
zap.Error(err),
|
||||
zap.String("role_binding", clusterRoleBinding))
|
||||
}
|
||||
}
|
||||
|
||||
client.logger.Info("femoved cluster admin privileges for fission-builder and fission-fetcher service accounts")
|
||||
}
|
||||
|
||||
// NeedRoleBindings checks if there is atleast one package or function in default namespace.
|
||||
// It is needed to find out if package-getter-rb and secret-configmap-getter-rb needs to be created for fission-fetcher
|
||||
// and fission-builder service accounts.
|
||||
// This is because, we just deleted the ClusterRoleBindings for these service accounts in the previous function and
|
||||
// for the existing functions to work, we need to give these SAs the right privileges
|
||||
func (client *PreUpgradeTaskClient) NeedRoleBindings() bool {
|
||||
pkgList, err := client.fissionClient.Packages(metav1.NamespaceDefault).List(metav1.ListOptions{})
|
||||
if err == nil && len(pkgList.Items) > 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
fnList, err := client.fissionClient.Functions(metav1.NamespaceDefault).List(metav1.ListOptions{})
|
||||
if err == nil && len(fnList.Items) > 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// Setup appropriate role bindings for fission-fetcher and fission-builder SAs
|
||||
func (client *PreUpgradeTaskClient) SetupRoleBindings() {
|
||||
if !client.NeedRoleBindings() {
|
||||
client.logger.Info("no fission objects found, so no role-bindings to create")
|
||||
return
|
||||
}
|
||||
|
||||
// the fact that we're here implies that there had been a prior installation of fission and objects are present still
|
||||
// so, we go ahead and create the role-bindings necessary for the fission-fetcher and fission-builder Service Accounts.
|
||||
err := utils.SetupRoleBinding(client.logger, client.k8sClient, types.PackageGetterRB, metav1.NamespaceDefault, types.PackageGetterCR, types.ClusterRole, types.FissionFetcherSA, client.fnPodNs)
|
||||
if err != nil {
|
||||
client.logger.Fatal("error setting up rolebinding for service account",
|
||||
zap.Error(err),
|
||||
zap.String("role_binding", types.PackageGetterRB),
|
||||
zap.String("service_account", types.FissionFetcherSA),
|
||||
zap.String("service_account_namespace", client.fnPodNs))
|
||||
}
|
||||
|
||||
err = utils.SetupRoleBinding(client.logger, client.k8sClient, types.PackageGetterRB, metav1.NamespaceDefault, types.PackageGetterCR, types.ClusterRole, types.FissionBuilderSA, client.envBuilderNs)
|
||||
if err != nil {
|
||||
client.logger.Fatal("error setting up rolebinding for service account",
|
||||
zap.Error(err),
|
||||
zap.String("role_binding", types.PackageGetterRB),
|
||||
zap.String("service_account", types.FissionBuilderSA),
|
||||
zap.String("service_account_namespace", client.envBuilderNs))
|
||||
}
|
||||
|
||||
err = utils.SetupRoleBinding(client.logger, client.k8sClient, types.SecretConfigMapGetterRB, metav1.NamespaceDefault, types.SecretConfigMapGetterCR, types.ClusterRole, types.FissionFetcherSA, client.fnPodNs)
|
||||
if err != nil {
|
||||
client.logger.Fatal("error setting up rolebinding for service account",
|
||||
zap.Error(err),
|
||||
zap.String("role_binding", types.SecretConfigMapGetterRB),
|
||||
zap.String("service_account", types.FissionFetcherSA),
|
||||
zap.String("service_account_namespace", client.fnPodNs))
|
||||
}
|
||||
|
||||
client.logger.Info("created rolebindings in default namespace",
|
||||
zap.Strings("role_bindings", []string{types.PackageGetterRB, types.SecretConfigMapGetterRB}))
|
||||
return
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func (a *API) FunctionApiList(w http.ResponseWriter, r *http.Request) {
|
||||
funcs, err := a.fissionClient.Functions(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(funcs.Items)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) FunctionApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var f tpr.Function
|
||||
err = json.Unmarshal(body, &f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = validateResourceName(f.Metadata.Name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.Functions(f.Metadata.Namespace).Create(&f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(fnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) FunctionApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["function"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
f, err := a.fissionClient.Functions(ns).Get(name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) FunctionApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["function"]
|
||||
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var f tpr.Function
|
||||
err = json.Unmarshal(body, &f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
if name != f.Metadata.Name {
|
||||
err = fission.MakeError(fission.ErrorInvalidArgument, "Function name doesn't match URL")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.Functions(f.Metadata.Namespace).Update(&f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(fnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) FunctionApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["function"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.Functions(ns).Delete(name, &api.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, []byte(""))
|
||||
}
|
||||
|
||||
// FunctionLogsApiPost establishes a proxy server to log database, and redirect
|
||||
// query command send from client to database then proxy back the db response.
|
||||
func (a *API) FunctionLogsApiPost(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
// get dbType from url
|
||||
dbType := vars["dbType"]
|
||||
|
||||
// find correspond db http url
|
||||
dbCnf := a.getLogDBConfig(dbType)
|
||||
|
||||
svcUrl, err := url.Parse(dbCnf.httpURL)
|
||||
if err != nil {
|
||||
log.Printf("Failed to establish proxy server for function logs: %v", err)
|
||||
}
|
||||
// set up proxy server director
|
||||
director := func(req *http.Request) {
|
||||
// only replace url Scheme and Host to remote influxDB
|
||||
// and leave query string intact
|
||||
req.URL.Scheme = svcUrl.Scheme
|
||||
req.URL.Host = svcUrl.Host
|
||||
req.URL.Path = svcUrl.Path
|
||||
// set up http basic auth for database authentication
|
||||
req.SetBasicAuth(dbCnf.username, dbCnf.password)
|
||||
}
|
||||
proxy := &httputil.ReverseProxy{
|
||||
Director: director,
|
||||
}
|
||||
proxy.ServeHTTP(w, r)
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func (a *API) HTTPTriggerApiList(w http.ResponseWriter, r *http.Request) {
|
||||
triggers, err := a.fissionClient.Httptriggers(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(triggers.Items)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) checkHttpTriggerDuplicates(t *tpr.Httptrigger) error {
|
||||
triggers, err := a.fissionClient.Httptriggers(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, ht := range triggers.Items {
|
||||
if ht.Spec.RelativeURL == t.Spec.RelativeURL && ht.Spec.Method == t.Spec.Method {
|
||||
return fission.MakeError(fission.ErrorNameExists,
|
||||
fmt.Sprintf("HTTPTrigger with same URL & method already exists (%v)",
|
||||
ht.Metadata.Name))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *API) HTTPTriggerApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var t tpr.Httptrigger
|
||||
err = json.Unmarshal(body, &t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = validateResourceName(t.Metadata.Name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
// Ensure we don't have a duplicate HTTP route defined (same URL and method)
|
||||
err = a.checkHttpTriggerDuplicates(&t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.Httptriggers(t.Metadata.Namespace).Create(&t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(tnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) HTTPTriggerApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["httpTrigger"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
t, err := a.fissionClient.Httptriggers(ns).Get(name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) HTTPTriggerApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["httpTrigger"]
|
||||
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var t tpr.Httptrigger
|
||||
err = json.Unmarshal(body, &t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
if name != t.Metadata.Name {
|
||||
err = fission.MakeError(fission.ErrorInvalidArgument, "HTTPTrigger name doesn't match URL")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = a.checkHttpTriggerDuplicates(&t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.Httptriggers(t.Metadata.Namespace).Update(&t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(tnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) HTTPTriggerApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["httpTrigger"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.Httptriggers(ns).Delete(name, &api.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, []byte(""))
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Fission 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 controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func (a *API) MessageQueueTriggerApiList(w http.ResponseWriter, r *http.Request) {
|
||||
//mqType := r.FormValue("mqtype") // ignored for now
|
||||
triggers, err := a.fissionClient.Messagequeuetriggers(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
resp, err := json.Marshal(triggers.Items)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) MessageQueueTriggerApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var mqTrigger tpr.Messagequeuetrigger
|
||||
err = json.Unmarshal(body, &mqTrigger)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = validateResourceName(mqTrigger.Metadata.Name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.Messagequeuetriggers(mqTrigger.Metadata.Namespace).Create(&mqTrigger)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(tnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) MessageQueueTriggerApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["mqTrigger"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
mqTrigger, err := a.fissionClient.Messagequeuetriggers(ns).Get(name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
resp, err := json.Marshal(mqTrigger)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) MessageQueueTriggerApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["mqTrigger"]
|
||||
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var mqTrigger tpr.Messagequeuetrigger
|
||||
err = json.Unmarshal(body, &mqTrigger)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
if name != mqTrigger.Metadata.Name {
|
||||
err = fission.MakeError(fission.ErrorInvalidArgument, "Message queue trigger name doesn't match URL")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.Messagequeuetriggers(mqTrigger.Metadata.Namespace).Update(&mqTrigger)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(tnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) MessageQueueTriggerApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["mqTrigger"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.Messagequeuetriggers(ns).Delete(name, &api.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, []byte(""))
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func (a *API) PackageApiList(w http.ResponseWriter, r *http.Request) {
|
||||
funcs, err := a.fissionClient.Packages(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(funcs.Items)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) PackageApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var f tpr.Package
|
||||
err = json.Unmarshal(body, &f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = validateResourceName(f.Metadata.Name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
// Ensure size limits
|
||||
if len(f.Spec.Literal) > 256*1024 {
|
||||
err := fission.MakeError(fission.ErrorInvalidArgument, "Package literal larger than 256K")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.Packages(f.Metadata.Namespace).Create(&f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(fnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) PackageApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["package"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
raw := r.FormValue("raw") // just the deployment pkg
|
||||
|
||||
f, err := a.fissionClient.Packages(ns).Get(name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var resp []byte
|
||||
if raw != "" {
|
||||
resp = []byte(f.Spec.Literal)
|
||||
} else {
|
||||
resp, err = json.Marshal(f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) PackageApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["package"]
|
||||
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var f tpr.Package
|
||||
err = json.Unmarshal(body, &f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
if name != f.Metadata.Name {
|
||||
err = fission.MakeError(fission.ErrorInvalidArgument, "Package name doesn't match URL")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.Packages(f.Metadata.Namespace).Update(&f)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(fnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) PackageApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["package"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.Packages(ns).Delete(name, &api.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, []byte(""))
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Fission 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 controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/robfig/cron"
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func (a *API) TimeTriggerApiList(w http.ResponseWriter, r *http.Request) {
|
||||
triggers, err := a.fissionClient.Timetriggers(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(triggers.Items)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) TimeTriggerApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var t tpr.Timetrigger
|
||||
err = json.Unmarshal(body, &t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = validateResourceName(t.Metadata.Name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
// validate
|
||||
_, err = cron.Parse(t.Spec.Cron)
|
||||
if err != nil {
|
||||
err = fission.MakeError(fission.ErrorInvalidArgument, "TimeTrigger cron spec is not valid")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.Timetriggers(t.Metadata.Namespace).Create(&t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(tnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) TimeTriggerApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["timeTrigger"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
t, err := a.fissionClient.Timetriggers(ns).Get(name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) TimeTriggerApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["timeTrigger"]
|
||||
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var t tpr.Timetrigger
|
||||
err = json.Unmarshal(body, &t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
if name != t.Metadata.Name {
|
||||
err = fission.MakeError(fission.ErrorInvalidArgument, "TimeTrigger name doesn't match URL")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
_, err = cron.Parse(t.Spec.Cron)
|
||||
if err != nil {
|
||||
err = fission.MakeError(fission.ErrorInvalidArgument, "TimeTrigger cron spec is not valid")
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.Timetriggers(t.Metadata.Namespace).Update(&t)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(tnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) TimeTriggerApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["timeTrigger"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.Timetriggers(ns).Delete(name, &api.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, []byte(""))
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 controller
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"regexp"
|
||||
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func makeTPRBackedAPI() (*API, error) {
|
||||
fissionClient, _, err := tpr.MakeFissionClient()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &API{fissionClient: fissionClient}, nil
|
||||
}
|
||||
|
||||
func validateResourceName(name string) error {
|
||||
re := regexp.MustCompile(`[a-z0-9]([-a-z0-9]*[a-z0-9])?`)
|
||||
if len(re.FindString(name)) != len(name) {
|
||||
return errors.New("Name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?'")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func (a *API) WatchApiList(w http.ResponseWriter, r *http.Request) {
|
||||
watches, err := a.fissionClient.Kuberneteswatchtriggers(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(watches.Items)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) WatchApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
var watch tpr.Kuberneteswatchtrigger
|
||||
err = json.Unmarshal(body, &watch)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = validateResourceName(watch.Metadata.Name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
// TODO check for duplicate watches
|
||||
|
||||
wnew, err := a.fissionClient.Kuberneteswatchtriggers(watch.Metadata.Namespace).Create(&watch)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(wnew.Metadata)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) WatchApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["watch"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
watch, err := a.fissionClient.Kuberneteswatchtriggers(ns).Get(name)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := json.Marshal(watch)
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, resp)
|
||||
}
|
||||
|
||||
func (a *API) WatchApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
a.respondWithError(w, fission.MakeError(fission.ErrorNotImplmented,
|
||||
"Not implemented"))
|
||||
}
|
||||
|
||||
func (a *API) WatchApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
name := vars["watch"]
|
||||
ns := vars["namespace"]
|
||||
if len(ns) == 0 {
|
||||
ns = api.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.Kuberneteswatchtriggers(ns).Delete(name, &api.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
a.respondWithSuccess(w, []byte(""))
|
||||
}
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
kubectl delete canaryconfig canary-2
|
||||
kubectl delete httptrigger route-fail
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# this script is useful to demo canary deployment when the latest function starts receiving 100% of the traffic
|
||||
|
||||
DEMO_RUN_FAST=1
|
||||
ROOT_DIR=$(dirname $0)/..
|
||||
. $ROOT_DIR/util.sh
|
||||
|
||||
|
||||
desc "Function version-1"
|
||||
run "fission function get --name fn1-v6"
|
||||
|
||||
desc "Function version-2"
|
||||
run "fission function get --name fn1-v7"
|
||||
|
||||
desc "Create a route \(HTTP trigger\) the version-1 of the function with weight 100% and version-2 with weight 0%"
|
||||
run "fission route create --name route-fail --method GET --url /fail --function fn1-v6 --weight 100 --function fn1-v7 --weight 0"
|
||||
|
||||
desc "Create a canary config to gradually increment the weight of version-2 by a step of 20 every 1 minute"
|
||||
run "fission canary-config create --name canary-2 --newfunction fn1-v7 --oldfunction fn1-v6 --httptrigger route-fail --increment-step 30 --increment-interval 30s --failure-threshold 10"
|
||||
|
||||
desc "Fire requests to the route"
|
||||
run "ab -n 10000 -c 1 http://$FISSION_ROUTER/fail"
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
kubectl delete canaryconfig canary-1
|
||||
kubectl delete httptrigger route-canary
|
||||
|
||||
fission fn delete --name func-v1
|
||||
fission fn delete --name func-v2
|
||||
fission package delete --orphan
|
||||
|
||||
# bug in canary config cache when you re-create a config with the same name, restart controller
|
||||
kubectl -n fission get pod -l application=fission-api -o name | xargs -n1 kubectl -n fission delete
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
module.exports = async function(context) {
|
||||
return {
|
||||
status: 200,
|
||||
body: "This is Version One!\n"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
module.exports = async function(context) {
|
||||
return {
|
||||
status: 200,
|
||||
body: "This is Version Two!\n"
|
||||
};
|
||||
}
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# this script is useful to demo canary deployment when the latest function starts receiving 100% of the traffic
|
||||
|
||||
DEMO_RUN_FAST=1
|
||||
ROOT_DIR=$(dirname $0)/..
|
||||
. $ROOT_DIR/util.sh
|
||||
|
||||
desc "Kubernetes cluster"
|
||||
run "kubectl get nodes"
|
||||
|
||||
desc "Fission installed"
|
||||
run "kubectl --namespace fission get deployment"
|
||||
|
||||
clear
|
||||
|
||||
desc "NodeJS environment pods"
|
||||
run "kubectl --namespace fission-function get pod -l environmentName=nodejs"
|
||||
|
||||
# set up functions
|
||||
fission fn create --name func-v1 --env nodejs --code func-v1.js
|
||||
desc "Function version 1"
|
||||
run "fission function get --name func-v1"
|
||||
|
||||
fission fn create --name func-v2 --env nodejs --code func-v2.js
|
||||
desc "Function version 2"
|
||||
run "fission function get --name func-v2"
|
||||
|
||||
desc "Create a route \(HTTP trigger\) the version-1 of the function with weight 100% and version-2 with weight 0%"
|
||||
run "fission route create --name route-canary --method GET --url /canary --function func-v2 --weight 0 --function func-v1 --weight 100"
|
||||
|
||||
desc "Start sending requests to the route"
|
||||
run_bg "hey -n 100000 -c 1 http://$FISSION_ROUTER/canary"
|
||||
|
||||
desc "Create a canary config: with an increment of 10 percent, every 1 minute, rolling back if 10% of requests fail"
|
||||
run "fission canary-config create --name canary-1 --newfunction func-v2 --oldfunction func-v1 --httptrigger route-canary --increment-step 10 --increment-interval 30s --failure-threshold 10"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
fission fn delete --name hello
|
||||
fission route delete --name $(fission route list|grep hello|cut -f1 -d' ')
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
module.exports = async function(context) {
|
||||
return {
|
||||
status: 200,
|
||||
body: "This is Version One!\n"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
module.exports = async function(context) {
|
||||
return {
|
||||
status: 200,
|
||||
body: "This is Version Two!\n"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
module.exports = async function(context) {
|
||||
return {
|
||||
status: 200,
|
||||
body: "Hello, world!\n"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEMO_RUN_FAST=1
|
||||
ROOT_DIR=$(dirname $0)/..
|
||||
. $ROOT_DIR/util.sh
|
||||
|
||||
|
||||
#
|
||||
# General setup intro
|
||||
#
|
||||
desc "Our Kubernetes cluster"
|
||||
run "kubectl get nodes"
|
||||
|
||||
desc "Fission is installed"
|
||||
run "kubectl --namespace fission get deployment"
|
||||
|
||||
clear
|
||||
|
||||
#
|
||||
# Hello world, environments, cold starts
|
||||
#
|
||||
|
||||
desc "Hello world function"
|
||||
run "cat hello.js"
|
||||
|
||||
desc "Add the NodeJS environment to fission"
|
||||
run "fission env create --name nodejs --image fission/node-env"
|
||||
|
||||
desc "NodeJS environment pods"
|
||||
run "kubectl --namespace fission-function get pod -l environmentName=nodejs"
|
||||
|
||||
desc "Upload our function to fission"
|
||||
run "fission function create --name hello --env nodejs --code hello.js"
|
||||
|
||||
desc "Set up a route (aka HTTP Trigger) for the function"
|
||||
run "fission route create --method GET --url /hello --function hello"
|
||||
|
||||
sleep 2
|
||||
|
||||
desc "Finally, run the function"
|
||||
run "time -p curl http://$FISSION_ROUTER/hello"
|
||||
|
||||
desc "Run the function again"
|
||||
run "time -p curl http://$FISSION_ROUTER/hello"
|
||||
run "time -p curl http://$FISSION_ROUTER/hello"
|
||||
|
||||
desc "The pod is now labeled by the function name"
|
||||
run "kubectl --namespace fission-function get pod -l functionName=hello"
|
||||
|
||||
#
|
||||
# Declarative Specs.
|
||||
#
|
||||
# Use go for this one to show off the fact that we can do builds.
|
||||
#
|
||||
clear
|
||||
|
||||
pushd declarative
|
||||
|
||||
desc "Declaratively specified app"
|
||||
run "ls"
|
||||
|
||||
desc "Declaratively specified app"
|
||||
run "ls specs"
|
||||
|
||||
desc "Validate configs"
|
||||
run "fission spec validate"
|
||||
|
||||
desc "Deploy application, wait for build to finish"
|
||||
run "fission spec apply --wait"
|
||||
|
||||
desc "Invoke our new function"
|
||||
run "fission function test --name hello-go"
|
||||
|
||||
#
|
||||
# Live Reload (still in the same app)
|
||||
#
|
||||
clear
|
||||
|
||||
|
||||
|
||||
|
||||
popd
|
||||
|
||||
#
|
||||
# Record replay
|
||||
#
|
||||
clear
|
||||
|
||||
#
|
||||
# Canary Deployments
|
||||
#
|
||||
clear
|
||||
|
||||
# set up functions
|
||||
fission fn create --name func-v1 --env nodejs --code func-v1.js
|
||||
desc "Function version 1"
|
||||
run "fission function get --name func-v1"
|
||||
|
||||
fission fn create --name func-v2 --env nodejs --code func-v2.js
|
||||
desc "Function version 2"
|
||||
run "fission function get --name func-v2"
|
||||
|
||||
desc "Create a route \(HTTP trigger\) the version-1 of the function with weight 100% and version-2 with weight 0%"
|
||||
run "fission route create --name route-canary --method GET --url /canary --function func-v2 --weight 0 --function func-v1 --weight 100"
|
||||
|
||||
desc "Start sending requests to the route"
|
||||
run_bg "hey -n 100000 -c 1 http://$FISSION_ROUTER/canary"
|
||||
|
||||
desc "Create a canary config: with an increment of 10 percent, every 1 minute, rolling back if 10% of requests fail"
|
||||
run "fission canary-config create --name canary-1 --newfunction func-v2 --oldfunction func-v1 --httptrigger route-canary --increment-step 10 --increment-interval 30s --failure-threshold 10"
|
||||
|
||||
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEMO_RUN_FAST=1
|
||||
ROOT_DIR=$(dirname $0)/..
|
||||
. $ROOT_DIR/util.sh
|
||||
|
||||
|
||||
desc "one"
|
||||
run "sleep 30"
|
||||
|
||||
desc "two"
|
||||
run "echo hi"
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
fission spec destroy
|
||||
|
||||
# this one is generated in run.sh
|
||||
rm specs/function-hello-go.yaml
|
||||
|
||||
rm *.~?~
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Handler is the entry point for this fission function
|
||||
|
||||
func Handler(w http.ResponseWriter, r *http.Request) {
|
||||
msg := "Hello, CNCF Webinar!\n"
|
||||
w.Write([]byte(msg))
|
||||
}
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEMO_RUN_FAST=1
|
||||
ROOT_DIR=$(dirname $0)/..
|
||||
. $ROOT_DIR/util.sh
|
||||
|
||||
desc "Declaratively specified app"
|
||||
run "ls specs"
|
||||
|
||||
desc "Generate initial YAML, so we don't have to write it by hand"
|
||||
run "fission function create --spec --name hello-go --env go --src hello.go --entrypoint Handler"
|
||||
|
||||
desc "Generated function YAML"
|
||||
run "tail -25 specs/function-hello-go.yaml"
|
||||
|
||||
desc "Deploy on cluster, and wait for build result"
|
||||
run "fission spec apply --wait"
|
||||
|
||||
desc "Invoke the function"
|
||||
run "fission function test --name hello-go"
|
||||
|
||||
desc "Live-reload: auto build + deploy on save"
|
||||
run "fission spec apply --watch"
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
Fission Specs
|
||||
=============
|
||||
|
||||
This is a set of specifications for a Fission app. This includes functions,
|
||||
environments, and triggers; we collectively call these things "resources".
|
||||
|
||||
How to use these specs
|
||||
----------------------
|
||||
|
||||
These specs are handled with the 'fission spec' command. See 'fission spec --help'.
|
||||
|
||||
'fission spec apply' will "apply" all resources specified in this directory to your
|
||||
cluster. That means it checks what resources exist on your cluster, what resources are
|
||||
specified in the specs directory, and reconciles the difference by creating, updating or
|
||||
deleting resources on the cluster.
|
||||
|
||||
'fission spec apply' will also package up your source code (or compiled binaries) and
|
||||
upload the archives to the cluster if needed. It uses 'ArchiveUploadSpec' resources in
|
||||
this directory to figure out which files to archive.
|
||||
|
||||
You can use 'fission spec apply --watch' to watch for file changes and continuously keep
|
||||
the cluster updated.
|
||||
|
||||
You can add YAMLs to this directory by writing them manually, but it's easier to generate
|
||||
them. Use 'fission function create --spec' to generate a function spec,
|
||||
'fission environment create --spec' to generate an environment spec, and so on.
|
||||
|
||||
You can edit any of the files in this directory, except 'fission-deployment-config.yaml',
|
||||
which contains a UID that you should never change. To apply your changes simply use
|
||||
'fission spec apply'.
|
||||
|
||||
fission-deployment-config.yaml
|
||||
------------------------------
|
||||
|
||||
fission-deployment-config.yaml contains a UID. This UID is what fission uses to correlate
|
||||
resources on the cluster to resources in this directory.
|
||||
|
||||
All resources created by 'fission spec apply' are annotated with this UID. Resources on
|
||||
the cluster that are _not_ annotated with this UID are never modified or deleted by
|
||||
fission.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# This file is generated by the 'fission spec init' command.
|
||||
# See the README in this directory for background and usage information.
|
||||
# Do not edit the UID below: that will break 'fission spec apply'
|
||||
apiVersion: fission.io/v1
|
||||
kind: DeploymentConfig
|
||||
name: declarative-specs
|
||||
uid: e20fe7b4-b012-4ae0-98bd-0f968d21d397
|
||||
@@ -0,0 +1,51 @@
|
||||
include:
|
||||
- hello.go
|
||||
kind: ArchiveUploadSpec
|
||||
name: hello-go
|
||||
|
||||
---
|
||||
apiVersion: fission.io/v1
|
||||
kind: Package
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: hello-go-xfxy
|
||||
namespace: default
|
||||
spec:
|
||||
deployment:
|
||||
checksum: {}
|
||||
environment:
|
||||
name: go
|
||||
namespace: default
|
||||
source:
|
||||
checksum: {}
|
||||
type: url
|
||||
url: archive://hello-go
|
||||
status:
|
||||
buildstatus: pending
|
||||
|
||||
---
|
||||
apiVersion: fission.io/v1
|
||||
kind: Function
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: hello-go
|
||||
namespace: default
|
||||
spec:
|
||||
InvokeStrategy:
|
||||
ExecutionStrategy:
|
||||
ExecutorType: poolmgr
|
||||
MaxScale: 1
|
||||
MinScale: 0
|
||||
TargetCPUPercent: 80
|
||||
StrategyType: execution
|
||||
configmaps: null
|
||||
environment:
|
||||
name: go
|
||||
namespace: default
|
||||
package:
|
||||
functionName: Handler
|
||||
packageref:
|
||||
name: hello-go-xfxy
|
||||
namespace: default
|
||||
resources: {}
|
||||
secrets: null
|
||||
@@ -6,7 +6,7 @@ metadata:
|
||||
name: guestbook
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
fission fn delete --name hi-py
|
||||
fission route delete --name $(fission route list|grep hi|cut -f1 -d' ')
|
||||
fission recorder delete --name my-recorder
|
||||
kubectl -n fission delete pod redis-0
|
||||
@@ -0,0 +1,7 @@
|
||||
from flask import request
|
||||
from flask import current_app
|
||||
|
||||
|
||||
def main():
|
||||
name=request.args["name"]
|
||||
return "Hello, %s" % name
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEMO_RUN_FAST=1
|
||||
ROOT_DIR=$(dirname $0)/..
|
||||
. $ROOT_DIR/util.sh
|
||||
|
||||
desc "A simple function that takes inputs"
|
||||
run "cat hi.py"
|
||||
|
||||
desc "Set up function"
|
||||
run "fission function create --name hi-py --env python --code hi.py --entrypoint hi.main"
|
||||
|
||||
desc "Set up route"
|
||||
run "fission route create --function hi-py --url /hi --method GET"
|
||||
|
||||
desc "Set up recorder"
|
||||
run "fission recorder create --name my-recorder --function hi-py"
|
||||
|
||||
desc "Run function"
|
||||
run "curl http://$FISSION_ROUTER/hi?name=world"
|
||||
|
||||
desc "View recording"
|
||||
run "fission records view -v"
|
||||
|
||||
requid=$(fission records view -v|tail -1|cut -f1 -d' ')
|
||||
|
||||
desc "Replay recording"
|
||||
run "fission replay --reqUID $requid"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user