Compare commits

...
382 Commits
Author SHA1 Message Date
Sanket SudakeandGitHub 6fbd4878be Generate and archive fission cli per OS and platform (#2071)
* Generate and archive fission cli per OS and platform

* Separate tagging from release script
2021-06-16 13:10:31 +05:30
Sanket SudakeandGitHub 023a9905f6 Changes for releasing 1.13 (#2070)
* Changes for releasing 1.13

- Changed release version in charts 1.13
- Made changes in release scripts and makefile

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Update helm chart maintainers

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-15 19:50:23 +05:30
Harsh ThakurandGitHub 6facdac464 Fix golang lint errors (#2068)
* Fix golang lint errors

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Typo for fields

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Multi error fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Multi error fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Add nolint to logtostderr errcheck

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-15 15:03:42 +05:30
377600d0a3 Add router cache back for performance comparision (#2036)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-06-14 18:30:23 +05:30
b6cf078395 Added GCP PubSub Image, enabled Keda by default and updated versions of all Keda connector images (#2065)
* Added GCP PubSub Image, enabled Keda by default and updated versions of all Keda connector images

Signed-off-by: Vishal Biyani <vrbiyani@gmail.com>

* Fixed the hyphens, it's been long since I have written Helm templates :)

Signed-off-by: Vishal Biyani <vrbiyani@gmail.com>

* Fixed the hyphens, it's been long since I have written Helm templates :)

Signed-off-by: Vishal Biyani <vrbiyani@gmail.com>

* Update charts/fission-all/values.yaml

Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>

* Update charts/fission-core/values.yaml

Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-14 17:20:44 +05:30
673ca25cf2 Support for multiple HTTP verbs in routes/HTTPTrigger (#2064)
* Support for multiple HTTP verbs in routes/HTTPTrigger

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Update pkg/apis/core/v1/types.go

Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix fallbackurl for ingress

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-14 14:48:27 +05:30
4038f0384b Add a SharedIndexInformer for services and deployments to NewDeploy executor (#2061)
* Add a SharedIndexInformer for services and deployments to NewDeploy executor.

This brings the NewDeploy executor behaviour into sync with GenericPoolManager behaviour
by caching Kubernetes services and deployments used in per-request function validation.

* Create informers in executer by executor label

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: James Sinclair <irgeek@btc.com.au>
2021-06-11 16:52:53 +05:30
Sanket SudakeandGitHub f5dc6ab994 Correct docker platforms and optimize make commands (#2066)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-11 13:05:08 +05:30
aa45703a99 Enable prefix based routing (#2047)
* Enable prefix based routing

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Optimize checking condition

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Disable few tests

* disable router modification for now

* run code generator

* Collect fission dump in CI

* Enable all tests back

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Remove unwanted code

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Add prefix support at more places and couple of todo's

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Few more changes

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Improve function trim support

* Support for prefix based urls in fission function test

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* multi route for fission function test

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Improve validations in trigger creations

* Adjust leading / in url from fission

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Change suburl to subpath for function test

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-10 13:54:49 +05:30
Harsh ThakurandGitHub f01de5c802 Add websocket test (#2053)
* Add websocket test

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use trap for exit code

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Remove readme

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Format, go version fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Update image name

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use spec dir

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Change directory before running file

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-10 12:27:20 +05:30
827b64d633 Add poolsize warning for environment create/update CLI (#1837)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-08 11:53:38 +05:30
7bf82c7ea9 Move RBAC v1beta1 to v1 (#2059)
Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-08 08:25:52 +05:30
3055a3ada0 Added body in the error topic header (#1830)
Signed-off-by: therahulbhati <rjbhati009@gmail.com>

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-07 22:28:11 +05:30
5b1883802e Added fission upgrade workflow (#2050)
* Adding upgrade workflow file

* Update upgrade_test.yaml

* Update push_pr.yaml

* Update upgrade_test.yaml

* adding kube A

* Update upgrade_test.yaml

* adding script for upgrade testing

* adding fission cli from soource

* changing order

* correcting typo

* adding fission fn

* restructirung upgrade test scripts

* restructirung upgrade test scripts

* adding fission cli build

* script arrangment

* script arrangment

* changing job name

* adding supporting scripts

* adding supporting scripts

* adding supporting scripts

* script re-ordered

* script re-ordered

* script modifcation

* moved scripts under /test

* separated function test blocks

* added a sleep

* reverting main workflow changes

* added stable version installation step

* added stable version installation step

* stable fn test

* adding latest version build

* adding latest version build

* adding new tests

* adding new tests

* adding new tests

* adding new tests

* adding new tests

* adding new tests

* adding new tests

* adding new tests

* adding new stable release

* adding new stable release

* disabling skaffold build and using docker build

* disabling skaffold build and using docker build

* disabling skaffold build and using docker build

* disabling skaffold build and using docker build

* fission upgrade using helm

* fission upgrade using helm

* fission upgrade using helm

* fission upgrade using helm

* fission upgrade using helm

* fission upgrade using helm

* fission upgrade using helm

* fission upgrade using helm

* adding helm upgrade with dependency update

* cleanup scripts

* added crd deletion step before helm upgrade

* added crd deletion step before helm upgrade

* added crd deletion step before helm upgrade

* adding run tests

* added test apache deployment

* change in repo name

* helm list added

* changed pullpolicy

* troubleshooting

* troubleshooting

* troubleshooting

* troubleshooting

* troubleshooting

* troubleshooting

* removed hardcoded enteries from helm charts

* fixing alignment

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* removed temp files [cleanup]

* removed timeout

* adding preupgradechecks image build

* adding fission object creation after upgrade

* removing fissin object creation after upgrading...

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* workflow step split-up

* clean-up

* clean-up

* output formatting

* added a sleep to re-create resources

* added a sleep to re-create resources

* added a sleep to re-create resources

* excluded examples from upgrade work flow

* removed helm stable update step from workflow

* removed helm stable update step from workflow

* added pr corrections

* typo correction

* troubleshooting

* troubleshooting

* troubleshooting

* pr corrections

* pr corrections

* pr corrections

* removed sleep after helm upgrade

* fixing typo

* remvoed sleep after fn creation

* clean-up

* clean-up

* added workflow_dispatch

* added workflow_dispatch

* added workflow_dispatch

* added workflow_dispatch

Co-authored-by: Jithindevasia <jithindevasia@Infraclouds-MacBook-Pro.local>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-07 21:20:06 +05:30
bef677678b make router resources configurable (needed for router HPA setup) (#1857)
Co-authored-by: Daniel Candrea <daniel.candrea@complyadvantage.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-06 14:13:07 +05:30
Sanket SudakeandGitHub 61c59b514f Collect fission dump if CI tests fails & enable manual trigger (#2058)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-06 10:42:43 +05:30
8f998e799d Feature/router core component pod config (#1936)
* Update router.yaml

* Update router.yaml

* Update README.md

* Update values.yaml

* Update values.yaml

* Update Chart.yaml

* Update Chart.yaml

* Update Chart.yaml

* Update Chart.yaml

* Update Chart.yaml

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-03 21:15:17 +05:30
Sanket SudakeandGitHub c2f455ec1b Capture timestamp whenever cleanup is triggered in tests (#2054)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-03 14:31:40 +05:30
Sanket SudakeandGitHub 3a8af97eb9 Wait for small time to avoid timeout in specs tests (#2052)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-03 10:57:10 +05:30
Sanket SudakeandGitHub e6c13057ce Change container name for runtime container to environment name in newdeploy (#2044)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-02 16:23:53 +05:30
5f47a25711 Multiarch release (#1929)
* Adding release script for multiarch

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Comment on buildx

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Remove need of triggering buildx script explicitly in build

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-02 14:40:11 +05:30
Sanket SudakeandGitHub 4c9b67ead4 Add role required by fetcher pod to fetch events & pods in helm chart (#2048)
* Add role required by fetcher pod to fetch events & pods in helm chart

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Add prometheus repo in Github PR flow

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-02 11:42:41 +05:30
Harsh ThakurandGitHub adef5e0e6a Add targets for CRDs and CLI (#2049)
Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-01 14:58:10 +05:30
4e2632e100 Keda podspec (#2021)
* Add podspec to MQT

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Add preupgrade check

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use zap logger

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-27 14:21:34 +05:30
4ff204a0c4 updated charts to v2 and updated prometheus chart url, version (#1923)
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-27 12:31:25 +05:30
1e0baf5f6c Crds update (#2033)
* Add code generated using latest code-generator

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Update client-go and respective dependencies to v0.19.2

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Upgrading CRD version

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Minor changes

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Resolved client-go calls as per new generated code

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Function validations fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix environment and package validations

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Add basic validation to all CRDs

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Remove CRD installation related code

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Modify GHA for CRD installation

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix Package and HTTPTrigger validations

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Change Go version in CI to 1.15

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Style: kubebuilder marker change

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix test with deprecated fields

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Update kind node image to v1.16.15 in CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Update kind node image to v1.19.11 in CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Replace context Background with TODO for future implementation

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Optimize initial CRD check code

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Use Get call only to check CRDs

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Add kustomize for CRD apply

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-26 15:07:03 +05:30
a9c56e5bb2 Add a warning if spec is applied on a dirty worktree (#1966)
* Add a warning if spec is applied on a dirty worktree

* Update go dependencies after rebase

* Use the console package for showing the warning

* Fix merge conflicts

* Handle errors and use better messages

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-24 21:36:14 +05:30
4a1fc11b2d OnlyOnce preupgrade check (#2037)
* OnlyOnce preupgrade check

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Update preupgradechecks.go

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-24 14:32:11 +05:30
Sanket SudakeandGitHub 42c22a7bbb Change examples references to examples repostiory (#2038)
Since we recently migrated all fission examples to fission/examples repository, we need to change
respective references.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-24 13:25:32 +05:30
Sanket SudakeandGitHub 369537e515 Cleanup and remove hardcoding from delete-crds script (#2035)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-23 13:23:30 +05:30
3880279e89 do not use deprecated functions/methods (#2027)
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-21 13:53:28 +05:30
Sanket SudakeandGitHub 524e7bcfd3 Use latest 1.14 go version in CI (#2032)
We are facing issue in CI for multiple PRs due to mlock. It depends on kernel version or ulimit. Trying to switch to latest go version from 1.14 and see if it helps!

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-20 11:49:30 +05:30
3bac1d2d9d Fix log sort order when multiple series are returned (#1956)
Series are sorted internal by "order by", but the set of all series returned is not. Tried some ways to sort completely on database, found no way .. client side sort works at least

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-05-20 07:55:36 +05:30
d7ac0ee17a feat: Add image pull policy when create KEDA connector deployments (#1944)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-05-20 01:22:25 +05:30
Rahul BhatiandGitHub 462b7d861d Serve only one request and garbage collect (#1978)
Adding once only execution pattern to pool manager based functions. This is for use cases where you don't want to share the samne pod for another execution instance!
2021-05-19 22:48:49 +05:30
Harsh ThakurandGitHub f523f8b2e3 Add preupgrade check for RPP (#2014)
* Add preupgrade check for RPP

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Change from panic to error, and better logging

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Minor changes

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Modify function to return CRD

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Remove redundant error logging

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-05-18 18:53:32 +05:30
Harsh ThakurandGitHub 279b009882 Add metrics to Reaper (#2019)
* Add metrics to Reaper

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Change duration to seconds and fix labels

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-05-18 17:30:21 +05:30
Sanket SudakeandGitHub ee4feb17c4 Handle SIGTERM signal in mqtrigger subscriber (#2029)
In test_mqtrigger.sh and test_mqtrigger_error.sh tests, we timeout program
if not received right output. Ensuring we capture timeout signal and do program
cleanup accordingly. Also printing due to which signal program failed.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-18 16:26:44 +05:30
Sanket SudakeandGitHub 2a014e56b0 Add Google Analytics reporting in place of existing custom reporting (#2015)
Replacing the older analytics with a new Google Analytics based mechanism.
2021-05-12 12:24:27 +05:30
040763ebb2 fix: hack/Dockerfile to reduce vulnerabilities (#2016)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN10-OPENSSL-567125
- https://snyk.io/vuln/SNYK-DEBIAN10-PERL-570792
- https://snyk.io/vuln/SNYK-DEBIAN10-PERL-570797
- https://snyk.io/vuln/SNYK-DEBIAN10-PERL-570802
- https://snyk.io/vuln/SNYK-DEBIAN10-SUBVERSION-1071814

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-10 18:19:37 +05:30
Sanket SudakeandGitHub dfd8d340a0 Change alpine base image from 3.10 to 3.13 (#2017)
Alpine 3.10 has reached end-of-support. Using alpine 3.13 instead.
Reference: https://alpinelinux.org/releases/
2021-05-10 12:50:36 +05:30
VishalandGitHub ca6bc12cfc Restoring one example as it is used in many places including Helm charts (#2011)
Some tests were pointing to examples directory which has been moved out. Also kept one node.js examples as it is widely used in Helm charts etc.
2021-05-09 23:36:39 +05:30
VishalandGitHub 5b4bf5964e Moving out Environments to own repo (#1810)
Moved out environments and examples out of main Fission repo to their own repo. This is to allow changes to environment releases to be independent of main Fission releases.
2021-05-01 15:42:35 +05:30
Harsh ThakurandGitHub f72bfd8f3a Websocket Support: Pod Reaper (#1982)
Websocket event support for cleaning up pods only after WS connection is terminated. The support for websocket is right now in the environment itself and router simply acts as a proxy for WS communication!
2021-04-27 21:06:22 +05:30
Harsh ThakurandGitHub 0d93c109fb Maintain CRD folder to keep track of Schemas (#1938)
Adds CRD Yaml files needed for upgrade as the OpenAPISchema validation has been added.
2021-04-27 17:20:03 +05:30
Rahul BhatiandGitHub 1cd8f4d4f7 Increase default concurrency (#1980)
Increase the default concurrency to 500 from 5 set in the function. Usually, it is good to error on the higher side and if needed, users can always fine-tune it to their needs.
2021-04-06 14:52:14 +05:30
Rahul BhatiandGitHub 25acd7fd16 Feature request per pod (#1946)
This feature enables routing more than one request to a pod at the same time. This is the first draft of the work and might involve more optimizations later.
2021-03-31 12:35:30 +05:30
Ta-Ching ChenandGitHub 3e6dae9616 Fix wrong checksum was assigned (#1968) 2021-03-29 16:20:21 +05:30
James SinclairandGitHub 1dce070245 Add a SharedIndexInformer for pods to router. (#1951)
Improving efficiency with cache
2021-03-22 16:50:24 +05:30
Rahul BhatiandGitHub cc552d9777 Add function in payload instead of just metadata (#1919)
Passing information of function from router to executor is more efficient than calling the K8S API. This change does that instead of passing only metadata and then executor calling the K8S API again.
2021-03-10 14:52:23 +05:30
c7d448ca49 Add fields to pod spec (#1932)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-23 15:16:45 +05:30
Rahul BhatiandGitHub fe0bd3ff67 Release 1.12.0 (#1937) 2021-02-11 22:22:37 +05:30
Rahul BhatiandGitHub b5adc2bf93 Updated tags of connector images (#1934)
Signed-off-by: therahulbhati <rjbhati009@gmail.com>
2021-02-10 21:50:47 +05:30
6f9bad3d05 Spec validation option (#1865)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-08 11:14:38 +05:30
f28799cc4c Fix status code for rate limit (#1924)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-05 16:52:43 +05:30
e2376c27b4 Envupdate crossupdate fix (#1866)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-05 15:39:59 +05:30
e4a0aa3480 Migrating to keda2.0 (#1868)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-05 10:28:54 +05:30
045a365a1b Exit with status code 1 on failed package builds (#1926)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
2021-02-04 21:57:38 +05:30
Rahul BhatiandGitHub 1059e9873a Updated role and permission for fission-crd cluster role (#1867) 2021-02-04 18:07:43 +05:30
e0522cc20e Updates required for multi-architecture builds. (#1891)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
2021-02-03 23:03:04 +05:30
ef83d4314e Put message to error topic when exceed max retries in kafka mqt (#1885)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
2021-02-02 23:20:40 +05:30
3b4ca09931 Improved readyPod queue implementation and bugfix (#1890)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-02 17:11:54 +05:30
19adf0cd7e Fixing issue of pulling docker image twice in CI (#1903)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-02 12:25:03 +05:30
Rahul BhatiandGitHub 3fb1fdf16a Updated go plugin version for Github Action CI/CD (#1922) 2021-01-29 10:28:22 +05:30
Gaurav GahlotandGitHub 695b0759e4 Fixed golangci-lint issues: /fission/pkg (#1902) 2021-01-19 23:29:20 +05:30
TosoneandGitHub 6dbdf4d88b Remove unnecessary import package. (#1897) 2020-12-28 18:48:02 +05:30
Rahul BhatiandGitHub e55430f61a Replace build status badge to use GH Actions status (#1887) 2020-12-21 22:51:27 +05:30
Rahul BhatiGitHubVishalsahil-lakhwaniagiwalpooja20abhisheks-infracloud
a68f3edcd4 Github Actions Workflows (#1876)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
Co-authored-by: sahil-lakhwani <sahilakhwani@gmail.com>
Co-authored-by: agiwalpooja20 
Co-authored-by: abhisheks-infracloud
2020-12-17 19:00:44 +05:30
Gaurav GahlotandGitHub e438df87fa Fixed golangci-lint issues: /fission/pkg/executor (#1842) 2020-12-03 22:29:35 +05:30
Rahul BhatiandGitHub bb9f4136f5 Readypod optimization in executor (#1860)
A ready pod which can be specialized was fetched for every function earlier, this has been changed to a queue and cache implementation in client-go to improve performance.
2020-11-19 15:23:02 +05:30
Gaurav GahlotandGitHub aaf9f18d93 Fixed golangci-lint issues: /fission/pkg/router (#1831) 2020-11-03 16:15:50 +05:30
2f23120a64 Update nats streaming image name in values.yaml and deployments yaml (#1839)
Co-authored-by: GT <gtalekar@infracloud.io>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-10-28 23:37:47 +05:30
7743583f4d in-progress golint warning fixes (#1799)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-10-28 11:44:35 +05:30
fe5542845e Fix golint warnings for publisher package (#1822)
Co-authored-by: Shajitha Mohammed <shajithamohammed28@gmail.com>
2020-10-27 21:19:28 +05:30
Rahul BhatiandGitHub e65bfcdacf Release 1.11.2 (#1843) 2020-10-21 08:47:26 +05:30
9d199c86c5 Fix env resources getting pruned due to CRD Validation (#1833)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-10-16 23:46:50 +05:30
fca0a60e5b Fixed typos across fission repo (#1832)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-10-16 17:25:11 +05:30
VishalandGitHub 6e3c42f238 Release 1.11.1 (#1838)
Release 1.11.1 along with some changes to release script
2020-10-15 11:06:05 +05:30
ab94b68571 Update aws-kinesis image name in values.yaml (#1817)
Co-authored-by: GT <gtalekar@infracloud.io>
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
2020-10-14 17:20:26 +05:30
0662a44017 Update aws-sqs image name in values.yaml (#1714)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-10-14 14:49:08 +05:30
78e530f506 Improvements from scale testing (#1812)
Poolmanager when tested at high load had some issues and this PR fixes one set of them which were found so far. 

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-10-14 13:23:03 +05:30
Rahul BhatiandGitHub ab0b43d51c Added flag for insecureSkipVerfiy (#1829) 2020-10-13 21:03:19 +05:30
Rahul BhatiandGitHub d975534bf7 Added field to preserve fields during CRD validation (#1818) 2020-10-13 12:38:24 +05:30
Darsh ShahandGitHub ec22e22bbd fix(docs): Update Readme (#1742)
Minor adjustments to readme in first section
2020-10-01 15:35:17 +05:30
Parikshit HoodaandGitHub 0face3e966 Update README.md - fix typo (#1737)
changed **meetnigs** to **meetings**.
2020-09-30 22:37:27 +05:30
Ahmet TürkmenandGitHub 823aacdeba [skip ci] fix contributing.md link on readme (#1731) 2020-09-29 15:08:53 +05:30
c605d1d2c6 Added code to prevent deletion of active fn pod (#1724)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-28 14:09:55 +05:30
ef65602b79 Added concurrency field to schema validation (#1727)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-24 23:06:37 +05:30
VishalandGitHub 778f047376 Improving contributing docs (#1726)
Improved contributing docs, added DO logo in sponsors.
2020-09-23 13:38:39 +05:30
VishalandGitHub 2b805fc7ca Release 1.11.0 (#1716) 2020-09-16 22:27:02 +05:30
f3fe3123b3 Adding Concurrency in Pool Manager (#1698)
Concurrency in the pool manager allows specializing pods concurrently based on a specified limit. 

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-16 18:48:08 +05:30
VishalandGitHub c1ac7fcd38 Bumping up release of Helm for release script (#1715)
Upgrading to Helm3 for all CI testing
2020-09-16 16:07:48 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>sahil-lakhwaniVishal
7e7d9720be Bump jetty-server from 9.0.4.v20130625 to 9.4.17.v20190418 in /environments/jvm-jersey (#1706)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sahil-lakhwani <sahilakhwani@gmail.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-11 14:51:54 +05:30
4fbaae4b12 Non-root users access Secrets and ConfigMaps (#1697)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-11 10:24:28 +05:30
07b294778a logs: change timestamp to ISO (#1708)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-11 08:04:29 +05:30
VishalandGitHub 8c0a368969 Skaffold: Typo in Helm values for Prometheus (#1709) 2020-09-10 18:28:15 +05:30
99c2020795 Addition of openapischemav3 to fission CRDs to support kubectl explain (#1702)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-10 14:31:27 +05:30
Sahil LakhwaniandGitHub 54b384efec jvm-jersey-env (#1677)
A new Jersey framework based JVM environment which is lightweight and simpler.
2020-09-08 21:24:25 +05:30
975286c2ac Add headers to Kafka MQT error topics (#1701)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-07 19:13:36 +05:30
VishalandGitHub 70b01eb9c8 Skaffold kind (#1700) 2020-09-04 17:37:07 +05:30
1755d3a017 Adding NodeJS version 12 env (#1683)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
2020-08-28 10:24:22 +05:30
Rahul BhatiandGitHub 22f385b809 Update values.yaml with mqt keda configuration (#1670) 2020-08-27 21:45:46 +05:30
Rahul BhatiandGitHub f751546913 Removed code related to mqtrigger (#1680) 2020-08-06 20:59:08 +05:30
587b166a4e 1665: Python env sentry integration (#1669)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-08-04 09:46:12 +05:30
b208528d3d Add serviceaccount for nats-streaming (#1646)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-07-31 17:02:29 +05:30
882abff431 Added prefix tag in fluentbit filter stanza (#1671)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-07-30 21:03:13 +05:30
892da2478b Allow user to override value of influxdb image (#1642)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-07-23 14:50:50 +05:30
28f5cd7852 (fix) Dependencies and steps for building examples/java locally (#1653)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-07-17 15:18:31 +05:30
Rahul BhatiandGitHub 8e0571c7c9 Fission MQT integration with keda (#1657)
Fission MQT integration based on Keda with Kafka connector
2020-07-14 21:35:48 +05:30
d6fc9f71d0 Allow user to override nats-streaming image (#1645)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-06-30 15:14:46 +05:30
108ef50bd5 Allow user to define busybox image (#1643)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-06-30 10:42:30 +05:30
VishalandGitHub 90b7680392 Release 1.10.0 (#1658) 2020-06-30 08:56:30 +05:30
a8a9831c16 [WIP] (feat) Added Exponential BackOff for Retry in builder (#1614)
Co-authored-by: Rahul M Chheda <rahul.chheda@mayadata.io>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-06-29 12:01:29 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a1f39bb7d3 Bump rack from 2.0.8 to 2.1.4 in /environments/ruby (#1654)
Bumps [rack](https://github.com/rack/rack) from 2.0.8 to 2.1.4.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.8...2.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-25 12:57:56 +05:30
VishalandGitHub a50c9f76ec For fixing staticcheck issue (#1652)
The S3 feature PR caused some static check issues after the merge, those are fixed now.
2020-06-23 15:31:59 +05:30
f6e679e70e S3 backend for storage service (#1629)
Co-authored-by: Alok Kumar <rajalokan@gmail.com>
2020-06-15 19:13:13 +05:30
17bb1ac39f Python env changes for pip3 (#1633)
Co-authored-by: agiwalpooja20 <agiwalpooja20@gmail.com>
2020-06-05 16:03:46 +05:30
33c23c1341 Fixing verify-staticcheck.sh (#1622)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-06-04 15:16:09 +05:30
Rahul BhatiandGitHub 9dd084810f Added support for setting bodyParser limit param via environment variable (#1618)
In the NodeJs environment, the body-parser was set to 1MB, this change makes it configurable with an env variable.
2020-05-24 00:16:03 +05:30
VishalandGitHub d4e1cd4f1e Skaffold registry (#1617) 2020-05-22 10:39:01 +05:30
VishalandGitHub aa8c27fd5d Added codecov badge (#1604) 2020-05-13 21:24:49 +05:30
darkworonandGitHub 806104626f Make mergePodSpec pick up enableServiceLinks (#1601)
Attribute enableServiceLinks can be now configured in PodSpec so that environment variables are not injected in function pods and DNS is used for discovery
2020-05-13 14:42:07 +05:30
VishalandGitHub 2331dffe4c Update issue templates (#1602) 2020-05-13 10:26:04 +05:30
Rahul BhatiandGitHub 2d69542265 Added support for kube-context flag, to specify kubernetes context (#1595) 2020-05-11 18:54:06 +05:30
VishalandGitHub 3e8cbe112f Release 1.9.0 (#1597) 2020-05-11 01:26:46 +05:30
VishalandGitHub 31ff3f0290 Kind config (#1587)
A simple Kind cluster config for local development of Fission
2020-04-30 16:30:38 +05:30
Ta-Ching ChenandGitHub f606c3705f Show short flag on CLI usage (#1580) 2020-04-24 15:04:52 +08:00
758ee32aa9 External nats streaming (#1576)
Support for external NATS streaming instead of the one deployed with Fission

Co-authored-by: Shaun Cutts <shaunc@factfiber.com>
2020-04-19 21:53:27 +05:30
VishalandGitHub 163b1d0731 Skaffold Default Repo (#1575)
Skaffold default-repo enables users to use the Skaffold file without any change and by maintaining the docker repo in their local configuration.
2020-04-19 19:26:38 +05:30
e732cf59e0 [chart] Add PSP for logger (#1568)
Add PSP for logger

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-04-19 15:17:41 +05:30
VishalandGitHub a571c7b72c [WIP] Skaffold Fix (#1567)
Switched to dynamic tag and dynamic values for those fields in the deploy section. Also, switched to latest version of Skaffold.
2020-04-13 00:19:52 +05:30
VishalandGitHub 9340e62895 Python Env Build issue due to gevent (#1572) 2020-04-12 23:26:03 +05:30
Jared DavisandGitHub efd86e1b27 Create fission environment for go version 1.14 (#1570) 2020-04-12 23:02:06 +08:00
VishalandGitHub f1e243c145 Adding community meeting link and document (#1563)
Adding community meeting link and document as well as Fission image to readme
2020-03-26 23:34:08 +05:30
Ta-Ching ChenandGitHub e867b220a1 Return Kubernetes full error message (#1560)
This PR let the controller returns the detail error message
of kubernetes error which makes users understand what's
happening instead of meanless error msg.
2020-03-24 00:15:25 +08:00
Ta-Ching ChenandGitHub a04c40d016 Use stock InfluxDB image (#1557) 2020-03-20 16:52:16 +08:00
deluccaandGitHub 4fb1a8fbe8 Bump Python environment to latest Alpine (#1547) 2020-03-03 22:48:50 +08:00
dependabot[bot]andGitHub b959dd2e49 Bump nokogiri from 1.10.4 to 1.10.8 in /examples/ruby/parse (#1544)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.4 to 1.10.8.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.4...v1.10.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-02-26 22:47:53 +08:00
Ta-Ching ChenandGitHub 5c09099084 Avoid exposing sensitive data to client (#1543)
This PR changes the behavior of controller API which
wrongly exposes sensitive data to the client. Now, the
API only returns success if secret/configmap exists;
otherwise, an error will be returned.
2020-02-24 20:02:33 +08:00
Ta-Ching ChenandGitHub fc5711ce7c Support Function-level idle timeout setting (#1538)
This PR allows users to specify the idle timeout setting at Function-level.
Fix #1050
2020-02-21 02:01:26 +08:00
Ta-Ching ChenandGitHub cc14044b6b Add message queue service factory (#1537) 2020-02-20 23:30:39 +08:00
Ta-Ching ChenandGitHub e0dc7f2f81 Retry querying package info when "not found" (#1540)
In some cases, creating a package and querying the package info
immediately the Kubernetes API server will return "not found"
error. So retry the query again after some time.
2020-02-20 22:20:43 +08:00
Ta-Ching ChenandGitHub 03ce1e27c7 Fix function test timeout doesnt works (#1539) 2020-02-19 17:03:02 +08:00
Ta-Ching ChenandGitHub 735f9abef7 Update NATS-Streaming dependencies version (#1533) 2020-02-12 20:35:20 +08:00
Ta-Ching ChenandGitHub f2ddaa7921 Fix Git issue on case-insensitive OS (#1532) 2020-02-12 16:08:05 +08:00
Ta-Ching ChenandGitHub 75321d306a Reorganize message queue trigger directory structure (#1531) 2020-02-12 15:40:00 +08:00
Ta-Ching ChenandGitHub d2e9364e5e Put package deploy archive to fix path (#1529)
In some cases (#1384), users may want to access the file in the directory of deploy archive, however, we use the function UID name as the directory name and make it difficult for users to use as they don't know the real path of the directory.

This PR uses the fix name "deployarchive" to make things easier.
2020-02-12 09:29:27 +08:00
Ta-Ching ChenandGitHub b61f994746 Append Environment labels to function pod labels (#1530) 2020-02-11 17:49:14 +08:00
Ta-Ching ChenandGitHub 633593e412 Fix github_changelog_generator error (#1527) 2020-02-04 00:02:42 +08:00
Ta-Ching Chen e7c0ff7d41 CHANGELOG 1.8.0 2020-02-03 10:56:52 +00:00
Ta-Ching Chen bda974a72c Release 1.8.0 2020-02-03 15:19:16 +08:00
Ta-Ching Chen dbb2b49b55 Fix wrong path in release build script 2020-02-03 15:19:16 +08:00
Ta-Ching ChenandGitHub e770c619e5 Revert "Temporarily disable building JVM image during CI builds" (#1525)
This reverts commit 3687602508.
2020-02-03 15:02:48 +08:00
Ta-Ching ChenandGitHub 0d8d07d474 Update TerminationGracePeriod usage text (#1524) 2020-02-03 13:05:15 +08:00
Ta-Ching ChenandGitHub dd07c68201 Set package initial status if its empty (#1522)
If the user applies package YAML file has no status field,
the package won't be able to be compiled or deployed due
to lack of status. This PR aims to add a check at buildermgr
to set initial package status to those packages.
2020-02-02 00:39:02 +08:00
Ta-Ching ChenandGitHub e9804a5b76 Update slack invitation link (#1521) 2020-01-30 09:34:53 +08:00
Ta-Ching ChenandGitHub 85c384c64a Fix Java spec example (#1519) 2020-01-29 18:04:32 +08:00
Sahil LakhwaniandGitHub fed5fd4c5e JVM env: Add XML dependency (#1512) 2020-01-29 16:40:30 +08:00
Ta-Ching ChenandGitHub eec35b285e Fix executor wrongly deletes rolebindings (#1517)
Executor wrongly deletes role bindings if the user
creates an environment in the reserved namespaces. This
PR is a quick fix to solve the problem by checking if
an environment is under reserved namespaces.
2020-01-29 00:01:21 +08:00
Ta-Ching ChenandGitHub e2f1f778f3 Show global options in usage (#1516) 2020-01-28 19:37:07 +08:00
Ta-Ching ChenandGitHub 7b87d7c52c Add fake client for local command operation (#1515)
This PR adds a fake controller client for local CLI operations like 
offline spec generation or for unit test purposes. The fake client 
now only implements the "Version()" function and more functions 
will be implemented once we figure out how to achieve the goals 
mentioned above.
2020-01-28 17:38:43 +08:00
Ta-Ching ChenandGitHub c88fe59c71 Set prometheus.enabled=false in core chart (#1513) 2020-01-28 01:23:41 +08:00
Ta-Ching ChenandGitHub 9eac1512fb Fix poolmanager wrongly delete env pool (#1511)
The root cause of the problem is that eagerPoolCreator
tries to create the deployment when the poolmanager
is trying to delete it. To avoid this, start eager pool
creator after executor starts serving requests.
2020-01-28 00:58:37 +08:00
Ta-Ching ChenandGitHub 8f8afaf139 Use patch for robust pod metadata update in poolmgr (#1509)
Use "Patch" to update pod metadata instead of "Update" to avoid 
dropping fields that the old client-go doesn't support.
2020-01-28 00:04:22 +08:00
Ta-Ching ChenandGitHub e651433727 CI build steps optimize to reduce waiting time (#1508) 2020-01-27 21:05:17 +08:00
Ta-Ching ChenandGitHub 8ac7db46e0 Add Go 1.13 support and upgrade Go 1.12 version (#1507) 2020-01-27 20:07:39 +08:00
1e8148c051 Add resource exists error on spec validate (#1506)
Co-authored-by: Anubhav <50611570+anubhav6663@users.noreply.github.com>
2020-01-27 19:09:35 +08:00
Ta-Ching ChenandGitHub 520cc0e130 Add --dry option to view the generated spec without saving (#1504) 2020-01-24 20:43:42 +08:00
Ta-Ching ChenandGitHub 2338fbb06f Add sponsor logos (#1499) 2020-01-24 03:59:19 +08:00
Ta-Ching Chen 3687602508 Temporarily disable building JVM image during CI builds 2020-01-24 01:33:19 +08:00
Ta-Ching Chen 49ec161c5e Let unit tests run in different namespaces to avoid resource conflict 2020-01-24 01:33:12 +08:00
Ta-Ching ChenandGitHub 4923708836 Move to new CI cluster (#1500)
* Move to new CI cluster
* Regenerate test id before creating a new HTTP trigger
2020-01-23 13:35:26 +08:00
Ta-Ching ChenandGitHub 11f9ef1045 Follow kubernetes APIs directory structure (#1497) 2020-01-20 17:06:46 +08:00
Ta-Ching ChenandGitHub bb3e6d6907 Codebase cleanup & optimization (#1493)
Remove old v1 types that are no longer used and move fetcher structs to fetcher directory.
2020-01-16 16:47:32 +08:00
Ta-Ching ChenandGitHub 574fb55fcf Use code-generator to generate clientset/informer/lister (#1492)
To reduce maintenance effort and avoid writing duplicate informer code,
use code-generator to generate clientset/informer/lister code.
2020-01-16 15:18:38 +08:00
Ta-Ching ChenandGitHub b96ca0735d Add config for fetcher resource requests & limits (#1489)
This PR adds fetcher resource requests&limits chart setting 
and remove unreasonable limits value from the charts.
2020-01-15 11:21:48 +08:00
Ta-Ching ChenandGitHub c421e655c5 Update analytics URL (#1490) 2020-01-14 21:02:54 +08:00
Ta-Ching ChenandGitHub 66d4669f36 Push php-builder to dockerhub (#1477) 2019-12-30 19:27:59 +08:00
Ta-Ching ChenandGitHub 953f63c7bd Fix terminationGracePeriod is 0 due to wrong flag type (#1476) 2019-12-25 10:21:35 +08:00
Sahil LakhwaniandTa-Ching Chen fca1123ee5 Fix hello-spec-example (#1474) 2019-12-22 08:28:51 +08:00
AnubhavandTa-Ching Chen 5eaf11b8aa Add failed/success output to spec validate (#1471) 2019-12-20 12:00:47 +08:00
Ta-Ching ChenandGitHub 0274ceb312 Add message queue nats-streaming example (#1472) 2019-12-20 02:19:11 +08:00
dependabot[bot]andTa-Ching Chen 38f96c7e46 Bump rack from 2.0.6 to 2.0.8 in /environments/ruby (#1470)
Bumps [rack](https://github.com/rack/rack) from 2.0.6 to 2.0.8.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.6...2.0.8)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-20 00:45:46 +08:00
AnubhavandTa-Ching Chen 7b3cc8fdf0 Add spec list feature (#1468)
Adding fission spec list functionality. It lists Functions, Environment, Packages, HTTPTrigger, MessageQueueTriggers, Canary Config, TimeTrigger, KubeWatch created by an application specification.
2019-12-19 19:41:59 +08:00
Ta-Ching ChenandGitHub c184e7be65 Fix go-server failed to load plugin (#1469)
The 3rd party package version used by the go server 
may be different from the one in the user's source code 
and will cause plugin version mismatched. Hence, we 
should never import any external packages except the 
Fission or built-in packages.

This PR replaces all 3rd-party packages with built-in packages.
2019-12-19 02:54:31 +08:00
Ta-Ching ChenandGitHub bfbb80efcf Add controller API client interface (#1467)
This PR adds an interface for controller API client, it allows us to
implement mock API client for unit testing with ease and we are
able to generate spec file without accessing the real Fission server.
2019-12-16 23:14:14 +08:00
Sahil LakhwaniandTa-Ching Chen 01bdc5bf89 Remove FISSION_ROUTER for fn test (#1465) 2019-12-15 14:32:29 +08:00
Vivek SinghandTa-Ching Chen 711d7c2c41 Show the not present configmap/secret name while fn create in err message [CLI-UX] (#1462) 2019-12-10 22:58:52 +08:00
Ta-Ching Chen 2b4e53e926 CHANGELOG 1.7.1 2019-12-09 05:09:54 +00:00
Ta-Ching Chen 9401c1ee85 Fission 1.7.1 2019-12-09 11:55:01 +08:00
Ta-Ching ChenandGitHub 5c704f053b Fix name conflict when buildermanager merges podspc (#1460) 2019-12-07 16:53:47 +08:00
Ta-Ching ChenandGitHub eb1f971d52 Not to exclude hidden file when creating archive (#1458)
Some of configs are hidden files like .babelrc, we should not ignore them.
2019-12-05 01:54:05 +08:00
Ta-Ching Chen 83bc5508ee CHANGELOG 1.7.0 2019-12-02 14:08:00 +00:00
Ta-Ching Chen d6a8734aae Fission 1.7.0 2019-12-02 21:26:28 +08:00
Ta-Ching ChenandGitHub 3ee98cd13a Fix release script not uploads OpenShift deploy YAML file (#1456) 2019-12-02 21:12:15 +08:00
Ta-Ching ChenandGitHub 275da18cf6 Let executor type manages how to do cleanup for old kubeobjects (#1455)
Add CleanupOldExecutorObjects to executor type interface in order
to let an executor type manages how to clean up the resources it created.
2019-12-02 19:47:31 +08:00
Ta-Ching ChenandGitHub 3f3b11ffbf Prevent deployment from rolling update due to different instance-id (#1454)
The pod template is embedded inside the deployment. So if
the pod annotation contains instance-id, the deployment
will get updated and thus triggers a rolling update whenever
a new executor starts which is unwanted.

After this PR, poolmanager will patches instance-id when a
pod is chosen for a function.

For newdeploy, unlike poolmanager manages the lifecycle
of function pod directly, newdeploy is only responsible
to create the deployment so we append instance-id to top-
level controller (deployment) only.
2019-12-02 17:28:19 +08:00
Ta-Ching ChenandGitHub 7f8cb69326 Make AdoptExistingResources optional (#1453) 2019-12-02 07:34:07 +08:00
Ta-Ching ChenandGitHub 003c304105 Prevent newdeploy updates deployment if no resources changed (#1452)
We used to update timestamp in the deployment environment field 
in order to trigger a rolling update when the function referenced 
resources get updated. However, use timestamp means we are not 
able to avoid triggering a rolling update when executor tries to adopt 
orphaned deployment due to timestamp changed which is unwanted. 
In order to let executor adopt deployment without triggering a rolling 
update, we need an identical way to get a value that can reflect res-
ources changed without affecting by time.

To achieve this goal, the sum of the resource version of all referenced 
resources is a good fit for our scenario since the sum of the resource 
version is always the same as long as no resources changed.
2019-12-02 06:35:07 +08:00
Ta-Ching ChenandGitHub 763ab475f2 Fix CLI unable to get pod logs from controller (#1451) 2019-12-01 22:38:35 +08:00
Ta-Ching ChenandGitHub 4b3f48b537 Fix spec shows source archive is not used (#1448) 2019-12-01 16:51:13 +08:00
Ta-Ching ChenandGitHub 6301a78814 Ignore hidden file when creating archive file (#1450) 2019-12-01 09:58:16 +08:00
Ta-Ching ChenandGitHub 506b427124 Fix spec init overrides existing deploymentconfig (#1449) 2019-11-29 23:59:10 +08:00
Ta-Ching ChenandGitHub 19ae7d5ac6 Fix adopted deployment uses old fetcher image (#1447)
When a new executor starts up, it adopts the orphan kubernetes resources created
by the old executor instance. However, the adopted resource won't reflect the changes
come with the new executor, for example, the fetcher image inside won't be changed.

To solve this, executor updates the resource spec (HPA/Deployment/Service) with the
latest resources spec. By doing this, we can prevent the inconsistency between resources
created by different executor instance, also minimizes the impact on users.
2019-11-29 21:52:59 +08:00
Ta-Ching ChenandGitHub 47aaa85108 Improve executor bootstrap speed (#1446) 2019-11-29 14:18:23 +08:00
Ta-Ching Chen 3067ecdee3 CHANGELOG 1.7.0-rc.2 2019-11-27 17:10:57 +00:00
Ta-Ching Chen d9a0ee1e33 Fission 1.7.0-rc.2 2019-11-28 00:40:47 +08:00
Ta-Ching ChenandGitHub 5cfc8dee5e Push extra tag to fit go module semver tag format (#1444) 2019-11-28 00:40:20 +08:00
Ta-Ching ChenandGitHub 1ad7ac2dcf Adopt existing orphan kubernetes resources when executor starts up (#1443)
Previously, once the executor is deleted for reasons (like upgrade or cluster scale-in),
the new executor deletes all existing resources created by the old executor and creates
new one. This mechanism becomes a problem when there are requests connecting to the
existing pods. Also in the worst case, the cluster may not have enough resources to create
new pods and cause service downtime.

This PR let each executor type adopts existing resources before starting the executor
API services, and so the alive connections won't experience failure. However, the requests
send to the function that doesn't have alive function pods will still fail due to the
executor is in bootstrapping.
2019-11-27 23:08:45 +08:00
Ta-Ching ChenandGitHub 86446c8879 Revert "Try to fix flaky canary test (#1441)" (#1442)
This reverts commit df857e3194.
Looks like there are some problems when running the test against GKE, so revert it.
2019-11-27 16:19:33 +08:00
Ta-Ching ChenandGitHub df857e3194 Try to fix flaky canary test (#1441) 2019-11-27 02:57:22 +08:00
Ta-Ching ChenandGitHub ad7a3951c5 Fix router tries to update ingress when createIngress is false (#1440) 2019-11-27 00:28:48 +08:00
Ta-Ching ChenandGitHub 7e8e968013 Fix poolmanager sets 0 timeout for function specialization (#1439) 2019-11-26 19:22:49 +08:00
Ta-Ching ChenandGitHub e38baeec36 Add huge response body test (#1437) 2019-11-26 12:50:41 +08:00
Ta-Ching ChenandGitHub ca28f962d4 Return error when specialization failed (#1436) 2019-11-26 09:23:06 +08:00
Ta-Ching ChenandGitHub dfb2c073d2 Collect function metrics after finishing request (#1433) 2019-11-26 02:33:40 +08:00
Ta-Ching ChenandGitHub 51b264e8ca Fix poolmanager terminates running function pod periodically (#1435)
The pool manager keeps terminating function pod periodically even there are
traffic to the function. The root cause is that executor, poolmgr, newdeploy
manage their own functionServiceCache separately. And when router taps a
function, executor updates the access time of the function service entry in its
own cache without notifying executor types to do the update as well. Hence,
the access time of function service entry in poolmanager cache never gets updated.
Due to the access time never gets updated, the idle pod reaper in poolmanager
then thinks the function pod is in idle state and recycle it.

This PR removes the cache in executor itself, and when router tries to tap a function,
executor will call executor type to tap the function and update access time.
2019-11-26 01:16:30 +08:00
Ta-Ching ChenandGitHub 6d2fe08973 Allow to tap multiple function services at one time (#1434)
The router taps function service one by one which is inefficient and
increases the burden of executor. This PR aggregates all requests into
one to solve the problem mentioned above.
2019-11-25 18:44:48 +08:00
Ta-Ching ChenandGitHub ccc551112b Fix poolmanager crashes when failed to list environment (#1432) 2019-11-24 05:59:38 +08:00
Ta-Ching ChenandGitHub 1a5537f4ba Ability to pull builder image from private registry (#1431) 2019-11-24 05:17:56 +08:00
Ta-Ching ChenandGitHub 5c2f0c5f4a Add checksum and insecure flag for user to skip checksum generation (#1430) 2019-11-24 01:35:01 +08:00
Ta-Ching ChenandGitHub a66de4c601 Support to set imagePullSecret when creating environment (#1429) 2019-11-22 18:19:57 +08:00
Ta-Ching ChenandGitHub af73d0ce1a Fix no kubeobjs get created if fn created before env creation (#1428)
When a function is created before the creation of the environment it's used, the newdeploy will not be able to create kube objs. Hence no function service record is inserted into the cache.

When getFuncSvc is called, the newdeploy tries to find the record in service cache in order to create kube objs with the same name used in previous kubeobjs creation. However, due to no record in the cache, a NotFound error is returned directly and causes the problem. To solve this, we use fn meta UID to ensure we always get the same obj name instead of getting it from the cache.
2019-11-22 01:37:02 +08:00
Ta-Ching ChenandGitHub 04654ca465 Improve compatibility with Openshift (#1424) 2019-11-21 16:56:53 +08:00
Ta-Ching ChenandGitHub af10579be9 Fix verbosity flag not show in usage (#1425) 2019-11-21 12:36:50 +08:00
Ta-Ching ChenandGitHub 30d24a85b5 Fix truncated body returned from router (#1420)
If the context of request is closed before ReverseProxy finishing writing
a huge response body to the response writer, the client will only receive
a truncated response body.

To solve this, move the context cancel after ReverseProxy finished.
2019-11-21 01:04:35 +08:00
Ta-Ching Chen d8b386a812 Update CHANGELOG for 1.7.0-rc.1 2019-11-18 10:32:46 +00:00
Ta-Ching ChenandTa-Ching Chen 48e7a13c0f Fission 1.7.0-rc.1 2019-11-18 10:06:32 +00:00
Ta-Ching ChenandGitHub 70803e37fa Update release-builder go and helm version (#1418) 2019-11-18 18:06:11 +08:00
Ta-Ching ChenandGitHub 7a770b8627 Fix failed to find init_tools.sh (#1417) 2019-11-18 17:00:56 +08:00
Ta-Ching ChenandGitHub 8b0d99d65d Support semantic version tags (#1416) 2019-11-18 15:54:43 +08:00
Ta-Ching ChenandGitHub 3aca0edfcc Show warning when referencing nonexistent resources in spec (#1415) 2019-11-18 13:46:28 +08:00
Ta-Ching ChenandGitHub 81ece23bfe Add resource info to output message when saving spec file (#1414) 2019-11-18 12:35:14 +08:00
Ta-Ching ChenandGitHub 66b9dfa8e9 Add --spec to package command (#1411) 2019-11-18 11:15:48 +08:00
Ta-Ching ChenandGitHub f8e98f9f14 Always embed URL provided by user in the archive (#1413)
To keep archive creation implementation simple and prevent any
confusion, we decided to remove `--keepurl` flag and embed URL
directly without downloading the file from it . In this way, we can
ensure consistent behavior in either package creation or spec file
creation. Also, it increases the portability of spec file.
2019-11-18 10:05:49 +08:00
Ta-Ching ChenandGitHub b97a3c4b0a Fix wrong command and flag usage description (#1412) 2019-11-17 02:39:31 +08:00
Ta-Ching ChenandGitHub b5c8ea0e13 Update prometheus chart version from 7.1.0 to 9.3.0 (#1389) 2019-11-13 16:29:17 +08:00
Ta-Ching ChenandGitHub cf2d35291e Drop unreleased features (record & replay) (#1406)
1. The records are stored in redis which is not migratable to another cluster for the testing purposes.
2. Some of the requests fields are not recorded.
3. People should consider using https://github.com/buger/goreplay which is an existing mature and well-tested solution for testing purposes.
2019-11-13 15:10:32 +08:00
Ta-Ching ChenandGitHub 1cda7e051b Build error formatting on fission spec apply --wait (#1403)
The character `\n` in buildlog stores in package status
are escaped and so when we have to replace them with
actual line breaker.
2019-11-12 21:00:55 +08:00
Ta-Ching ChenandGitHub a645a1e197 Refactor controller client package (#1402)
The function implementations of controller client package are
inconsistent. This PR lets functions reuse the functions
that already implemented and able to set additional headers to
request.
2019-11-12 18:27:52 +08:00
Ta-Ching ChenandGitHub d0276f1d52 Fix fn test failed to query logs from log database (#1401)
When `fn test` failed to retrieve logs from the function
pod, it turns to query logs from the log database. However,
the logdb type flag is not set to `fn test`, hence the logdb
type is empty (even without default value) and cause `fn logs`
returns an error due to unable to find the corresponding log
database type.

This PR adds logdb type flag to `fn test` to resolve the problem.
2019-11-12 03:05:22 +08:00
Ta-Ching ChenandGitHub 4474f5f813 Skip trace for router healthz endpoint (#1400)
Jaeger preserves the trace data of router healthz endpoints
which is not so helpful for monitoring function metrics and
consumes storage to store such trace data.

This PR uses `GetStartOptions` to examine the request's path and
check if it's a request to healthz endpoint. If yes, skip and not
to trace it.
2019-11-12 00:13:17 +08:00
Ta-Ching ChenandGitHub 19e693bf52 Set jaeger collector endpoint as an environment variable (#1399)
To follow 12-factor app rules, make jaeger collector endpoint
as an environment variable instead of CLI args. It's easier to
replace the value in different deployments. Also, we can utilize
valueFrom to get value from the configmap.
2019-11-11 22:41:40 +08:00
Ta-Ching ChenandGitHub 825939c820 Replace deprecated serviceAccount with serviceAccountName (#1398) 2019-11-11 15:55:28 +08:00
Ta-Ching ChenandGitHub 5a9138711b Fix helm pre-upgrade check failure problem (#1397)
The helm pre-upgrade check failed due to the program tries to
check whether a multierr is a nil pointer instead of errors it contains.

This PR changes the way the program checks multierr in order not to block the upgrade.
2019-11-11 02:42:08 +08:00
Ta-Ching ChenandGitHub 7640f1199d Prettify console output message (#1396) 2019-11-10 16:42:34 +08:00
Ta-Ching ChenandGitHub 7b6e4318d4 Reorder command flag and add missing flags (#1394) 2019-11-10 14:58:29 +08:00
MengZeLeeandTa-Ching Chen fcd1bc0356 fix typo (#1395) 2019-11-10 14:17:56 +08:00
Ta-Ching ChenandGitHub d443eb1c96 Fix CLI exits with status 0 when error occurs (#1393) 2019-11-10 02:43:22 +08:00
Ta-Ching ChenandGitHub c7d0c09f01 Poolmanager wait for function specialization timeout when specializing a pod (#1392) 2019-11-10 00:01:19 +08:00
Ta-Ching ChenandGitHub d3d8ff6c1b Replace flag text with const (#1391) 2019-11-09 22:13:35 +08:00
Ta-Ching ChenandGitHub 6f5f6900b6 Fix githook not aborting push if error occurrs (#1386) 2019-11-08 23:47:40 +08:00
Ta-Ching ChenandGitHub 19753e07e0 Fix helm shows "Not a table" issue when install Fission (#1387)
Helm treats the single line "extraCoreComponentPodConfig" in
values.yaml as a key value pair config.

```
extraCoreComponentPodConfig:
```

And when a user tries to install helm with providing config
like following, it failed.

```
extraCoreComponentPodConfig:
  nodeSelector:
    serverless: fission
```

The root cause is that helm treats config in default values.yaml
and providing config as two different types of config, which is
key-value vs. value table. And so it's unable for helm to merge these
two configs even with the same key name.

This PR comments out the single line config in default values.yaml
to prevent the issue.
2019-11-08 23:15:15 +08:00
Ta-Ching ChenandGitHub 1888cd2ac7 Migrate from urfave/cli to cobra (#1385) 2019-11-08 21:22:00 +08:00
Ta-Ching ChenandGitHub 4b456db517 Update Makefile and add git pre-push hook (#1382) 2019-11-06 13:13:48 +08:00
Ta-Ching ChenandGitHub 9272f0cb2c Update maintainer info (#1383) 2019-11-06 13:01:05 +08:00
Ta-Ching ChenandGitHub b9a5588ca9 Update staticcheck version and fix all warnings (#1381) 2019-11-05 18:09:12 +08:00
Ta-Ching ChenandGitHub 93d4b88d84 Make CLI functions return error instead of fatal out (#1379)
Before this PR, CLI functions fatal out when encountering error
instead of returning it. Such behavior makes it hard to reuse 
the functions nor writing unit tests. This PR aims to make functions 
return errors instead of error out.
2019-11-05 16:50:13 +08:00
Ta-Ching ChenandGitHub b0d27ee5d2 Refactor record command (#1378) 2019-11-05 10:30:16 +08:00
Ta-Ching ChenandGitHub c33f1e112e Fix reverse proxy shows 404 not found when Istio enabled (#1377)
Istio sidecar proxy blocks all requests sent through the reverse proxy
to the target service if the request.Host is not properly set to the
internal target service host. This PR sets the target service hosts
before establishing the proxy for the client in order to pass the
Istio sidecar proxy check.
2019-11-04 21:59:40 +08:00
Ta-Ching ChenandGitHub f288f0f258 Refactor time trigger command (#1376) 2019-11-04 18:26:21 +08:00
Vivek SinghandTa-Ching Chen e4f44ffa63 Add example for builder podspec (#1374) 2019-11-04 16:02:30 +08:00
Ta-Ching ChenandGitHub d1ed089c3e Refactor mqtrigger command (#1375) 2019-11-04 07:40:18 +08:00
Vivek SinghandTa-Ching Chen e1a64dd0c1 PodSpec support in environment builder (#1369) 2019-11-03 23:05:02 +08:00
Ta-Ching ChenandGitHub 3b6749dce9 Refactor function command (#1372) 2019-11-03 13:31:47 +08:00
Ta-Ching ChenandGitHub 8f6887280c Allow to set API type for tensorflow serving environment (#1371)
Tensorflow Serving supports three kinds of API: predict, classify, regress. In order to fully support possible API types, this PR adds code to split the entry point with separator ":" to get model name and the API type separately. And append the API type to proxy URL when receiving the requests.

$ fission fn create --name t1 --pkg <pkg name> \
    --env tensorflow --entrypoint "half_plus_two:regress"
2019-11-02 23:51:31 +08:00
Ta-Ching ChenandGitHub ef0a2fa340 Refactor canary config command (#1370) 2019-11-01 15:36:40 +08:00
Ta-Ching ChenandGitHub 2b616ec4e2 Fix utility function uses the wrong flag text to get value (#1368)
The utility function GetMetadata uses wrong flag text to get the resource namespace and could cause the wrong results returned from the API server. This PR changes the function signature that allows users to pass in the flag text in order to get the correct value.
2019-11-01 00:59:50 +08:00
Ta-Ching ChenandGitHub fe02bb1678 Refactor HTTP trigger command (#1367) 2019-10-31 23:40:37 +08:00
Ta-Ching ChenandGitHub fc1aab2472 Update READEME link and add back the basic usage (#1366) 2019-10-31 11:14:04 +08:00
Ta-Ching ChenandGitHub e22cdee5f5 Refactor kubewatch command (#1365) 2019-10-31 10:48:27 +08:00
Vivek SinghandTa-Ching Chen 698d591788 Provide secrets and configmaps while updating the functions (#1358) 2019-10-31 00:19:06 +08:00
Ta-Ching ChenandGitHub 3b11ca87f1 Fix accidentally removed timestamp when listing package (#1364) 2019-10-30 23:47:00 +08:00
Chris CamelandTa-Ching Chen bbaf1b0c2d Replace AlwaysSample with ProbabilitySampler in router (#1348) 2019-10-30 20:05:55 +08:00
Ta-Ching ChenandGitHub a151f89eec Move route creation to independent function (#1362) 2019-10-30 05:47:51 +08:00
Ta-Ching ChenandGitHub d20dc9aa64 Allow using URL as archive source when creating functions (#1360)
In the case of large files, it takes a long time for the user to download
the source from the URL and upload it to StorgeSvc through CLI.

This PR allows a user to use URL as the function source when creating a function
and provides a new flag "--keeparchiveurl" to let the user to decided
whether the CLI should download the file first or store the file URL in the
archive directly. If "--keeparchiveurl" is true, then no checksum will be
generated, it's the user's responsibility to ensure the file won't be changed.
2019-10-28 22:37:13 +08:00
Ta-Ching ChenandGitHub 52b5cb0902 Remove UID from CLI output (#1361) 2019-10-28 19:34:02 +08:00
Ta-Ching ChenandGitHub bc5c181fc2 Update fission architecture doc (#1356) 2019-10-22 19:46:57 +08:00
Ta-Ching ChenandGitHub fed30e1b24 Refactor plugin & version subcommands (#1359) 2019-10-22 17:57:56 +08:00
Vivek SinghandTa-Ching Chen 22de11190c Calling the function that handles kafka messages, asynchronously (#1355) 2019-10-19 14:41:46 +08:00
Ta-Ching ChenandGitHub e42f81a7a1 Refactor package CLI command (#1345) 2019-10-13 01:30:20 +08:00
Ta-Ching ChenandGitHub f30e7df43d Fix release script wrongly tags image name & sed problem on Linux (#1353) 2019-10-12 21:38:13 +08:00
Ta-Ching ChenandGitHub c930c69629 Update CHANGELOG for 1.6.0 (#1352) 2019-10-11 04:07:38 +08:00
Ta-Ching Chen 08b6d43ac1 Fission 1.6.0 2019-10-11 01:11:58 +08:00
Ta-Ching ChenandGitHub 53b075a315 Move statefulset to apps/v1 (#1350) 2019-10-10 23:42:40 +08:00
Ta-Ching ChenandGitHub b8311d43ce Fix newdeploy failed to find serviceEntry in cache (#1349)
When a function with executor type newdeploy got created, Newdeploy
is expected to create deployment/HPA/service for it and insert serviceEntry
to the cache for later use. Once clients call the function, newdeploy returns
the serviceEntry to the router.

However, the log shows that the newdeploy was unable to find the entry and
prints "Resource not found - key 'xxx' not found". The root cause is that the
informer controller instead of processing items in parallel, it dispatches XXFunc
to process items one by one. So if there is any problem during the creation of the
kubernetes resource, it takes a longer time to process the next item and hence
the serviceEntry was not inserted before clients call the function.

This PR lets the newdeploy to process items in extra goroutines instead of blocking
the process loop. It's a workaround to solve the problem above, we should consider
using workqueue to solve it in the future.
2019-10-10 23:32:36 +08:00
Ta-Ching ChenandGitHub 1075c5da13 Support encoded path in router (#1347)
Encoded path means the URL path contains encoded string like "/foo%2Fbar".
Gorilla/Mux by default doesn't enable encoded path support, you need to enable
it when initializing the router.

This PR adds a new environment variable USE_ENCODED_PATH to the router
deployment to enable encoded path support.
2019-10-10 02:23:41 +08:00
Ta-Ching ChenandGitHub 59c8569190 Support custom private go vendor (#1346) 2019-10-10 01:44:44 +08:00
Suraj BanakarandTa-Ching Chen 395a8adf37 Implement TLS authentication for kafka mqt (#1300)
* use secrets to store keys and certificates
2019-10-10 00:18:57 +08:00
Ta-Ching ChenandGitHub d358a29b17 Fix the namespace mismatch problem when deploying with a single YAML file (#1344)
If a user deploys fission in the namespace which is different from the one in the single YAML file generated by helm, fission components won't be able to talk to each other due to the wrong namespace appends after the service address.

This PR adds --namespace when generating the YAML file to prevent the mismatch problem.
2019-10-09 01:14:56 +08:00
Ta-Ching ChenandGitHub e253d2a376 Move charts executor service to the right place (#1343) 2019-10-07 18:44:58 +08:00
Ta-Ching ChenandGitHub bfd005a295 Allow to deploy router as DaemonSet (#1342)
ReplicaSet generated by Deployment distributes pods to nodes based
on nodes resource usage, which means in some cases the newly created
pods may be assigned to only a few nodes. The requests will go to the
same node if there multiple pods on it and may increase the node
resource usage and overall request latency.

To solve the problem mentioned above, this PR allows users to deploy
the router as DaemonSet so that we can distribute requests across all
nodes for better workload distribution and lower latency.
2019-10-07 18:09:36 +08:00
MengZeLeeandTa-Ching Chen c1a3bdd895 Add package filter feature (#1341) 2019-10-05 01:47:17 +08:00
Ta-Ching ChenandGitHub b18462b10b Fix executor doesn't apply user-configured container spec correctly (#1339)
The merge function executor used wasn't merge container correctly, and it
didn't merge all fields in spec except volumeMount & Env which confused people.

To apply the user-configured container correctly, this PR changes the way of merge
and follows rules:

1. Slices are merged and return an error if the elements in the slice have name conflicts.
2. Maps are merged, the value of map of dst container are overridden if the key is the same.
3. The rest of the fields of dst container are overridden directly.
2019-10-04 05:16:04 +08:00
Ta-Ching ChenandGitHub 30dba5dae9 Bump jvm builder JDK version (#1340) 2019-10-03 14:24:22 +08:00
Prabhu JayakumarandTa-Ching Chen f12880fb5c Allow to add annotations to router service in helm chart (#1338) 2019-10-02 14:48:36 +08:00
Ta-Ching ChenandGitHub c61442ee76 Remove too verbose and unhelpful debug log (#1336) 2019-10-02 01:35:23 +08:00
Vivek SinghandTa-Ching Chen 96ae708163 package will now be listed, sorted by lastupdatedtime (#1334) 2019-10-01 15:30:51 +08:00
Suraj BanakarandTa-Ching Chen b47b3ecb70 Fix kafka producer and consumer logs show empty objects (#1281) 2019-09-29 23:47:05 +08:00
Ta-Ching ChenandGitHub 7cdc146515 Move Deployment API group from extensions/v1beta1 to apps/v1 (#1331)
In 1.9, kubernetes prompted Deployment to apps/v1 and finally deprecated
extensions/v1beta1 support in 1.16. Users will see the following error message
in log when fission components try to submit Deployment to the k8s API server
and specify extensions/v1beta1 as API group.

error: unable to recognize "deployment": no matches for kind "Deployment" in version "extensions/v1beta1"

This PR updates call to k8s API server and apiKind in chart files to avoid fission failure in 1.16.
2019-09-29 22:16:33 +08:00
Ta-Ching ChenandGitHub e734fa3554 Fix router health route not found if no HTTP triggers created (#1333)
Router readiness probe failed due to kubelet cannot find router healthz endpoint.
This is caused that the healthz endpoint is added only when there is any update request
send to the updateRouterRequestChannel, and makes router failed.

This PR sends an update request right before the router is started to avoid the problem.
2019-09-28 17:43:04 +08:00
Ta-Ching ChenandGitHub 71b587b58e Use ErrorHandler to handle proxy error (#1310)
The router prints error no matter what error type it is.
It's useful for troubleshooting, however, it also prints
the context canceled error, which means that users abort
request before reply and its really normal nowadays. Also,
the router returns 502 if error is not nil and may confused
client if it's a timeout error.

To solve these problems, this PR adds an error handler to
reverse proxy to examine the return error and change the
status code when needed.
2019-09-28 14:22:20 +08:00
Ta-Ching ChenandGitHub 81ae6f38fc Fix spec doesn't update status of failed package when applying spec files (#1332)
Previously, the spec doesn't update the package status if nothing
in the spec file changed. Due to this, the failed package will
always stay in the failed state.

This PR adds a check to see whether a package is in the failed state.
If yes, then changes the state to pending for builder manager to rebuild it.
2019-09-28 04:35:57 +08:00
Ta-Ching ChenandGitHub 7fbb4098a4 Fix empty host value when list http triggers (#1328) 2019-09-28 00:28:14 +08:00
Ta-Ching ChenandGitHub f8af8b91f5 List/Delete HTTP triggers by function (#1327)
Previously, a user has to delete HTTP triggers point to
the same function one by one. This PR adds new flag --function
to list & delete commands. So that user can delete or list all
triggers with the same function. However, this feature is not
working for triggers with canary deployment setup.
2019-09-27 17:21:11 +08:00
Ta-Ching ChenandGitHub b5341edec0 Add Ingress TLS support (#1326)
This PR aims to add the Ingress TLS support by specifying the
TLS secret when creating/updating the HTTP trigger.

Command example:

fission route create --name foo \
    --url /foo/{bar} --function foofn --createingress \
    --ingressannotation "nginx.ingress.kubernetes.io/ssl-redirect=false" \
    --ingressannotation "nginx.ingress.kubernetes.io/use-regex=true" \
    --ingressrule "*=/foo/*"
    --ingresstls "foobartls"
2019-09-27 00:49:23 +08:00
Ta-Ching ChenandGitHub 49d60b19f3 Add Ingress host, path and annotations support (#1325)
For each ingress controller, the format of ingress host,
path and annotations are different. To support different
kinds of controller, this PR adds new ingress config field
to http trigger spec. A user can set annotations, host and
path based on the type of underlying ingress controller
with CLI.

Command example:

fission route create --name foo \
    --url /foo/{bar} --function foofn --createingress \
    --ingressannotation "nginx.ingress.kubernetes.io/ssl-redirect=false" \
    --ingressannotation "nginx.ingress.kubernetes.io/use-regex=true" \
    --ingressrule "*=/foo/*"
2019-09-26 16:54:16 +08:00
Ta-Ching ChenandGitHub 82a7acf408 Set maxSurge to 20% for safe rolling upgrade (#1321) 2019-09-23 16:11:56 +08:00
Ta-Ching ChenandGitHub 7bd57c208a Disable revision history for newdeploy (#1319) 2019-09-23 14:25:49 +08:00
Ta-Ching ChenandGitHub 27ec605955 Pre-built docker go module dependency cache image (#1318) 2019-09-18 05:07:53 +08:00
Ta-Ching ChenandGitHub c94e02b302 Fix newdeploy doesn't handle error properly (#1316) 2019-09-16 15:43:36 +08:00
Ta-Ching ChenandGitHub 5d2d65f05c Fix failed to update specialization timeout (#1315) 2019-09-16 13:21:25 +08:00
Ta-Ching ChenandGitHub 6d3d277cb9 Fix potential nil pointer problem when using multierror pkg (#1311) 2019-09-16 11:03:23 +08:00
Ta-Ching ChenandGitHub 4d654c6fe7 Add codecov config file (#1314) 2019-09-16 09:20:49 +08:00
Ta-Ching ChenandGitHub ecb97db913 Integrate with Codecov (#1308) 2019-09-11 14:52:45 +08:00
Ta-Ching ChenandGitHub 082c244b0b Fix executor unable to list secrets/configmaps (#1307) 2019-09-11 10:47:20 +08:00
parauliyaandTa-Ching Chen 678a2c7ad8 Configurable function level timeout (#1284) 2019-09-10 23:28:08 +08:00
Ta-Ching ChenandGitHub 78026ac573 Add specialization timeout default value to CLI (#1305) 2019-09-10 17:24:35 +08:00
Ta-Ching ChenandGitHub 4cfd459317 Update CHANGELOG for 1.5.0 (#1304) 2019-09-09 17:06:44 +08:00
Ta-Ching ChenandGitHub e481c234ee Fission 1.5.0 (#1303) 2019-09-09 15:38:27 +08:00
Ta-Ching ChenandGitHub 0d872020e3 Refactor support dump CLI (#1301) 2019-09-04 14:42:47 +08:00
moluzhangandTa-Ching Chen 62016b2f83 Support reverse query function for query log (#1298) 2019-09-02 18:02:07 +08:00
Ta-Ching ChenandGitHub 58811ab522 Fix unit tests failure (#1297) 2019-08-30 23:39:45 +08:00
David SheldonandTa-Ching Chen 19c60d1592 Fix environment version validation (#1253) 2019-08-30 19:02:18 +08:00
Vivek SinghandTa-Ching Chen cd36047660 Support for providing multiple CMs and secrets in fn create/update (#1282) 2019-08-30 17:13:24 +08:00
Ta-Ching ChenandGitHub ef8289ff73 Support nodejs function with 0 argument (#1295) 2019-08-30 15:31:04 +08:00
Emil NikolovandTa-Ching Chen ff47a8c1ed Fix wrong go environment error log for specializeHandlerV2 (#1294) 2019-08-30 13:37:32 +08:00
Ta-Ching ChenandGitHub 86b506c9b6 Add troubleshooting guide link (#1292) 2019-08-28 14:41:13 +08:00
Ta-Ching ChenandGitHub e762471d78 Bump Go version to 1.12 (#1290) 2019-08-28 13:47:40 +08:00
dependabot[bot]andTa-Ching Chen 1040a0d7e9 Bump nokogiri from 1.10.1 to 1.10.4 in /examples/ruby/parse (#1291)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.1 to 1.10.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.1...v1.10.4)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-28 12:23:37 +08:00
Ta-Ching ChenandGitHub c49377569e Refactor environment CLI command (#1265) 2019-08-27 15:43:59 +08:00
Ta-Ching ChenandGitHub 560aa34ce2 Fix typo extraCoreComponmentPodConfig -> extraCoreComponentPodConfig (#1287) 2019-08-27 14:12:51 +08:00
Ta-Ching ChenandGitHub ee18a88664 Update go dependencies (#1240)
NOTES for update k8s dependencies

In go.mod

require (
    k8s.io/api kubernetes-x.x.x
    k8s.io/apiextensions-apiserver kubernetes-x.x.x
    k8s.io/apimachinery kubernetes-x.x.x
    // check here https://github.com/kubernetes/client-go#compatibility-matrix
    k8s.io/client-go v12.0.0+incompatible
)
2019-08-23 16:17:12 +08:00
VishalandTa-Ching Chen 31b8c1ee3b Added community meetings and some other changes (#1273) 2019-08-23 13:20:09 +08:00
Ta-Ching ChenandGitHub 97b9350651 Improve CI integration test script (#1285) 2019-08-22 16:01:53 +08:00
Ta-Ching ChenandGitHub b9997b2ece Add swagger (OpenAPI 2.0) support (#1245)
* Add swagger (OpenAPI 2.0) support
* Gererate swagger_doc before building bundle image
2019-08-21 15:49:41 +08:00
Suraj BanakarandTa-Ching Chen 9c63975497 Fix typo "consumer" => "producer" (#1278) 2019-08-20 19:45:56 +08:00
Ta-Ching ChenandGitHub 8cafe1ebf3 Set full URL path to request header (#1266) 2019-08-20 16:44:21 +08:00
Ta-Ching ChenandGitHub 4dccfcc156 Fix go 1.9.2 & 1.11.4 shows "go mod not found" (#1276) 2019-08-20 10:12:48 +08:00
Suraj BanakarandTa-Ching Chen 7af711a48b Fix typo "specialing" -> "specializing" (#1275) 2019-08-19 16:19:28 +08:00
Suraj BanakarandTa-Ching Chen 80910562b3 Make NewDeployment specialization timeout configurable (#1260)
* Add specializationtimeout flag to function create/update
* Set specialization timeout of 120 seconds if not present
* Add default newdeploy timeout for rest of the test cases
* Comment out specialization timeout in validations for compatibility
* Add warning if specializationtimeout is lower than default value
2019-08-16 23:15:17 +08:00
cocoifly10andTa-Ching Chen 88b5343775 Fix Kafka message queue trigger panic problem caused by err.Error() (#1271)
fix bug: panic: runtime error: invalid memory address or nil pointer dereference
2019-08-14 17:07:29 +08:00
Ta-Ching ChenandGitHub a6e75b4da6 Use fuzzy version for openJDK dependency (#1269) 2019-08-13 16:17:10 +08:00
parauliyaandTa-Ching Chen 8fb0e9e10c Allow empty repository tag in chart values.yaml (#1259)
This fix allows the empty repository tag in values.yaml file. The changes are done in the templates of deployment and fluentbit where repository tag will be added in the docker image name only when specified with some value in case of empty repository tag image name contain the name of image and tag only.
2019-08-13 14:22:23 +08:00
msshroffandTa-Ching Chen 747d774a3c Make imagePullPolicy of logger pod configurable (#1263)
Added correct imagePullPolicy in fluentbit.yaml (logger)
2019-08-09 15:48:31 +08:00
Ta-Ching ChenandGitHub 7bbcaf2174 Allow to set deployment config uid during initialization (#1249) 2019-08-01 22:53:04 +08:00
Ta-Ching ChenandVishal ac21c037d6 Fix release script tagging wrong image name (#1257) 2019-07-30 14:51:25 +05:30
Ta-Ching ChenandGitHub 3b47daa8fc Update tensorflow serving image name in env README (#1256) 2019-07-30 14:30:16 +08:00
VishalandGitHub dff08a0a8e V1.4.1 (#1255)
Release 1.4.1
2019-07-29 16:14:49 +05:30
Ta-Ching ChenandGitHub 74ad096158 Fix wrongly replace spec api version (#1254) 2019-07-29 13:49:05 +08:00
David SheldonandTa-Ching Chen be84f9ec93 Revert change of product name in README (#1250) 2019-07-26 19:37:55 +08:00
VishalandTa-Ching Chen 6e440f11cd Analytics env fix in chart (#1247) 2019-07-25 19:25:34 +08:00
Ta-Ching ChenandGitHub 655a76447e Fix CI unable to start test due to the same travis build ID (#1246) 2019-07-25 15:54:12 +08:00
VishalandGitHub dc0fc839ed V1.4.0 (#1244)
For release 1.4.0
2019-07-25 11:39:33 +05:30
Ta-Ching ChenandGitHub efe1209550 Update flask version to resolve CVE alert (#1243) 2019-07-23 11:08:23 +08:00
VishalandTa-Ching Chen 93c5b53b77 Function Update if config/secret changes (#1224)
* Config and secret change to invoke function update
* Added recycle function for pool manager as well - where it recycles the specialized pods
* Switched to rolling update of pods and env variable based change instead of deleting pods in new deploy executor
2019-07-23 09:27:43 +08:00
Ta-Ching ChenandGitHub 1beaa9ec13 Change log-level for better performance and less annoying logs (#1231)
This PR removes not so useful logs and changes most of Info level
log to Debug/Error level in hot path while preserving some of them
that is helpful for troubleshooting.
2019-07-19 12:38:36 +08:00
Ta-Ching ChenandGitHub 6e00733f68 Fix roundtripper doesn't increase request timeout setting after each retry (#1216) 2019-07-19 00:46:57 +08:00
David SheldonandTa-Ching Chen 3bffd27c74 Fix typo where "spec" is spelt "sepc" in some dump directories. (#1239) 2019-07-16 09:47:07 +08:00
Ta-Ching ChenandGitHub 971a314d63 Fix fetcher client doesn't handle error properly (#1238) 2019-07-15 21:01:32 +08:00
Ta-Ching ChenandGitHub 40e1689e49 Fix build failed due to script unable to find configmap (#1237) 2019-07-15 17:54:37 +08:00
Ta-Ching ChenandGitHub fe8fa94c77 Enable concurrent CI builds (#1236)
Currently, only one CI build can be started at the same time due to we only have only one testing cluster. This PR aims to enable multiple concurrent builds can be triggered to reduce the waiting time for CI builds. The major changes listed below:

1. Each build generate unique images for testing and debugging
2. Check whether the testing cluster is being used by another build.
3. Cache docker image & go mod after build finished
4. Improve dockerfiles for reusing docker build cache
2019-07-15 16:33:26 +08:00
Ta-Ching ChenandGitHub a9dd4bf81a Fix fetcher of newdeploy pod error out when starting up (#1210)
* Connect to k8s API server to ensure network connectivity
* Fix readiness probe path
2019-07-14 21:09:35 +08:00
Ta-Ching ChenandGitHub 56beac6508 Make router keep-alive setting configurable (#1225) 2019-07-12 12:12:04 +08:00
Ta-Ching ChenandGitHub b0b29da388 Replace localhost with 127.0.0.1 to prevent DNS resolving problem (#1227) 2019-07-12 09:16:10 +08:00
Ta-Ching ChenandGitHub c1cb9603a5 Fix release script wrongly tags builder as env image (#1226) 2019-07-10 16:03:14 +08:00
Ta-Ching ChenandGitHub 58722f849a Enable go module support for go environment (#1152) 2019-07-10 14:00:29 +08:00
Ta-Ching ChenandGitHub 9e7dd5aa27 Fix nil pointer when CLI unable to get server version (#1223) 2019-07-07 09:55:00 +08:00
Ta-Ching ChenandGitHub 9d13081803 Allow to set log level through environment variable (#1217) 2019-07-07 04:39:42 +08:00
Ta-Ching ChenandGitHub 78a774cfd9 Reuse go docker build cache (#1218) 2019-07-06 09:30:27 +08:00
Ta-Ching ChenandGitHub 9f51f9064d Fix poolmanager specializes a function pod repeatedly if istio is enabled (#1208) 2019-07-03 11:26:35 +08:00
Ta-Ching ChenandGitHub b229d6e1b0 Add experimental environment: tensorflow-serving (#1212) 2019-07-02 15:43:55 +08:00
Ta-Ching ChenandGitHub 2ba66afb9f Fix Istio-proxy cannot collect HTTP-level information (#1209) 2019-07-02 00:08:29 +08:00
VishalandTa-Ching Chen 36e544b537 Configmaps/secrets in function exist check (#1214) 2019-07-01 18:09:07 +08:00
cocoifly10andTa-Ching Chen 5ec841cf2e Modify code to make log collection comprehensive (#1206) 2019-06-24 16:33:42 +08:00
Ta-Ching ChenandGitHub 981bb21756 Reuse maven build cache in JVM environment build process (#1207) 2019-06-20 17:03:17 +08:00
Ta-Ching ChenandGitHub a297a67385 Fix executor panic problem when specialization timeout (#1211) 2019-06-20 13:56:02 +08:00
moluzhangandTa-Ching Chen 5445b75af9 [bugfix] Fix CLI drops controller URL path when querying logs (#1201) 2019-06-17 18:31:02 +09:00
Ta-Ching ChenandGitHub e189ac4fc2 Fallback to get user home directory from env (#1203) 2019-06-05 12:56:30 +08:00
Ta-Ching Chen 4bc5d49792 Add ruby/dotnet20 environment builder to release script 2019-06-03 20:57:55 +08:00
Ta-Ching Chen 3860039f9a Update v1.3.0 changelog 2019-06-03 20:15:49 +08:00
Ta-Ching Chen cb8605cf60 Fission 1.3.0 2019-06-03 18:26:34 +08:00
790 changed files with 61593 additions and 37828 deletions
+15
View File
@@ -0,0 +1,15 @@
ignore:
- "charts"
- "demos"
- "Documentation"
- "examples"
- "test"
- "tools"
- "pkg/apis/genclient"
coverage:
status:
project:
default:
threshold: 2
# Disable patch coverage check since we focus on project coverage.
patch: off
+10
View File
@@ -0,0 +1,10 @@
---
name: Blog
about: Suggest a blog
title: ''
labels: ''
assignees: ''
---
+2
View File
@@ -8,7 +8,9 @@ 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**
+10
View File
@@ -0,0 +1,10 @@
---
name: Documentation
about: Suggest changes/addition to documentation
title: ''
labels: ''
assignees: ''
---
**Describe something that is unclear or not documented and needs a documentation update
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+98
View File
@@ -0,0 +1,98 @@
name: Fission CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
# Job to run change detection
integration-test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2.3.4
- name: Checkout sources
uses: actions/checkout@v2.3.4
with:
repository: fission/examples
path: examples
- name: setup go
uses: actions/setup-go@v2.1.3
with:
go-version: "1.15.12"
- name: Helm installation
uses: Azure/setup-helm@v1
with:
version: v3.3.4
- name: Kind Clutser
uses: engineerd/setup-kind@v0.5.0
with:
config: kind.yaml
- name: Configuring and testing the Installation
run: |
kubectl cluster-info --context kind-kind
kind get kubeconfig --internal >$HOME/.kube/config
kubectl get nodes
sudo apt-get install -y apache2-utils
- name: Static code analysis
run: |
./hack/verify-gofmt.sh
./hack/verify-govet.sh
helm lint charts/fission-all/ charts/fission-core/
- name: Run unit tests
run: ./hack/runtests.sh
- name: Helm update
run: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
skaffold version
- name: Build and Install Fission
run: |
kubectl create ns fission
kubectl create -k crds/v1
skaffold run -p kind-ci
- name: Build and Install Fission CLI
run: |
go build -o fission cmd/fission-cli/main.go
sudo mv fission /usr/local/bin
fission version
- name: Port-forward fission components
run: |
kubectl port-forward svc/router 8888:80 -nfission &
kubectl port-forward svc/controller 8889:80 -nfission &
kubectl port-forward svc/nats-streaming 8890:4222 -nfission &
- name: Integration tests
run: ./test/kind_CI.sh
- name: Collect Fission Dump
if: ${{ failure() }}
run: |
fission support dump
- name: Archive fission dump
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: fission-support-dump
path: fission-dump/*.zip
retention-days: 5
+53
View File
@@ -0,0 +1,53 @@
name: Upgrade functionality test
on: [workflow_dispatch]
jobs:
upgrade-functionality-test:
runs-on: ubuntu-latest
steps:
- name: Checkout action sources
uses: actions/checkout@v2.3.4
- name: Setup go
uses: actions/setup-go@v2.1.3
with:
go-version: '1.15.12'
- name: Setup Helm
uses: Azure/setup-helm@v1
with:
version: v3.3.4
- name: Setup Kind Clutser
uses: engineerd/setup-kind@v0.5.0
with:
config: kind.yaml
- name: Setup kubectl & fetch node information
run: |
kubectl cluster-info --context kind-kind
kind get kubeconfig --internal >$HOME/.kube/config
kubectl get nodes
- name: Dump system info
run: |
source ./test/upgrade_test/fission_objects.sh dump_system_info
- name: Install and configure previous stable fission
run: |
source ./test/upgrade_test/fission_objects.sh install_stable_release \
&& create_fission_objects \
&& test_fission_objects
- name: Upgrade fission to latest
run: |
source ./test/upgrade_test/fission_objects.sh build_docker_images \
&& kind_image_load \
&& install_current_release \
&& install_fission_cli
- name: Test previously created fission objects with new release
run: |
source ./test/upgrade_test/fission_objects.sh test_fission_objects
+3
View File
@@ -5,6 +5,7 @@ cmd/fission-cli/fission-cli
cmd/fetcher/fetcher
cmd/builder/builder
cmd/preupgradechecks/pre-upgrade-checks
cmd/reporter/reporter
# Logs
test/logs/
@@ -32,3 +33,5 @@ environments/dotnet20/Builder/.vs/
environments/dotnet20/.vs/
environments/dotnet20/obj/
environments/dotnet20/bin/
build/
-55
View File
@@ -1,55 +0,0 @@
sudo: required
dist: trusty
branches:
only:
- master
language: go
go:
- 1.11.6
cache:
directories:
- $HOME/google-cloud-sdk/
- $HOME/k8scli
- $HOME/tool
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:
- hack/travis-kube-setup.sh
env:
- KUBECONFIG=${HOME}/.kube/config PATH=$HOME/k8scli:$HOME/tool:$HOME/google-cloud-sdk/bin:${PATH} GO111MODULE=on
before_script:
- cd ${TRAVIS_BUILD_DIR}
- go mod download
- go mod vendor
- hack/verify-staticcheck.sh
- hack/verify-gofmt.sh
- hack/verify-govet.sh
- helm lint charts/fission-all/ charts/fission-core/
- hack/runtests.sh
script:
- cd ${TRAVIS_BUILD_DIR}
- test/build_and_test.sh
- test/upgrade/fission_upgrade_test.sh
notifications:
slack:
rooms:
secure: YZ34vsfw1TtftJypg1MyP4+ihONI4gaxeS3FghBQli6+EezjzcxOXyj5VD+x0ucXfDeTaDrFfmVN0SAGObOoZUE+ea9KAoTo50tRLaD9kwOTACiekZalC4uuBguH0D1/A6vlbU8dchsr9mvIhbisG6mTncdPtqGYYHtyBQme6ngmmHbVAQFZcIBHmNuDb/HWhSr8KMEuyB6+mBXLYELHnXnf26cOhdGNaagqCOJTiemX85RGwIuOPxyBhKDFMLyHohDT7FJMH/qijveE6YgOYTQC5nYc2Np1KvC7hQkIu4nuyczyYlrNQl/TWv+SVI8PjIs0PYuCuD3gUqoVEi8d94HbrOPzFEpbwDS9P4qL39DGmco1Q56Vqxe6sRI0vDWPb5gCP1lSgs3PMECVn7Wor/pTvcL+C+U2jLwWJUl0vbyWCL7ngl/3iTssV7qBpUrI7Oclwp8LrQo9fPj0DL4gE9rNanpEWjQ6yPGaysIL1zLHtRghhm52A22NJGp71jkS2KEpLi6ZWFYjMeuXw5eOQFhqFlzyRJOmLYa3B607TLWuyo2L2CxAfMmq0FGfemvrkLZIWtlQKK4y9ImpsURwaGT2XCtThFtHl77wEss913nC+T2dX3O5Bl0UmxFd5S3mVM109I8c4lDosxnAjRfS9MheFlrG0gjSJSBCw57x7f0=
on_success: change
on_failure: always
+527 -42
View File
@@ -1,23 +1,478 @@
# 1.2.1
# 1.12.0
[Documentation](https://docs.fission.io/)
## Downloads for 1.2.1
## Downloads for 1.12.0
filename | sha256 hash
-------- | -----------
[fission-all-1.2.1-minikube.yaml](https://github.com/fission/fission/releases/download/1.2.1/fission-all-1.2.1-minikube.yaml) | `f645d4741c6396d71addcd1af0cdbf6791bb7b9f6dda3f0b3fea0359f70fe233`
[fission-core-1.2.1.yaml](https://github.com/fission/fission/releases/download/1.2.1/fission-core-1.2.1.yaml) | `aa0c50cd38cdde805c7fac62d18875ca72b0f420ccc17b179c067561eaa7249a`
[fission-all-1.2.1.yaml](https://github.com/fission/fission/releases/download/1.2.1/fission-all-1.2.1.yaml) | `f814b0e194b137235d8860336f488f51c93dea59cf3f8a15ff3e740a6c2972c1`
[fission-core-1.2.1-minikube.yaml](https://github.com/fission/fission/releases/download/1.2.1/fission-core-1.2.1-minikube.yaml) | `a12cc0037916c9ea5afb894d666533eaf66a543efb11f1bf4e0492e320039890`
[fission-core-1.2.1.tgz](https://github.com/fission/fission/releases/download/1.2.1/fission-core-1.2.1.tgz) | `09f573bd2cefa5106b0f67bc741ffa8440d9d65c9d87a27cde9a00513dd503d6`
[fission-all-1.2.1.tgz](https://github.com/fission/fission/releases/download/1.2.1/fission-all-1.2.1.tgz) | `9dce2e7bc1e59e4ef2746046751389ebcf8919cbe49829d614cad38449fbf7e1`
[fission-cli-osx](https://github.com/fission/fission/releases/download/1.2.1/fission-cli-osx) | `b171448a109ea8e3813a60068579d601da5b85584e106f52e790d3220a104bda`
[fission-cli-linux](https://github.com/fission/fission/releases/download/1.2.1/fission-cli-linux) | `29de834928464a4389decaaffa89854aa4533d2a914adfcf8844a8a2356e9cf0`
[fission-cli-windows.exe](https://github.com/fission/fission/releases/download/1.2.1/fission-cli-windows.exe) | `279a732cbeadd6eadbdce096d54f0ba242738ab2b5f0e710fc04bc2eb3459878`
[fission-all-1.12.0.tgz](https://github.com/fission/fission/releases/download/1.12.0/fission-all-1.12.0.tgz) | `10dfa6df66cfcc7f4887086357857ff25cb7e7e2f906b9c11e2d70e1a7bc8113`
[fission-core-1.12.0.tgz](https://github.com/fission/fission/releases/download/1.12.0/fission-core-1.12.0.tgz) | `89d745e2130cf7ff281b35100482d6560a2880f0a4e34ffda6428070eccd1945`
[fission-cli-linux](https://github.com/fission/fission/releases/download/1.12.0/fission-cli-linux) | `bcb3d84a424af45fb8ba5e846238475e481c01907eb10d38a3a614b288da785c`
[fission-cli-windows.exe](https://github.com/fission/fission/releases/download/1.12.0/fission-cli-windows.exe) | `005f5404545d49546259ee801b52987cb375816ba1c341f8e8fc6f316b16c0b2`
[fission-cli-osx](https://github.com/fission/fission/releases/download/1.12.0/fission-cli-osx) | `d6c192b96cca741e264c6bacb900ebe40419c4a68e2cec93a889c5c2874ecd5b`
[fission-core-1.12.0.yaml](https://github.com/fission/fission/releases/download/1.12.0/fission-core-1.12.0.yaml) | `2908fc54ed514b0c600664c5b7cacc35dd9fdb242269c1be3e589d53fbc4f8e5`
[fission-all-1.12.0.yaml](https://github.com/fission/fission/releases/download/1.12.0/fission-all-1.12.0.yaml) | `2a95051c91a507944805eed26103d1ccfa1e222951645a314814cac912e41391`
[fission-all-1.12.0-minikube.yaml](https://github.com/fission/fission/releases/download/1.12.0/fission-all-1.12.0-minikube.yaml) | `91bf41f63ac449861ddf3fc5a0b0ecd061a20f7e17331b8d913f17ac76e65649`
[fission-core-1.12.0-minikube.yaml](https://github.com/fission/fission/releases/download/1.12.0/fission-core-1.12.0-minikube.yaml) | `b71a5f0314e32d0fe3a98c5cbe22308c265203daeea342855a847c1185ce368a`
[fission-all-1.12.0-openshift.yaml](https://github.com/fission/fission/releases/download/1.12.0/fission-all-1.12.0-openshift.yaml) | `906fb10ea9d052e455c9f50613ee6b54ab8bd93d7d7350740ceaf8fdf8618ac4`
[fission-core-1.12.0-openshift.yaml](https://github.com/fission/fission/releases/download/1.12.0/fission-core-1.12.0-openshift.yaml) | `b46908adf6dda8601ac975b6fa0b32e7564b08d54347e106ce04b5e2d01e47b1`
# Change Log
# Changelog
## [1.12.0](https://github.com/fission/fission/tree/1.12.0) (2021-02-11)
[Full Changelog](https://github.com/fission/fission/compare/v1.12.0...1.12.0)
**Merged pull requests:**
- Exit with status code 1 on failed package builds [\#1926](https://github.com/fission/fission/pull/1926) ([RealHarshThakur](https://github.com/RealHarshThakur))
- Fix status code for rate limit [\#1924](https://github.com/fission/fission/pull/1924) ([RealHarshThakur](https://github.com/RealHarshThakur))
- Fixing issue of pulling docker image twice in CI [\#1903](https://github.com/fission/fission/pull/1903) ([therahulbhati](https://github.com/therahulbhati))
- Updates required for multi-architecture builds. [\#1891](https://github.com/fission/fission/pull/1891) ([cerebrate](https://github.com/cerebrate))
- Improved readyPod queue implementation and bugfix [\#1890](https://github.com/fission/fission/pull/1890) ([therahulbhati](https://github.com/therahulbhati))
- Put message to error topic when exceed max retries in kafka mqt [\#1885](https://github.com/fission/fission/pull/1885) ([chenjr0719](https://github.com/chenjr0719))
- Migrating to keda2.0 [\#1868](https://github.com/fission/fission/pull/1868) ([RealHarshThakur](https://github.com/RealHarshThakur))
- Updated role and permission for fission-crd cluster role [\#1867](https://github.com/fission/fission/pull/1867) ([therahulbhati](https://github.com/therahulbhati))
- Envupdate crossupdate fix [\#1866](https://github.com/fission/fission/pull/1866) ([RealHarshThakur](https://github.com/RealHarshThakur))
- Spec validation option [\#1865](https://github.com/fission/fission/pull/1865) ([RealHarshThakur](https://github.com/RealHarshThakur))
- Added concurrency field to schema validation [\#1727](https://github.com/fission/fission/pull/1727) ([therahulbhati](https://github.com/therahulbhati))
- Updated tags of connector images [\#1934](https://github.com/fission/fission/pull/1934) ([therahulbhati](https://github.com/therahulbhati))
- Updated go plugin version for Github Action CI/CD [\#1922](https://github.com/fission/fission/pull/1922) ([therahulbhati](https://github.com/therahulbhati))
- Fixed golangci-lint issues: /fission/pkg [\#1902](https://github.com/fission/fission/pull/1902) ([gauravgahlot](https://github.com/gauravgahlot))
- Remove unnecessary import package. [\#1897](https://github.com/fission/fission/pull/1897) ([tosone](https://github.com/tosone))
- Replace build status badge to use GH Actions status [\#1887](https://github.com/fission/fission/pull/1887) ([therahulbhati](https://github.com/therahulbhati))
- Github Actions Workflows [\#1876](https://github.com/fission/fission/pull/1876) ([therahulbhati](https://github.com/therahulbhati))
- Readypod optimization in executor [\#1860](https://github.com/fission/fission/pull/1860) ([therahulbhati](https://github.com/therahulbhati))
- Release 1.11.2 [\#1843](https://github.com/fission/fission/pull/1843) ([therahulbhati](https://github.com/therahulbhati))
- Fixed golangci-lint issues: /fission/pkg/executor [\#1842](https://github.com/fission/fission/pull/1842) ([gauravgahlot](https://github.com/gauravgahlot))
- Update nats streaming image name in values.yaml and deployments yaml [\#1839](https://github.com/fission/fission/pull/1839) ([girishg4t](https://github.com/girishg4t))
- Fixed golangci-lint issues: /fission/pkg/router [\#1831](https://github.com/fission/fission/pull/1831) ([gauravgahlot](https://github.com/gauravgahlot))
- Fix golint warnings for publisher package [\#1822](https://github.com/fission/fission/pull/1822) ([ShajithaMohammed](https://github.com/ShajithaMohammed))
- in-progress golint warning fixes [\#1799](https://github.com/fission/fission/pull/1799) ([ari-hacks](https://github.com/ari-hacks))
## [v1.11.2](https://github.com/fission/fission/tree/v1.11.2) (2020-10-20)
[Full Changelog](https://github.com/fission/fission/compare/1.11.1...v1.11.2)
**Merged pull requests:**
- Fix env resources getting pruned due to CRD Validation [\#1833](https://github.com/fission/fission/pull/1833) ([therahulbhati](https://github.com/therahulbhati))
- Fixed typos across fission repo [\#1832](https://github.com/fission/fission/pull/1832) ([gauravgahlot](https://github.com/gauravgahlot))
- Release 1.11.1 [\#1838](https://github.com/fission/fission/pull/1838) ([vishal-biyani](https://github.com/vishal-biyani))
## [1.11.1](https://github.com/fission/fission/tree/1.11.1) (2020-10-14)
[Full Changelog](https://github.com/fission/fission/compare/v1.11.0...1.11.1)
**Merged pull requests:**
- Added field to preserve fields during CRD validation [\#1818](https://github.com/fission/fission/pull/1818) ([therahulbhati](https://github.com/therahulbhati))
- fix\(docs\): Update Readme [\#1742](https://github.com/fission/fission/pull/1742) ([iamdarshshah](https://github.com/iamdarshshah))
- Update README.md - fix typo [\#1737](https://github.com/fission/fission/pull/1737) ([Parikshit-Hooda](https://github.com/Parikshit-Hooda))
- \[skip ci\] fix contributing.md link on readme [\#1731](https://github.com/fission/fission/pull/1731) ([mrturkmencom](https://github.com/mrturkmencom))
- Added concurrency field to schema validation [\#1727](https://github.com/fission/fission/pull/1727) ([therahulbhati](https://github.com/therahulbhati))
- Improving contributing docs [\#1726](https://github.com/fission/fission/pull/1726) ([vishal-biyani](https://github.com/vishal-biyani))
- Added code to prevent deletion of active fn pod [\#1724](https://github.com/fission/fission/pull/1724) ([therahulbhati](https://github.com/therahulbhati))
- Release 1.11.0 [\#1716](https://github.com/fission/fission/pull/1716) ([vishal-biyani](https://github.com/vishal-biyani))
- Added flag for insecureSkipVerfiy [\#1829](https://github.com/fission/fission/pull/1829) ([therahulbhati](https://github.com/therahulbhati))
- Update aws-kinesis image name in values.yaml [\#1817](https://github.com/fission/fission/pull/1817) ([girishg4t](https://github.com/girishg4t))
- Improvements from scale testing [\#1812](https://github.com/fission/fission/pull/1812) ([therahulbhati](https://github.com/therahulbhati))
- Update aws-sqs image name in values.yaml [\#1714](https://github.com/fission/fission/pull/1714) ([therahulbhati](https://github.com/therahulbhati))
## [1.11.0](https://github.com/fission/fission/tree/1.11.0) (2020-09-16)
[Full Changelog](https://github.com/fission/fission/compare/1.10.0...1.11.0)
**Merged pull requests:**
- Bumping up release of Helm for release script [\#1715](https://github.com/fission/fission/pull/1715) ([vishal-biyani](https://github.com/vishal-biyani))
- Skaffold: Typo in Helm values for Prometheus [\#1709](https://github.com/fission/fission/pull/1709) ([vishal-biyani](https://github.com/vishal-biyani))
- logs: change timestamp to ISO [\#1708](https://github.com/fission/fission/pull/1708) ([sahil-lakhwani](https://github.com/sahil-lakhwani))
- Bump jetty-server from 9.0.4.v20130625 to 9.4.17.v20190418 in /environments/jvm-jersey [\#1706](https://github.com/fission/fission/pull/1706) ([dependabot[bot]](https://github.com/apps/dependabot))
- Addition of openapischemav3 to fission CRDs to support kubectl explain [\#1702](https://github.com/fission/fission/pull/1702) ([ankitjain235](https://github.com/ankitjain235))
- Skaffold kind [\#1700](https://github.com/fission/fission/pull/1700) ([vishal-biyani](https://github.com/vishal-biyani))
- Adding Concurrency in Pool Manager [\#1698](https://github.com/fission/fission/pull/1698) ([therahulbhati](https://github.com/therahulbhati))
- Adding NodeJS version 12 env [\#1683](https://github.com/fission/fission/pull/1683) ([vishal-biyani](https://github.com/vishal-biyani))
- Removed code related to mqtrigger [\#1680](https://github.com/fission/fission/pull/1680) ([therahulbhati](https://github.com/therahulbhati))
- jvm-jersey-env [\#1677](https://github.com/fission/fission/pull/1677) ([sahil-lakhwani](https://github.com/sahil-lakhwani))
- Update values.yaml with mqt keda configuration [\#1670](https://github.com/fission/fission/pull/1670) ([therahulbhati](https://github.com/therahulbhati))
- Release 1.10.0 [\#1658](https://github.com/fission/fission/pull/1658) ([vishal-biyani](https://github.com/vishal-biyani))
- \(fix\) Dependencies and steps for building examples/java locally [\#1653](https://github.com/fission/fission/pull/1653) ([rahulchheda](https://github.com/rahulchheda))
- Allow user to override nats-streaming image [\#1645](https://github.com/fission/fission/pull/1645) ([funkypenguin](https://github.com/funkypenguin))
- Allow user to define busybox image [\#1643](https://github.com/fission/fission/pull/1643) ([funkypenguin](https://github.com/funkypenguin))
- Add headers to Kafka MQT error topics [\#1701](https://github.com/fission/fission/pull/1701) ([ankitjain235](https://github.com/ankitjain235))
- Non-root users access Secrets and ConfigMaps [\#1697](https://github.com/fission/fission/pull/1697) ([atsai1220](https://github.com/atsai1220))
- Added prefix tag in fluentbit filter stanza [\#1671](https://github.com/fission/fission/pull/1671) ([therahulbhati](https://github.com/therahulbhati))
- 1665: Python env sentry integration [\#1669](https://github.com/fission/fission/pull/1669) ([vir-mir](https://github.com/vir-mir))
- Fission MQT integration with keda [\#1657](https://github.com/fission/fission/pull/1657) ([therahulbhati](https://github.com/therahulbhati))
- Add serviceaccount for nats-streaming [\#1646](https://github.com/fission/fission/pull/1646) ([funkypenguin](https://github.com/funkypenguin))
- Allow user to override value of influxdb image [\#1642](https://github.com/fission/fission/pull/1642) ([funkypenguin](https://github.com/funkypenguin))
## [v1.10.0](https://github.com/fission/fission/tree/v1.10.0) (2020-06-29)
[Full Changelog](https://github.com/fission/fission/compare/v1.9.0...v1.10.0)
**Merged pull requests:**
- Make mergePodSpec pick up enableServiceLinks [\#1601](https://github.com/fission/fission/pull/1601) ([darkworon](https://github.com/darkworon))
- Bump rack from 2.0.8 to 2.1.4 in /environments/ruby [\#1654](https://github.com/fission/fission/pull/1654) ([dependabot[bot]](https://github.com/apps/dependabot))
- For fixing staticcheck issue [\#1652](https://github.com/fission/fission/pull/1652) ([vishal-biyani](https://github.com/vishal-biyani))
- Python env changes for pip3 [\#1633](https://github.com/fission/fission/pull/1633) ([agiwalpooja20](https://github.com/agiwalpooja20))
- S3 backend for storage service [\#1629](https://github.com/fission/fission/pull/1629) ([vishal-biyani](https://github.com/vishal-biyani))
- Fixing verify-staticcheck.sh [\#1622](https://github.com/fission/fission/pull/1622) ([rajalokan](https://github.com/rajalokan))
- Added support for setting bodyParser limit param via environment variable [\#1618](https://github.com/fission/fission/pull/1618) ([therahulbhati](https://github.com/therahulbhati))
- Skaffold registry [\#1617](https://github.com/fission/fission/pull/1617) ([vishal-biyani](https://github.com/vishal-biyani))
- \[WIP\] \(feat\) Added Exponential BackOff for Retry in builder [\#1614](https://github.com/fission/fission/pull/1614) ([rahulchheda](https://github.com/rahulchheda))
- Added codecov badge [\#1604](https://github.com/fission/fission/pull/1604) ([vishal-biyani](https://github.com/vishal-biyani))
- Update issue templates [\#1602](https://github.com/fission/fission/pull/1602) ([vishal-biyani](https://github.com/vishal-biyani))
- Release 1.9.0 [\#1597](https://github.com/fission/fission/pull/1597) ([vishal-biyani](https://github.com/vishal-biyani))
- Added support for kube-context flag, to specify kubernetes context [\#1595](https://github.com/fission/fission/pull/1595) ([therahulbhati](https://github.com/therahulbhati))
## [1.9.0](https://github.com/fission/fission/tree/1.9.0) (2020-05-10)
[Full Changelog](https://github.com/fission/fission/compare/1.8.0...1.9.0)
**Merged pull requests:**
- Kind config [\#1587](https://github.com/fission/fission/pull/1587) ([vishal-biyani](https://github.com/vishal-biyani))
- Show short flag on CLI usage [\#1580](https://github.com/fission/fission/pull/1580) ([life1347](https://github.com/life1347))
- External nats streaming [\#1576](https://github.com/fission/fission/pull/1576) ([vishal-biyani](https://github.com/vishal-biyani))
- Skaffold Default Repo [\#1575](https://github.com/fission/fission/pull/1575) ([vishal-biyani](https://github.com/vishal-biyani))
- Python Env Build issue due to gevent [\#1572](https://github.com/fission/fission/pull/1572) ([vishal-biyani](https://github.com/vishal-biyani))
- create fission environment for go version 1.14 [\#1570](https://github.com/fission/fission/pull/1570) ([Jared-Prime](https://github.com/Jared-Prime))
- \[chart\] Add PSP for logger [\#1568](https://github.com/fission/fission/pull/1568) ([LittleFox94](https://github.com/LittleFox94))
- \[WIP\] Skaffold Fix [\#1567](https://github.com/fission/fission/pull/1567) ([vishal-biyani](https://github.com/vishal-biyani))
- Adding community meeting link and document [\#1563](https://github.com/fission/fission/pull/1563) ([vishal-biyani](https://github.com/vishal-biyani))
- Return Kubernetes full error message [\#1560](https://github.com/fission/fission/pull/1560) ([life1347](https://github.com/life1347))
- Use stock InfluxDB image [\#1557](https://github.com/fission/fission/pull/1557) ([life1347](https://github.com/life1347))
- Bump Python environment to latest Alpine [\#1547](https://github.com/fission/fission/pull/1547) ([delucca](https://github.com/delucca))
- Bump nokogiri from 1.10.4 to 1.10.8 in /examples/ruby/parse [\#1544](https://github.com/fission/fission/pull/1544) ([dependabot[bot]](https://github.com/apps/dependabot))
- Avoid exposing sensitive data to client [\#1543](https://github.com/fission/fission/pull/1543) ([life1347](https://github.com/life1347))
- Retry querying package info when "not found" [\#1540](https://github.com/fission/fission/pull/1540) ([life1347](https://github.com/life1347))
- Fix function test timeout doesnt works [\#1539](https://github.com/fission/fission/pull/1539) ([life1347](https://github.com/life1347))
- Support Function-level idle timeout setting [\#1538](https://github.com/fission/fission/pull/1538) ([life1347](https://github.com/life1347))
- Add message queue service factory [\#1537](https://github.com/fission/fission/pull/1537) ([life1347](https://github.com/life1347))
- Update NATS-Streaming dependencies version [\#1533](https://github.com/fission/fission/pull/1533) ([life1347](https://github.com/life1347))
- Fix Git issue on case-insensitive OS [\#1532](https://github.com/fission/fission/pull/1532) ([life1347](https://github.com/life1347))
- Reorganize message queue trigger directory structure [\#1531](https://github.com/fission/fission/pull/1531) ([life1347](https://github.com/life1347))
- Append Environment labels to function pod labels [\#1530](https://github.com/fission/fission/pull/1530) ([life1347](https://github.com/life1347))
- Place package deploy archive to fix path [\#1529](https://github.com/fission/fission/pull/1529) ([life1347](https://github.com/life1347))
- Fix github\_changelog\_generator error [\#1527](https://github.com/fission/fission/pull/1527) ([life1347](https://github.com/life1347))
- Release 1.8.0 [\#1526](https://github.com/fission/fission/pull/1526) ([life1347](https://github.com/life1347))
## [v1.8.0](https://github.com/fission/fission/tree/v1.8.0) (2020-02-03)
[Full Changelog](https://github.com/fission/fission/compare/v1.7.1...v1.8.0)
**Merged pull requests:**
- Revert "Temporarily disable building JVM image during CI builds" [\#1525](https://github.com/fission/fission/pull/1525) ([life1347](https://github.com/life1347))
- Update TerminationGracePeriod usage text [\#1524](https://github.com/fission/fission/pull/1524) ([life1347](https://github.com/life1347))
- Set initial package status if its empty [\#1522](https://github.com/fission/fission/pull/1522) ([life1347](https://github.com/life1347))
- Update slack invitation link [\#1521](https://github.com/fission/fission/pull/1521) ([life1347](https://github.com/life1347))
- Fix Java spec example [\#1519](https://github.com/fission/fission/pull/1519) ([life1347](https://github.com/life1347))
- Fix executor wrongly deletes rolebindings [\#1517](https://github.com/fission/fission/pull/1517) ([life1347](https://github.com/life1347))
- Show global options in usage [\#1516](https://github.com/fission/fission/pull/1516) ([life1347](https://github.com/life1347))
- Add fake client for local command operation [\#1515](https://github.com/fission/fission/pull/1515) ([life1347](https://github.com/life1347))
- Set prometheus.enabled=false in core chart [\#1513](https://github.com/fission/fission/pull/1513) ([life1347](https://github.com/life1347))
- Java env: Add XML dependency [\#1512](https://github.com/fission/fission/pull/1512) ([sahil-lakhwani](https://github.com/sahil-lakhwani))
- Fix poolmanager wrongly delete env pool [\#1511](https://github.com/fission/fission/pull/1511) ([life1347](https://github.com/life1347))
- Use patch for robust pod metadata update in poolmgr [\#1509](https://github.com/fission/fission/pull/1509) ([life1347](https://github.com/life1347))
- Optimize CI build steps to reduce waiting time [\#1508](https://github.com/fission/fission/pull/1508) ([life1347](https://github.com/life1347))
- Add Go 1.13 support and upgrade Go 1.12 version [\#1507](https://github.com/fission/fission/pull/1507) ([life1347](https://github.com/life1347))
- Add resource exists error on spec validate [\#1506](https://github.com/fission/fission/pull/1506) ([life1347](https://github.com/life1347))
- Add --dry option to view the generated spec without saving [\#1504](https://github.com/fission/fission/pull/1504) ([life1347](https://github.com/life1347))
- Let unit tests run in different namespaces to avoid resource conflict [\#1502](https://github.com/fission/fission/pull/1502) ([life1347](https://github.com/life1347))
- Move to new CI cluster [\#1500](https://github.com/fission/fission/pull/1500) ([life1347](https://github.com/life1347))
- Add sponsor logos [\#1499](https://github.com/fission/fission/pull/1499) ([life1347](https://github.com/life1347))
- Follow kubernetes APIs directory structure [\#1497](https://github.com/fission/fission/pull/1497) ([life1347](https://github.com/life1347))
- Codebase cleanup & optimization [\#1493](https://github.com/fission/fission/pull/1493) ([life1347](https://github.com/life1347))
- Use code-generator to generate clientset/informer/lister [\#1492](https://github.com/fission/fission/pull/1492) ([life1347](https://github.com/life1347))
- Update analytics URL [\#1490](https://github.com/fission/fission/pull/1490) ([life1347](https://github.com/life1347))
- Add config for fetcher resource requests&limits [\#1489](https://github.com/fission/fission/pull/1489) ([life1347](https://github.com/life1347))
- Push php-builder to dockerhub [\#1477](https://github.com/fission/fission/pull/1477) ([life1347](https://github.com/life1347))
- Fix terminationGracePeriod is 0 due to wrong flag type [\#1476](https://github.com/fission/fission/pull/1476) ([life1347](https://github.com/life1347))
- Fix hello-spec-example [\#1474](https://github.com/fission/fission/pull/1474) ([sahil-lakhwani](https://github.com/sahil-lakhwani))
- Add message queue nats-streaming example [\#1472](https://github.com/fission/fission/pull/1472) ([life1347](https://github.com/life1347))
- Add failed/success output to spec validate [\#1471](https://github.com/fission/fission/pull/1471) ([anubhav6663](https://github.com/anubhav6663))
- Bump rack from 2.0.6 to 2.0.8 in /environments/ruby [\#1470](https://github.com/fission/fission/pull/1470) ([dependabot[bot]](https://github.com/apps/dependabot))
- Fix go-server failed to load plugin [\#1469](https://github.com/fission/fission/pull/1469) ([life1347](https://github.com/life1347))
- Add spec list feature [\#1468](https://github.com/fission/fission/pull/1468) ([anubhav6663](https://github.com/anubhav6663))
- Add controller API client interface [\#1467](https://github.com/fission/fission/pull/1467) ([life1347](https://github.com/life1347))
- Remove FISSION\_ROUTER for fn test [\#1465](https://github.com/fission/fission/pull/1465) ([sahil-lakhwani](https://github.com/sahil-lakhwani))
- Add the not present cmname while fn create in err message \[CLI-UX\] [\#1462](https://github.com/fission/fission/pull/1462) ([viveksinghggits](https://github.com/viveksinghggits))
- Fission 1.7.1 [\#1461](https://github.com/fission/fission/pull/1461) ([life1347](https://github.com/life1347))
## [1.7.1](https://github.com/fission/fission/tree/1.7.1) (2019-12-09)
[Full Changelog](https://github.com/fission/fission/compare/1.7.0...1.7.1)
**Merged pull requests:**
- Fix name conflict when buildermanager merges podspec [\#1460](https://github.com/fission/fission/pull/1460) ([life1347](https://github.com/life1347))
- Not to exclude hidden file when creating archive [\#1458](https://github.com/fission/fission/pull/1458) ([life1347](https://github.com/life1347))
- Fission 1.7.0 [\#1457](https://github.com/fission/fission/pull/1457) ([life1347](https://github.com/life1347))
## [v1.7.0](https://github.com/fission/fission/tree/v1.7.0) (2019-12-02)
[Full Changelog](https://github.com/fission/fission/compare/v1.7.0-rc.2...v1.7.0)
**Merged pull requests:**
- Fix release script not uploads OpenShift deploy YAML file [\#1456](https://github.com/fission/fission/pull/1456) ([life1347](https://github.com/life1347))
- Let executor type manages how to do cleanup for old kubeobjects [\#1455](https://github.com/fission/fission/pull/1455) ([life1347](https://github.com/life1347))
- Prevent deployment from rolling update due to different instance-id [\#1454](https://github.com/fission/fission/pull/1454) ([life1347](https://github.com/life1347))
- Make AdoptExistingResources optional [\#1453](https://github.com/fission/fission/pull/1453) ([life1347](https://github.com/life1347))
- Prevent newdeploy updates deployment if no resources changed [\#1452](https://github.com/fission/fission/pull/1452) ([life1347](https://github.com/life1347))
- Fix CLI unable to get pod logs from controller [\#1451](https://github.com/fission/fission/pull/1451) ([life1347](https://github.com/life1347))
- Ignore hidden file when creating archive file [\#1450](https://github.com/fission/fission/pull/1450) ([life1347](https://github.com/life1347))
- Fix spec init overrides existing deploymentconfig [\#1449](https://github.com/fission/fission/pull/1449) ([life1347](https://github.com/life1347))
- Fix spec shows source archive is not used [\#1448](https://github.com/fission/fission/pull/1448) ([life1347](https://github.com/life1347))
- Fix adopted deployment uses old fetcher image [\#1447](https://github.com/fission/fission/pull/1447) ([life1347](https://github.com/life1347))
- Improve executor bootstrap speed [\#1446](https://github.com/fission/fission/pull/1446) ([life1347](https://github.com/life1347))
- Fission 1.7.0-rc.2 [\#1445](https://github.com/fission/fission/pull/1445) ([life1347](https://github.com/life1347))
## [1.7.0-rc.2](https://github.com/fission/fission/tree/1.7.0-rc.2) (2019-11-27)
[Full Changelog](https://github.com/fission/fission/compare/1.7.0-rc.1...1.7.0-rc.2)
**Merged pull requests:**
- Push extra tag to fit go module semver tag format [\#1444](https://github.com/fission/fission/pull/1444) ([life1347](https://github.com/life1347))
- Adopt existing orphan kubernetes resources when executor starts up [\#1443](https://github.com/fission/fission/pull/1443) ([life1347](https://github.com/life1347))
- Revert "Try to fix flaky canary test" [\#1442](https://github.com/fission/fission/pull/1442) ([life1347](https://github.com/life1347))
- Try to fix flaky canary test [\#1441](https://github.com/fission/fission/pull/1441) ([life1347](https://github.com/life1347))
- Fix router tries to update ingress when createIngress is false [\#1440](https://github.com/fission/fission/pull/1440) ([life1347](https://github.com/life1347))
- Fix poolmanager sets 0 timeout for function specialization [\#1439](https://github.com/fission/fission/pull/1439) ([life1347](https://github.com/life1347))
- Add huge response body test [\#1437](https://github.com/fission/fission/pull/1437) ([life1347](https://github.com/life1347))
- Return error when specialization failed [\#1436](https://github.com/fission/fission/pull/1436) ([life1347](https://github.com/life1347))
- Fix poolmanager terminates running function pod periodically [\#1435](https://github.com/fission/fission/pull/1435) ([life1347](https://github.com/life1347))
- Allow to tap multiple function services at one time [\#1434](https://github.com/fission/fission/pull/1434) ([life1347](https://github.com/life1347))
- Collect function metrics after finishing request [\#1433](https://github.com/fission/fission/pull/1433) ([life1347](https://github.com/life1347))
- Fix poolmanager crashes when failed to list environment [\#1432](https://github.com/fission/fission/pull/1432) ([life1347](https://github.com/life1347))
- Ability to pull builder image from private registry [\#1431](https://github.com/fission/fission/pull/1431) ([life1347](https://github.com/life1347))
- Add checksum and insecure flag for user to skip checksum generation [\#1430](https://github.com/fission/fission/pull/1430) ([life1347](https://github.com/life1347))
- Support to set imagePullSecret when creating environment [\#1429](https://github.com/fission/fission/pull/1429) ([life1347](https://github.com/life1347))
- Fix no kubeobjs get created if fn created before env creation [\#1428](https://github.com/fission/fission/pull/1428) ([life1347](https://github.com/life1347))
- Fix verbosity flag not found in subcommand [\#1425](https://github.com/fission/fission/pull/1425) ([life1347](https://github.com/life1347))
- Improve compatibility with Openshift [\#1424](https://github.com/fission/fission/pull/1424) ([life1347](https://github.com/life1347))
- Fix truncated body returned from router [\#1420](https://github.com/fission/fission/pull/1420) ([life1347](https://github.com/life1347))
- Fission 1.7.0-rc.1 [\#1419](https://github.com/fission/fission/pull/1419) ([life1347](https://github.com/life1347))
## [v1.7.0-rc.1](https://github.com/fission/fission/tree/v1.7.0-rc.1) (2019-11-18)
[Full Changelog](https://github.com/fission/fission/compare/v1.6.0...v1.7.0-rc.1)
**Merged pull requests:**
- Update release-builder go and helm version [\#1418](https://github.com/fission/fission/pull/1418) ([life1347](https://github.com/life1347))
- Fix failed to find init\_tools.sh [\#1417](https://github.com/fission/fission/pull/1417) ([life1347](https://github.com/life1347))
- Support semantic version tags [\#1416](https://github.com/fission/fission/pull/1416) ([life1347](https://github.com/life1347))
- Show warning when referencing nonexistent resources in spec [\#1415](https://github.com/fission/fission/pull/1415) ([life1347](https://github.com/life1347))
- Add resource info to output message when saving spec file [\#1414](https://github.com/fission/fission/pull/1414) ([life1347](https://github.com/life1347))
- Always embed given URL in the archive [\#1413](https://github.com/fission/fission/pull/1413) ([life1347](https://github.com/life1347))
- Fix wrong command and flag usage description [\#1412](https://github.com/fission/fission/pull/1412) ([life1347](https://github.com/life1347))
- Add --spec to package command [\#1411](https://github.com/fission/fission/pull/1411) ([life1347](https://github.com/life1347))
- Drop unreleased features \(record & replay\) [\#1406](https://github.com/fission/fission/pull/1406) ([life1347](https://github.com/life1347))
- Build error formatting on fission spec apply --wait [\#1403](https://github.com/fission/fission/pull/1403) ([life1347](https://github.com/life1347))
- Refactor controller client package [\#1402](https://github.com/fission/fission/pull/1402) ([life1347](https://github.com/life1347))
- Fix fn test failed to query logs from log database [\#1401](https://github.com/fission/fission/pull/1401) ([life1347](https://github.com/life1347))
- Skip trace for router healthz endpoint [\#1400](https://github.com/fission/fission/pull/1400) ([life1347](https://github.com/life1347))
- Set jaeger collector endpoint as an environment variable [\#1399](https://github.com/fission/fission/pull/1399) ([life1347](https://github.com/life1347))
- Replace deprecated serviceAccount with serviceAccountName [\#1398](https://github.com/fission/fission/pull/1398) ([life1347](https://github.com/life1347))
- Fix helm pre-upgrade check failure problem [\#1397](https://github.com/fission/fission/pull/1397) ([life1347](https://github.com/life1347))
- Prettify console output message [\#1396](https://github.com/fission/fission/pull/1396) ([life1347](https://github.com/life1347))
- fix typo [\#1395](https://github.com/fission/fission/pull/1395) ([jjmengze](https://github.com/jjmengze))
- Reorder command flags and add missing flags [\#1394](https://github.com/fission/fission/pull/1394) ([life1347](https://github.com/life1347))
- Fix CLI exits with status 0 when error occurs [\#1393](https://github.com/fission/fission/pull/1393) ([life1347](https://github.com/life1347))
- Poolmanager wait for function pod till specialization timeout [\#1392](https://github.com/fission/fission/pull/1392) ([life1347](https://github.com/life1347))
- Replace flag text with const [\#1391](https://github.com/fission/fission/pull/1391) ([life1347](https://github.com/life1347))
- Update prometheus version and disable it from the default installation [\#1389](https://github.com/fission/fission/pull/1389) ([life1347](https://github.com/life1347))
- Fix helm shows "Not a table" issue when install Fission [\#1387](https://github.com/fission/fission/pull/1387) ([life1347](https://github.com/life1347))
- Fix githook not aborting push if error occurs [\#1386](https://github.com/fission/fission/pull/1386) ([life1347](https://github.com/life1347))
- Migrate from urfave/cli to cobra [\#1385](https://github.com/fission/fission/pull/1385) ([life1347](https://github.com/life1347))
- Update maintainer info [\#1383](https://github.com/fission/fission/pull/1383) ([life1347](https://github.com/life1347))
- Update Makefile and add git pre-push hook [\#1382](https://github.com/fission/fission/pull/1382) ([life1347](https://github.com/life1347))
- Update staticcheck version and fix all warnings [\#1381](https://github.com/fission/fission/pull/1381) ([life1347](https://github.com/life1347))
- Make CLI functions return error instead of fatal out [\#1379](https://github.com/fission/fission/pull/1379) ([life1347](https://github.com/life1347))
- Refactor record command [\#1378](https://github.com/fission/fission/pull/1378) ([life1347](https://github.com/life1347))
- Fix reverse proxy shows 404 not found when Istio enabled [\#1377](https://github.com/fission/fission/pull/1377) ([life1347](https://github.com/life1347))
- Refactor time trigger command [\#1376](https://github.com/fission/fission/pull/1376) ([life1347](https://github.com/life1347))
- Refactor mqtrigger command [\#1375](https://github.com/fission/fission/pull/1375) ([life1347](https://github.com/life1347))
- added example for builder podspec [\#1374](https://github.com/fission/fission/pull/1374) ([viveksinghggits](https://github.com/viveksinghggits))
- Refactor function command [\#1372](https://github.com/fission/fission/pull/1372) ([life1347](https://github.com/life1347))
- Allow to set API type for tensorflow serving environment [\#1371](https://github.com/fission/fission/pull/1371) ([life1347](https://github.com/life1347))
- Refactor canary config command [\#1370](https://github.com/fission/fission/pull/1370) ([life1347](https://github.com/life1347))
- PodSpec support in environment builder [\#1369](https://github.com/fission/fission/pull/1369) ([viveksinghggits](https://github.com/viveksinghggits))
- Fix utility function uses the wrong flag text to get value [\#1368](https://github.com/fission/fission/pull/1368) ([life1347](https://github.com/life1347))
- Refactor HTTP trigger command [\#1367](https://github.com/fission/fission/pull/1367) ([life1347](https://github.com/life1347))
- Update READEME link and add back the basic usage [\#1366](https://github.com/fission/fission/pull/1366) ([life1347](https://github.com/life1347))
- Refactor kubewatch command [\#1365](https://github.com/fission/fission/pull/1365) ([life1347](https://github.com/life1347))
- Fix accidentally removed timestamp when listing package [\#1364](https://github.com/fission/fission/pull/1364) ([life1347](https://github.com/life1347))
- Move route creation to function [\#1362](https://github.com/fission/fission/pull/1362) ([life1347](https://github.com/life1347))
- Remove UID from CLI output [\#1361](https://github.com/fission/fission/pull/1361) ([life1347](https://github.com/life1347))
- Allow using URL as archive source when creating functions [\#1360](https://github.com/fission/fission/pull/1360) ([life1347](https://github.com/life1347))
- Refactor plugin & version subcommands [\#1359](https://github.com/fission/fission/pull/1359) ([life1347](https://github.com/life1347))
- Provide secrets and configmaps while updating the functions [\#1358](https://github.com/fission/fission/pull/1358) ([viveksinghggits](https://github.com/viveksinghggits))
- Update fission architecture doc [\#1356](https://github.com/fission/fission/pull/1356) ([life1347](https://github.com/life1347))
- calling the function that handles kafka messages, asynchronously [\#1355](https://github.com/fission/fission/pull/1355) ([viveksinghggits](https://github.com/viveksinghggits))
- Fix release script tags wrong image name & sed problem on Linux [\#1353](https://github.com/fission/fission/pull/1353) ([life1347](https://github.com/life1347))
- Update CHANGELOG for 1.6.0 [\#1352](https://github.com/fission/fission/pull/1352) ([life1347](https://github.com/life1347))
- Replace `AlwaysSample` with `ProbabilitySampler` in router \(\#1215\) [\#1348](https://github.com/fission/fission/pull/1348) ([ccamel](https://github.com/ccamel))
- Refactor package CLI command [\#1345](https://github.com/fission/fission/pull/1345) ([life1347](https://github.com/life1347))
## [1.6.0](https://github.com/fission/fission/tree/1.6.0) (2019-10-10)
[Full Changelog](https://github.com/fission/fission/compare/1.5.0...1.6.0)
**Merged pull requests:**
- Fission 1.6.0 [\#1351](https://github.com/fission/fission/pull/1351) ([life1347](https://github.com/life1347))
- Move statefulset to apps/v1 [\#1350](https://github.com/fission/fission/pull/1350) ([life1347](https://github.com/life1347))
- Fix newdeploy failed to find serviceEntry in cache [\#1349](https://github.com/fission/fission/pull/1349) ([life1347](https://github.com/life1347))
- Support encoded path in router [\#1347](https://github.com/fission/fission/pull/1347) ([life1347](https://github.com/life1347))
- Support custom private go vendor [\#1346](https://github.com/fission/fission/pull/1346) ([life1347](https://github.com/life1347))
- Fix the namespace mismatch problem when deploying with a single YAML file [\#1344](https://github.com/fission/fission/pull/1344) ([life1347](https://github.com/life1347))
- Move charts executor service to the right place [\#1343](https://github.com/fission/fission/pull/1343) ([life1347](https://github.com/life1347))
- Allow to deploy router as DaemonSet [\#1342](https://github.com/fission/fission/pull/1342) ([life1347](https://github.com/life1347))
- add package filter feature [\#1341](https://github.com/fission/fission/pull/1341) ([jjmengze](https://github.com/jjmengze))
- Bump jvm builder JDK version [\#1340](https://github.com/fission/fission/pull/1340) ([life1347](https://github.com/life1347))
- Fix executor doesn't apply user-configured container spec correctly [\#1339](https://github.com/fission/fission/pull/1339) ([life1347](https://github.com/life1347))
- Allow to add annotations to router service in helm chart [\#1338](https://github.com/fission/fission/pull/1338) ([prabhu43](https://github.com/prabhu43))
- Remove too verbose and unhelpful debug log [\#1336](https://github.com/fission/fission/pull/1336) ([life1347](https://github.com/life1347))
- package will now be listed, sorted by lastupdatedtime [\#1334](https://github.com/fission/fission/pull/1334) ([viveksinghggits](https://github.com/viveksinghggits))
- Fix router health route not found if no HTTP triggers created [\#1333](https://github.com/fission/fission/pull/1333) ([life1347](https://github.com/life1347))
- Fix spec doesn't update status of failed package when applying spec files [\#1332](https://github.com/fission/fission/pull/1332) ([life1347](https://github.com/life1347))
- Move Deployment API group from extensions/v1beta1 to apps/v1 [\#1331](https://github.com/fission/fission/pull/1331) ([life1347](https://github.com/life1347))
- Fix empty host value when list http triggers [\#1328](https://github.com/fission/fission/pull/1328) ([life1347](https://github.com/life1347))
- List/Delete HTTP triggers by function [\#1327](https://github.com/fission/fission/pull/1327) ([life1347](https://github.com/life1347))
- Add Ingress TLS support [\#1326](https://github.com/fission/fission/pull/1326) ([life1347](https://github.com/life1347))
- Add Ingress host, path and annotations support [\#1325](https://github.com/fission/fission/pull/1325) ([life1347](https://github.com/life1347))
- Set maxSurge to 20% for safe rolling upgrade [\#1321](https://github.com/fission/fission/pull/1321) ([life1347](https://github.com/life1347))
- Disable revision history for newdeploy [\#1319](https://github.com/fission/fission/pull/1319) ([life1347](https://github.com/life1347))
- Pre-built docker go module dependency cache image [\#1318](https://github.com/fission/fission/pull/1318) ([life1347](https://github.com/life1347))
- Fix newdeploy doesn't handle error properly [\#1316](https://github.com/fission/fission/pull/1316) ([life1347](https://github.com/life1347))
- Fix failed to update specialization timeout [\#1315](https://github.com/fission/fission/pull/1315) ([life1347](https://github.com/life1347))
- Add codecov config file [\#1314](https://github.com/fission/fission/pull/1314) ([life1347](https://github.com/life1347))
- Fix potential nil pointer problem when using multierror pkg [\#1311](https://github.com/fission/fission/pull/1311) ([life1347](https://github.com/life1347))
- Use ErrorHandler to handle proxy error [\#1310](https://github.com/fission/fission/pull/1310) ([life1347](https://github.com/life1347))
- Integrate with Codecov [\#1308](https://github.com/fission/fission/pull/1308) ([life1347](https://github.com/life1347))
- Fix executor unable to list secrets/configmaps [\#1307](https://github.com/fission/fission/pull/1307) ([life1347](https://github.com/life1347))
- Add specialization timeout default value to CLI [\#1305](https://github.com/fission/fission/pull/1305) ([life1347](https://github.com/life1347))
- Update CHANGELOG for 1.5.0 [\#1304](https://github.com/fission/fission/pull/1304) ([life1347](https://github.com/life1347))
- Fission 1.5.0 [\#1303](https://github.com/fission/fission/pull/1303) ([life1347](https://github.com/life1347))
- Implement TLS authentication for kafka mqt [\#1300](https://github.com/fission/fission/pull/1300) ([vadasambar](https://github.com/vadasambar))
- Issue 1229: Function level timeout [\#1284](https://github.com/fission/fission/pull/1284) ([parauliya](https://github.com/parauliya))
- Fix kafka producer and consumer logs show empty objects [\#1281](https://github.com/fission/fission/pull/1281) ([vadasambar](https://github.com/vadasambar))
## [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))
- Include All Currently Supported Trigger Types [\#1043](https://github.com/fission/fission/pull/1043) ([gravypod](https://github.com/gravypod))
- 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:**
@@ -27,6 +482,7 @@ filename | sha256 hash
- 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:**
@@ -48,6 +504,7 @@ filename | sha256 hash
- 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:**
@@ -69,6 +526,7 @@ filename | sha256 hash
- 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:**
@@ -76,6 +534,7 @@ filename | sha256 hash
- 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:**
@@ -99,12 +558,12 @@ filename | sha256 hash
- 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))
@@ -125,6 +584,7 @@ filename | sha256 hash
- 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:**
@@ -132,6 +592,7 @@ filename | sha256 hash
- 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))
- Update formatting directive logic to unbreak tests [\#999](https://github.com/fission/fission/pull/999) ([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))
@@ -154,11 +615,11 @@ filename | sha256 hash
- 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))
@@ -178,6 +639,7 @@ filename | sha256 hash
- 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:**
@@ -200,6 +662,7 @@ filename | sha256 hash
- 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:**
@@ -235,6 +698,7 @@ filename | sha256 hash
- 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:**
@@ -249,6 +713,7 @@ filename | sha256 hash
- 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:**
@@ -260,6 +725,7 @@ filename | sha256 hash
- 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:**
@@ -289,6 +755,7 @@ filename | sha256 hash
- 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:**
@@ -309,6 +776,7 @@ filename | sha256 hash
- 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:**
@@ -335,6 +803,7 @@ filename | sha256 hash
- 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:**
@@ -352,6 +821,7 @@ filename | sha256 hash
- 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:**
@@ -371,7 +841,8 @@ filename | sha256 hash
- 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)
[Full Changelog](https://github.com/fission/fission/compare/latest...0.6.1)
**Merged pull requests:**
@@ -387,27 +858,13 @@ filename | sha256 hash
- 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)
[Full Changelog](https://github.com/fission/fission/compare/0.6.0...latest)
## [0.6.0](https://github.com/fission/fission/tree/0.6.0) (2018-03-01)
[Full Changelog](https://github.com/fission/fission/compare/0.5.0...0.6.0)
**Merged pull requests:**
@@ -422,8 +879,22 @@ filename | sha256 hash
- 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))
- 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))
## [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:**
@@ -439,6 +910,7 @@ filename | sha256 hash
- 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))
- use time.Since instead of time.Now\(\).Sub [\#449](https://github.com/fission/fission/pull/449) ([wgliang](https://github.com/wgliang))
- 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))
@@ -454,12 +926,12 @@ filename | sha256 hash
- 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))
@@ -483,6 +955,7 @@ filename | sha256 hash
- Executor abstraction [\#384](https://github.com/fission/fission/pull/384) ([vishal-biyani](https://github.com/vishal-biyani))
## [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:**
@@ -495,6 +968,7 @@ filename | sha256 hash
- 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:**
@@ -509,6 +983,7 @@ filename | sha256 hash
- 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:**
@@ -519,6 +994,7 @@ filename | sha256 hash
- 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:**
@@ -528,17 +1004,16 @@ filename | sha256 hash
- 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))
- Multiple Trigger Definitions Fix [\#341](https://github.com/fission/fission/pull/341) ([jsturtevant](https://github.com/jsturtevant))
- 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:**
@@ -554,6 +1029,7 @@ filename | sha256 hash
- 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:**
@@ -562,9 +1038,11 @@ filename | sha256 hash
- 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:**
@@ -576,6 +1054,7 @@ filename | sha256 hash
- 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:**
@@ -610,6 +1089,7 @@ filename | sha256 hash
- 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:**
@@ -619,6 +1099,7 @@ filename | sha256 hash
- 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:**
@@ -657,7 +1138,7 @@ filename | sha256 hash
- 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) ([ssudake21](https://github.com/ssudake21))
- 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))
@@ -678,11 +1159,12 @@ filename | sha256 hash
- 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) ([ssudake21](https://github.com/ssudake21))
- 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))
## [alpha20170124](https://github.com/fission/fission/tree/alpha20170124) (2017-01-24)
[Full Changelog](https://github.com/fission/fission/compare/kubecon...alpha20170124)
**Merged pull requests:**
@@ -723,6 +1205,9 @@ filename | sha256 hash
- 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)
[Full Changelog](https://github.com/fission/fission/compare/90c14cfa0808aa1d63ea55ad87bee0f651f45091...kubecon)
**Merged pull requests:**
- Reap idle pods [\#20](https://github.com/fission/fission/pull/20) ([soamvasani](https://github.com/soamvasani))
+1 -1
View File
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at codeofconduct@platform9.com. All
reported by contacting the project team at slack channel. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
+224 -31
View File
@@ -1,46 +1,239 @@
# Contributing to Fission
### Thank you!
Thanks for helping make Fission better😍!
Thank you for taking the time and effort to contribute to Fission!
There are many areas we can use contributions - ranging from code, documentation, feature proposals, issue triage, samples, and content creation.
First, please read the [code of conduct](CODE_OF_CONDUCT.md). By
participating, you're expected to uphold this code.
First, please read the [code of conduct](CODE_OF_CONDUCT.md). By participating, you're expected to uphold this code.
### Choose something to work on
Table of Contents
=================
The easiest way to start is to look at existing
[issues](https://github.com/fission/fission/issues) and see if there's
something there that you'd like to work on.
* [Choose something to work on](#choose-something-to-work-on)
* [Get Help.](#get-help)
* [Contributing - building &amp; deploying](#contributing---building--deploying)
* [Prerequisite](#prerequisite)
* [Getting Started](#getting-started)
* [Use Skaffold with Kind/K8S Cluster to build and deploy](#use-skaffold-with-kindk8s-cluster-to-build-and-deploy)
* [Validating Installation](#validating-installation)
* [Understanding code structure](#understanding-code-structure)
* [cmd](#cmd)
* [pkg](#pkg)
* [Charts](#charts)
* [Environments](#environments)
Also, if you're familiar with a language that we don't support today,
adding an environment for a new language is a good task to take on.
Take a look at the Python environment as an example.
# Choose something to work on
If you're interested in working on something that doesn't have an
existing issue, feel free to file a new one.
* The easiest way to start is to look at existing [issues](https://github.com/fission/fission/issues) and see if there's something there that you'd like to work on. You can filter issues with label "[Good first issue](https://github.com/fission/fission/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)" which are relatively self sufficient issues and great for first time contributors.
- If you are going to pick up an issue, it would be good to add a comment stating the intention.
- If the contribution is a big change/new feature, please raise an issue and discuss the needs, design in the issue in detail.
There's plenty of stuff to do. If you need help choosing something to
work on, we'll be happy to suggest something depending on your
interests.
* For contributing a new Fission environment, please check the [environments repo](https://github.com/fission/environments)
### Talk to people
* For contributing a new Keda Connector, please check the [Keda Connectors repo](https://github.com/fission/keda-connectors)
At any point, from thinking about contributing to merging your
changes, please feel free to reach out to us! We're more than happy
to talk.
If you choose a big chunk of work that involves design changes to
Fission, please talk to us while planning the change; that way we can
all be on the same page before you invest too much work into it.
### Get Help.
* Drop by the [slack channel](http://slack.fission.io)
Do reach out on Slack or Twitter and we are happy to help.
* Drop by the [slack channel](http://slack.fission.io).
* Say hi on [twitter](https://twitter.com/fissionio).
* Email soamvasani@platform9.com
### Contribution Howto
* Fork this github repo
* Make a branch in your fork
* Commit your changes to that branch
* Create a pull request
# Contributing - building & deploying
## Prerequisite
- You'll need the `go` compiler and tools installed. Currently version 1.12.x of Go is needed.
- You'll also need [docker](https://docs.docker.com/install) for building images locally.
- You will need a Kubernetes cluster and you can use one of options from below.
- [Minikube](https://github.com/kubernetes/minikube)
- [Kind](https://kind.sigs.k8s.io/)
- Cluster in cloud such as GKE (Google Kubernetes Engine cluster)/ EKS (Elastic Kubernetes Service)/ AKS (Azure Kubernetes Service)
- Kubectl and Helm installed.
- [Skaffold](https://skaffold.dev/docs/install/) for local development workflow to make it easier to build and deploy Fission.
- And of course some basic concepts of Fission such as environment, function are good to be aware of!
## Getting Started
Get the code locally and after you have made changes - you can verify formatting and other basic checks.
```sh
# Clone the repo
$ git clone https://github.com/fission/fission.git $GOPATH/src/github.com/fission/fission
$ cd $GOPATH/src/github.com/fission/fission
$ go mod vendor
# Run checks on your changes
$ ./hack/verify-gofmt.sh
$ ./hack/verify-govet.sh
```
### Use Skaffold with Kind/K8S Cluster to build and deploy
You should bring up Kind/Minikube cluster or if using a cloud provider cluster then Kubecontext should be pointing to appropriate cluster.
* For building & deploying to Cloud Provider K8S cluster such as GKE/EKS/AKS:
```
$ skaffold config set default-repo vishalbiyani // (vishalbiyani - should be your registry/Docker Hub handle)
$ skaffold run
```
* For building & deploying to Kind cluster use Kind profile
```
$ kind create cluster
$ kubectl create ns fission
$ skaffold run -p kind
```
## Validating Installation
If you are using Helm, you should see release installed:
```
helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
fission fission 1 2020-05-19 16:31:46.947562 +0530 IST success fission-all-1.11.0 1.11.0
```
Also you should see the Fission services deployed and running:
```
$ kubectl get pods -n fission
NAME READY STATUS RESTARTS AGE
buildermgr-6f778d4ff9-dqnq5 1/1 Running 0 6h9m
controller-d44bd4f4d-5q4z5 1/1 Running 0 6h9m
executor-557c68c6fd-dg8ld 1/1 Running 0 6h9m
influxdb-845548c959-2954p 1/1 Running 0 6h9m
kubewatcher-5784c454b8-5mqsk 1/1 Running 0 6h9m
logger-bncqn 2/2 Running 0 6h9m
mqtrigger-kafka-765b674ff-jk5x9 1/1 Running 0 6h9m
mqtrigger-nats-streaming-797498966c-xgxmk 1/1 Running 3 6h9m
nats-streaming-6bf48bccb6-fmmr9 1/1 Running 0 6h9m
router-db76576bd-xxh7r 1/1 Running 0 6h9m
storagesvc-799dcb5bdf-f69k9 1/1 Running 0 6h9m
timer-7d85d9c9fb-knctw 1/1 Running 0 6h9m
```
## Understanding code structure
### cmd
`cmd` package is entry point for all runtime components and also has Dockerfile for each component. The actual logic here will be pretty light and most of logic of each component is in `pkg` (Discussed later)
| Component | Runtime Component |Used in|
| :------------- |:------------- |:-|
| fetcher | Docker Image |Environments|
| fission-bundle | Docker Image |Binary for all components|
| fission-cli | CLI Binary |CLI by user|
| preupgradechecks | Docker Image |Pre-install upgrade|
```
.
cmd
├── fetcher
│   ├── Dockerfile.fission-fetcher
│   ├── app
│   └── main.go
├── fission-bundle
│   ├── Dockerfile.fission-bundle
│   ├── main.go
│   └── mqtrigger
├── fission-cli
│   ├── app
│   ├── fission-cli
│   └── main.go
└── preupgradechecks
├── Dockerfile.fission-preupgradechecks
├── main.go
└── preupgradechecks.go
```
**fetcher** : is a very lightweight component and all of related logic is in fetcher package itself. Fetcher helps in fetching and uploading code and in specializing environments.
**fission-bundle** : is a component which is a single binary for all components. Based on arguments you pass to fission-bundle - it becomes that component. For ex.
```
/fission-bundle --controllerPort "8888" # Runs Controller
/fission-bundle --kubewatcher --routerUrl http://router.fission # Runs Kubewatcher
```
So most server side components running on server side are fission-bundle binary wrapped in container and used with different arguments. Various arguments and environment variables are passed from manifests/helm chart
**fission-cli** : is the cli used by end user to interact Fission
**preupgradechecks** : is again a small independent component to do pre-install upgrade tasks.
### pkg
Pkg is where most of core components and logic reside. The structure is fairly self-explanatory for example all of executor related functionality will be in executor package and so on.
```
.
├── pkg
│   ├── apis
│   ├── builder
│   ├── buildermgr
│   ├── cache
│   ├── canaryconfigmgr
│   ├── controller
│   ├── crd
│   ├── error
│   ├── executor
│   ├── fetcher
│   ├── fission-cli
│   ├── generator
│   ├── info
│   ├── kubewatcher
│   ├── logger
│   ├── mqtrigger
│   ├── plugin
│   ├── publisher
│   ├── router
│   ├── storagesvc
│   ├── throttler
│   ├── timer
│   └── utils
```
### Charts
Fission currently has two charts - and we recommend using fission-all for development.
```
.
├── charts
│   ├── README.md
│   ├── fission-all
│   └── fission-core
```
### Environments
Each of runtime environments is in fission/environments repo and fairly independent. If you are enhancing or creating a new environment - most likely you will end up making changes in that repo.
```
.
├── environments
│   ├── binary
│   ├── dotnet
│   ├── dotnet20
│   ├── go
│   ├── jvm
│   ├── nodejs
│   ├── perl
│   ├── php7
│   ├── python
│   ├── ruby
│   └── tensorflow-serving
```
+150 -94
View File
@@ -1,105 +1,186 @@
# A high-level view of the internals of Fission.
A high level view of the internals of Fission.
How it works
============
## How it works
Fission is a FaaS -- users create functions (source level), register
them with fission using a CLI, and associate functions with triggers.
them with Fission using a CLI, and associate functions with triggers.
Fission wraps those functions into a service, and runs them on
Fission wraps those functions into a service and runs them on
Kubernetes on demand.
Here's an overview of the services that make up fission.
Here's an overview of the services that make up Fission.
Components
==========
## Components
Language-neutral components:
Core Components:
* Controller
* Executor
* Environment Container (language-specific)
* Router
* Builder Manager
* Storage Service
* controller
* poolmgr
* router
* kubewatcher
Optional Components:
* Logger
* Kubewatcher
* Message Queue Trigger
* Timer
Language-specific components:
Third-party components:
* InfluxDB: To store function logs.
* Prometheus: For metric collection and canary deployment.
* NATS Streaming: For message queue trigger. (Kafka, Azure are not included in charts deployment.)
* Environment container(s)
## Core Components
### Controller
Controller
----------
The controller contains CRUD APIs for functions, triggers, environments,
Kubernetes event watches, etc. This is the component that the client talks to.
The controller contains CRUD APIs for functions, http triggers,
environments, Kubernetes event watches. This is the component that
the client talks to.
All fission resources are stored in kubernetes CRDs. It needs to be able to
talk to kubernetes API service.
This is the only stateful component. It needs to be configured with a
URL to an etcd cluster and a path to a persistent volume. The volume
is used to store the functions' source code. Etcd is used as the DB.
### Executor
[Work to extend to other storage backends is planned, see issue #83.]
The executor has two simple APIs; the router calls both these endpoints.
Pool Manager
------------
* GetFunctionService takes function metadata and dispatches the corresponding executor
type to get the address of a service/pod and returns it to the router.
* TapService lets executor know a service/pod is being used; if it's not
called for a few minutes the pod(s) backing the service are killed.
Poolmgr manages pools of generic containers and function containers.
It now supports two different executor types:
It has a simple API; both these endpoints are called by the router.
* PoolManager
* NewDeploy
* GetFunctionService takes function metadata and returns the address
of a service.
* TapService lets poolmgr know a service is being used; if it's not
called for a few minutes the pod(s) backing the service are killed.
These two executor types have different strategies to launch, specialize, and manage pod(s).
You should choose one of the executor types wisely based on the scenario.
Poolmgr watches the controller API and eagerly creates generic pools
for environments. It uses Kubernetes deployments to do that. The
environment container runs in a pod with the 'fetcher' container.
Fetcher is a very simple utility that downloads a URL sent to it and
saves it at a configured location.
#### PoolManager
GetFunctionService "specializes" a pod. The implementation chooses a
pod from the pool, relabels it to "orphan" the pod from the
deployment, invokes fetcher to copy the function into the pod, and
hits the the specialize endpoint on the environment container. This
causes the function to be loaded. The pod is now specific to that
function.
PoolManager manages pools of generic containers and function containers.
This function pod is cached; it's cleaned up if it's unused for a few
minutes.
PoolManager watches the environment CRD changes and eagerly creates generic pools
for environments. It uses Kubernetes deployments to do that. The
environment container runs in a pod with the 'fetcher' container.
Fetcher is a straightforward utility that downloads a URL sent to it
and saves it at a configured location (shared volume).
Router
------
The implementation chooses a generic pod from the pool, relabels it to
"orphan". The pod from the deployment invokes fetcher to copy the function
into the pod and hits the specialize endpoint on the environment container.
This causes the function to be loaded. The pod is now specific to that
function. This function pod is cached; it's cleaned up if it's unused for a few minutes.
The router forwards HTTP requests to function pods. If there's no
running service for a function, it requests one from poolmgr, while
holding on to the request; when the function's service is ready it
forwards the request.
PoolManager selects a generic pod from the warm pool, specializes it,
and recycles the pod if there are no further requests to the function after a few minutes.
It makes PoolManager suitable for functions that are short-living
and requires a short cold start time [1].
The router is stateless and can be scaled up if needed, according to
However, PoolManager only selects one pod per function, which is not
suitable for serving massive traffic. In such cases, you should consider
using NewDeploy as executor type of function.
[1] The cold start time depends on the package size of the function. If it's
a snippet of code, the cold start time usually is less then 100ms.
#### NewDeploy
NewDeploy creates deployment, service, and HPA for functions in order to handle
massive traffic.
NewDeploy watches the function CRD changes and creates a Kubernetes deployment,
service, and HPA for a function. NewDeploy will scale the replicas of a function
deployment to the minimum feasible scale setting, if the minimum scale setting of
a function is greater than 0. The 'fetcher' inside the pod uses a URL in the
JSON payload, which is attached as a parameter to start fetcher, to download the
function package instead of waiting for calls from NewDeploy.
When a function experiences a traffic spike, the service helps to distribute the requests to
pods belonging to the function for better workload distribution and lower latency. Also,
the HPA scales the replicas of the deployment based on the conditions set by the user.
This approach though increases the cold time of a function, but also makes NewDeploy
suitable for functions designed to serve massive traffic.
### Environment Container
Environment containers run user-defined functions and are language-specific.
Each environment container must contain an HTTP server and a loader for functions.
The pool manager 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 in that coding language.
When the pool manager needs to create a service for a function, it calls
fetcher to fetch the function. Fetcher downloads the function into a
volume shared between fetcher and this environment container. Poolmgr
then requests the container to load the function.
### Router
The router forwards HTTP requests to function pods. If there's no
running service for a function, it requests one from executor, while
holding on to the request; the router will forward the request to
the pod once the function service is ready.
The router is the only stateless component and can be scaled up if needed, according to
load.
Kubewatcher
-----------
### Builder Manager
The builder manager watches the package & environments CRD changes and manages
the builds of function source code. Once an environment that contains a builder
image is created, the builder manager will then creates the Kubernetes service
and deployment under the fission-builder namespace to start the environment
builder. And once a package that contains a source archive is created, the
builder manager talks to the environment builder to build the function's source
archive into a deploy archive for function deployment.
After the build, the builder manager asks Builder to upload the deploy archive to the
Storage Service once the build succeeded, and updates the package status attached with build logs.
### Storage Service
The storage service is the home for all archives of packages with sizes larger than 256KB.
The Builder pulls the source archive from the storage service and uploads deploy archive to it.
The fetcher inside the function pod also pulls the deploy archive for function specialization.
## Optional Components
### Logger
Logger is deployed as DaemonSet to help to forward function logs to a centralized
database service for log persistence. Currently, only InfluxDB is supported to store logs.
Following is a diagram describe how log service works:
1. Logger watches pod changes and creates a symlink to the container log if the pod runs on the same node.
2. Fluentd reads logs from symlink and pipes them to InfluxDB
3. `fission function logs ...` retrieve event logs from InfluxDB with optional log filter
4. Logger removes the symlink if the pod no longer exists.
### Kubewatcher
Kubewatcher watches the Kubernetes API and invokes functions
associated with watches, sending the watch event to the function.
The controller keeps track of user's requested watches and associated
functions. Kubewatcher watches the API based on these requests; when
The controller keeps track of the user's requested watches and associated
functions. Kubewatcher watches the API based on these requests; when
a watch event occurs, it serializes the object and calls the function
via the router.
While a few simple retries are done, there isn't yet a reliable
message bus between Kubewatcher and the function. Work for this is
message bus between Kubewatcher and the function. Work for this is
tracked in issue #64.
Message Queue Trigger
---------------------
### Message Queue Trigger
A message queue trigger binds a message queue topic to a function:
events from that topic cause the function to be invoked with the
Events from that topic cause the function to be invoked with the
message as the body of the request. The trigger may also contain a
response topic: if specified, the function's output is sent to this
response.
@@ -108,37 +189,12 @@ Here's a diagram of the components:
![Message queue trigger Diagram](https://user-images.githubusercontent.com/202578/27012344-9457cb24-4f00-11e7-8d6b-926ff01637b3.jpg)
Environment Container
---------------------
### Timer
Environment containers run user-defined functions. Environment
containers are language specific. Each environment container must
contain an HTTP server and a loader for functions.
The timer works like kubernetes CronJob but instead of creating a pod to do the task,
it sends a request to router to invoke the function. It's suitable for the background tasks that
need to executor periodically.
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 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
volume shared between fetcher and this environment container. Poolmgr
then requests the container to load the function.
Logger
------
Logger helps to forward function logs to centralized db service for log
persistence. Currently only influxdb is supported to store logs.
Following is a diagram describe how log service works:
![Logger Diagram](https://cloud.githubusercontent.com/assets/202578/23100399/b0e3ea00-f6ba-11e6-8f2f-6588cfef2e84.png)
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
4. `fission function logs ...` retrieve event logs from influxdb with
optional log filter
5. Pool manager removes function pod from pool
6. Pool manager asks logger helper to stop piping logs, logger removes symlink.
The timer works like a Kubernetes CronJob, but instead of creating a
pod to do the task, it sends a request to the router to invoke the
function. It is suitable for background tasks that need to execute periodically.
+55
View File
@@ -0,0 +1,55 @@
# BUILDING MULTI-ARCHITECTURE IMAGES
While the Docker images for Fission can be built by running:
```
make image
```
the stable images are build for multiple architectures (and automatically pushed to the repository) by
```
make images-multiarch
```
However, there are several options and requirements for building these images, which are explained here.
## BUILDERS
We use `docker buildx` to build images for multiple architectures. At the moment, this is considered an
experimental feature by Docker, and as such it requires access to experimental features to be enabled
in the daemon.json file.
By default, this will use BuildKit and QEMU emulation support to build the image for each architecture
locally. However, for faster building, it is possible to use native nodes to build each architecture,
either simple remote Docker instances or a Kubernetes cluster. For information on how to set this up,
please see the blog article here:
<https://www.docker.com/blog/multi-arch-images/>
And/or the command reference here:
<https://docs.docker.com/engine/reference/commandline/buildx_create/>
## BUILD OPTIONS
### PLATFORMS
The PLATFORMS variable can be set to a comma-separated list of platforms for which images should be
built when running the multi-arch build. If unset, it defaults to _linux/amd64,linux/arm64,linux/arm_.
### REPOSITORY SELECTION
By default, the multi-arch build will automatically try to push the resulting images to the fission/*
repositories, under the dev tag; i.e. fission/fission-bundle:dev, fission/fetcher:dev, and
fission/builder:dev. However, for convenient, this can be customized by setting the REPO and TAG
environment variables to set a different repository prefix and tag for the images.
For example:
```
REPO=randomdev TAG=test make images-multiarch
```
would build and push the images randomdev/fission-bundle:test, randomdev/fetcher:test, and
randomdev/builder:test . Private Docker repositories can be used in the same manner.
+9 -9
View File
@@ -1,7 +1,7 @@
# 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.
It mandates that a function reference secrets, configmaps and its package (if explicitly referenced during function create/update operation) 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.
@@ -27,20 +27,20 @@ This SA is created in every namespace that a user creates builder environments i
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.
Every time a user creates a package explicitly in a namespace, this role binding 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 role binding.
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.
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 role binding.
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.
If users require strict isolation, they can either create functions with new deploy backend, or, create envs 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.
If the executor type is newdeploymgr, then the same role binding 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
@@ -51,7 +51,7 @@ $ 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)
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 objects are in ns3)
```bash
$ fission env create --name python-builder-env --builder fission/python-builder --image fission/python-env --ns3
@@ -62,5 +62,5 @@ $ 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.
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 privileges 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 privileges to see all of their secrets.
+1 -1
View File
@@ -20,5 +20,5 @@ documentation on the context object in each environment.
## Kubernetes Watch Event Triggers
Kubernetes watches can be used to trigger functions. These functions
Kubernetes watches can be used to trigger functions. These functions
receive the Kubernetes watch.Event object in JSON-serialized form.
+2 -2
View File
@@ -48,7 +48,7 @@ So we can write a simple logic - to check if a annotation is applicable for an i
### 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.
- One of the side effects 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
@@ -88,4 +88,4 @@ HTTPTriggerSpec struct {
## 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.
- 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.
+3 -3
View File
@@ -57,7 +57,7 @@ If we look at this from CI/CD perspective this process requires:
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.
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.
@@ -90,7 +90,7 @@ Without changing anything in Fission spec it is possible to change these things
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.
For environment specific configurations, it is possible to use some sort of templates 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
@@ -98,4 +98,4 @@ This necessarily does not fall in the area of Fission per se but it would be fai
## 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.
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.
+1 -1
View File
@@ -125,4 +125,4 @@ 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.
development and maintenance cost IMO. If needed we could explore this option (or some hybrid option) in the future.
+2 -2
View File
@@ -46,8 +46,8 @@ directory (in case of deployment packages).
The load request may contain an EntryPoint. If it does, the loader
must interpret this; usually it's the name of a function in a module
or package containing multiple functions. If there is no entrypoint,
the environment must use a default; again, the value of thsi default
or package containing multiple functions. If there is no entry point,
the environment must use a default; again, the value of this default
is environment-specific.
The load request may contain a URL. If it does, requests to that URL
+5 -5
View File
@@ -52,11 +52,11 @@ container.
### Discussion
Early feedback shows that almost evey user ends up rebuilding images
to add some dependecies. Some sort of automated dependecy resolution
to add some dependencies. Some sort of automated dependency resolution
would be very nice to have and improve the development workflow. In
other words, just attach a package.json(nodejs) or
requirements.txt(python) with a function, and fission will do the
rest. There's also the possiblity of supporting buildpacks (simple
rest. There's also the possibility of supporting buildpacks (simple
zipfiles), a la AWS Lambda.
Though we can support compiled languages by doing the compilation
@@ -82,7 +82,7 @@ use environments, I've already packaged up my function, here it is".
Roughly in order of priority:
0. Retain the simplicity of the simple use cases. First user
experience shoud remain trivial -- write a function, map a URL,
experience should remain trivial -- write a function, map a URL,
done.
1. Support compiled languages. Support error reporting on function
@@ -91,7 +91,7 @@ Roughly in order of priority:
2. Support functions as a collection of files rather than just one
file.
3. Support automated environment-specific dependecy resolution.
3. Support automated environment-specific dependency resolution.
(#3 may end up having the same solution as #1. You could think of
gathering deps as a "compilation" of package.json,
@@ -297,7 +297,7 @@ affinity rule, but k8s services only support IP based affinity.]
#### Poolmgr
Poolmgr remains relatively unchanged. Instead of contructing URLs for
Poolmgr remains relatively unchanged. Instead of constructing URLs for
function metadata, it uses the deployment package URL in the function
object.
+2 -2
View File
@@ -9,7 +9,7 @@ A new layer - executor now sits between the router and actual backends are respo
# 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:
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 the backends. As of this writing there are two backends which are described as:
### Pool Manager Backend
@@ -21,7 +21,7 @@ New Deploy backend create a Kubernetes deployment, a Kubernetes Service for a gi
### 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.
While this is still a WIP, parameters that affect execution behavior of function are based on `InvokeStrategy`. A invoke strategy defines the `strategyType` and actual strategy parameters encapsulated in the strategy object.
```
InvokeStrategy struct {
+3 -3
View File
@@ -8,7 +8,7 @@ This document documents the design and thoughts that lead to design of Java envi
- 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
- A large percentage of enterprise 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
@@ -31,7 +31,7 @@ Now - the T & R could be different things and we discuss some options below:
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.
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 response: function can send the body but looses control over status code etc.
### HttpServletRequest and HttpServletResponse
@@ -64,4 +64,4 @@ The Spring cloud function project also discusses the issue of not having access
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)
- 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)
+9 -9
View File
@@ -9,7 +9,7 @@ Most of current integration tests are CLI driven. Fission CLI is used to test ex
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.
Separating 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:
@@ -36,7 +36,7 @@ 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"},
binary: {"fission/binary-env", "test/hello.sh", "/hellobinary"},
}
```
@@ -63,7 +63,7 @@ The ability to have clean and separate before and after blocks, apart from separ
- 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.
Over a period of time as tests grow, there will be unit, smoke, integration, performance, soak tests and so on. Ability to run a particular 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
@@ -74,7 +74,7 @@ It would be good to have cleaner/relevant logging as part of build & test. For e
It would be good to be able to run tests in parallel.
## Evalutaing the tools/alternatives
## Evaluating 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.
@@ -111,7 +111,7 @@ 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.
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 programmability of Go language.
```
func TestSomething(t *testing.T) {
@@ -135,7 +135,7 @@ Ginkgo is a BDD framework which works with Gomega matcher library. I will state
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.
- For tests `BeforeEach` and `AfterEach` and more such variants to do before and after test tasks.
From Gomega:
@@ -180,7 +180,7 @@ Eventually(session.Out).Should(gbytes.Say("hello [A-Za-z], world"))
```
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.
- We can build custom matchers in Go language for reusable logic.
#### Links
Ginkgo: http://onsi.github.io/ginkgo/
@@ -199,11 +199,11 @@ Based on the discussion with team, here are current thoughts and next action ite
- 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.
- 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 demarcation.
## 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
- Hashicorp's Mitchell's talk on Advanced testing with go talks about some good patterns to use: https://www.youtube.com/watch?v=8hQG7QlcLBk
+112 -22
View File
@@ -11,36 +11,126 @@
# 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
.DEFAULT_GOAL := check
test:
go test -v $(go list ./... | grep -v /examples/ | grep -v /environments/)
# Platforms to build in multi-architecture images.
PLATFORMS ?= linux/amd64,linux/arm64,linux/arm/v7
build: build-bundle build-client
# Repository prefix and tag to push multi-architecture images to.
REPO ?= fission
TAG ?= dev
DOCKER_FLAGS ?= --push --progress plain
build-client:
go build -o cmd/fission-cli/fission ./cmd/fission-cli/
VERSION ?= master
TIMESTAMP ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
COMMITSHA ?= $(shell git rev-parse HEAD)
build-bundle:
CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o cmd/fission-bundle/fission-bundle ./cmd/fission-bundle/
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
build-image:
docker build --rm --tag "$(IMAGE):$(VERSION)" cmd/fission-bundle/
BINDIR ?= build/bin
FISSION-CLI-SUFFIX :=
ifeq ($(GOOS), windows)
FISSION-CLI-SUFFIX := .exe
endif
install:
go install ./cmd/fission-cli/
GO ?= go
GO_LDFLAGS := -X github.com/fission/fission/pkg/info.GitCommit=$(COMMITSHA) $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/fission/fission/pkg/info.BuildDate=$(TIMESTAMP) $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/fission/fission/pkg/info.Version=$(VERSION) $(GO_LDFLAGS)
GCFLAGS ?= all=-trimpath=$(CURDIR)
ASMFLAGS ?= all=-trimpath=$(CURDIR)
image: build-bundle build-image
### Static checks
check: test-run build-fission-cli clean
image-push: image
docker push "$(IMAGE):$(VERSION)"
code-checks:
hack/verify-gofmt.sh
hack/verify-govet.sh
hack/verify-staticcheck.sh
# run basic check scripts
test-run: code-checks
hack/runtests.sh
@rm -f coverage.txt
### Binaries
fission-cli:
@mkdir -p $(BINDIR)
GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO) build \
-gcflags '$(GCFLAGS)' \
-asmflags '$(ASMFLAGS)' \
-ldflags "$(GO_LDFLAGS)" \
-o $(BINDIR)/fission-$(VERSION)-$(GOOS)-$(GOARCH)$(FISSION-CLI-SUFFIX) ./cmd/fission-cli
all-fission-cli:
$(MAKE) fission-cli GOOS=windows GOARCH=amd64
$(MAKE) fission-cli GOOS=linux GOARCH=amd64
$(MAKE) fission-cli GOOS=linux GOARCH=arm
$(MAKE) fission-cli GOOS=linux GOARCH=arm64
$(MAKE) fission-cli GOOS=darwin GOARCH=amd64
install-fission-cli: fission-cli
mv $(BINDIR)/fission-$(VERSION)-$(GOOS)-$(GOARCH)$(FISSION-CLI-SUFFIX) /usr/local/bin/
### Container images
FISSION_IMGS := fission-bundle-multiarch-img \
fetcher-multiarch-img \
builder-multiarch-img\
pre-upgrade-checks-multiarch-img \
reporter-multiarch-img
verify-builder:
@./hack/buildx.sh $(PLATFORMS)
local-images:
PLATFORMS=linux/amd64 $(MAKE) all-images
all-images: verify-builder $(FISSION_IMGS)
fission-bundle-multiarch-img: cmd/fission-bundle/Dockerfile.fission-bundle
fetcher-multiarch-img: cmd/fetcher/Dockerfile.fission-fetcher
builder-multiarch-img: cmd/builder/Dockerfile.fission-builder
pre-upgrade-checks-multiarch-img: cmd/preupgradechecks/Dockerfile.fission-preupgradechecks
reporter-multiarch-img: cmd/reporter/Dockerfile.reporter
%-multiarch-img:
@echo === Building image $(REPO)/$(subst -multiarch-img,,$@):$(TAG) using context $(CURDIR) and dockerfile $<
docker buildx build --platform=$(PLATFORMS) -t $(REPO)/$(subst -multiarch-img,,$@):$(TAG) \
--build-arg GITCOMMIT=$(COMMITSHA) \
--build-arg BUILDDATE=$(TIMESTAMP) \
--build-arg BUILDVERSION=$(VERSION) \
$(DOCKER_FLAGS) -f $< .
### CRDs
generate-crds:
controller-gen crd:trivialVersions=false,preserveUnknownFields=false \
paths=./pkg/apis/core/v1 \
output:crd:artifacts:config=crds/v1
create-crds:
@kubectl create -k crds/v1
update-crds:
@kubectl replace -k crds/v1
delete-crds:
@kubectl delete -k crds/v1
### Cleanup
clean:
@rm -f fission-bundle/fission-bundle
@rm -f fission/fission
@rm -f cmd/fission-bundle/fission-bundle
@rm -f cmd/fission-cli/fission
@rm -f cmd/fetcher/fetcher
@rm -f cmd/fetcher/builder
@rm -f cmd/reporter/reporter
@rm -f pkg/apis/core/v1/types_swagger_doc_generated.go
### Misc
generate-swagger-doc:
@cd pkg/apis/core/v1/tool && ./update-generated-swagger-docs.sh
make release:
@./hack/release.sh $(VERSION)
@./hack/releas-tag.sh $(VERSION)
+76 -63
View File
@@ -1,10 +1,24 @@
Fission: Serverless Functions for Kubernetes
============================================
[![Build Status](https://travis-ci.org/fission/fission.svg?branch=master)](https://travis-ci.org/fission/fission)
[![Go Report Card](https://goreportcard.com/badge/github.com/fission/fission)](https://goreportcard.com/report/github.com/fission/fission)
[![Fission Slack](http://slack.fission.io/badge.svg)](http://slack.fission.io)
<p align="center">
<img src="https://docs.fission.io/images/logo.png" width="300" />
<br>
<h1 align="center">Fission: Serverless Functions for Kubernetes</h1>
</p>
<p align="center">
<a href="https://github.com/fission/fission/actions?query=workflow%3A%22Fission+CI%22">
<img src="https://github.com/fission/fission/workflows/Fission%20CI/badge.svg?branch=master" alt="Build Status" />
</a>
<a href="https://goreportcard.com/report/github.com/fission/fission">
<img src="https://goreportcard.com/badge/github.com/fission/fission" alt="Go Report Card" />
</a>
<a href="https://codecov.io/gh/fission/fission">
<img src="https://codecov.io/gh/fission/fission/branch/master/graph/badge.svg" alt="codecov" />
</a>
<br>
<a href="http://fission.io">fission.io</a> | <a href="http://twitter.com/fissionio">@fissionio</a> | <a href="https://join.slack.com/t/fissionio/shared_invite/enQtOTI3NjgyMjE5NzE3LTllODJiODBmYTBiYWUwMWQxZWRhNDhiZDMyN2EyNjAzMTFiYjE2Nzc1NzE0MTU4ZTg2MzVjMDQ1NWY3MGJhZmE">Slack</a>
</p>
[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.
@@ -18,7 +32,21 @@ language-specific parts are isolated in something called
_environments_ (more below). Fission currently supports NodeJS, Python, Ruby, Go,
PHP, Bash, and any Linux executable, with more languages coming soon.
### Performance: 100msec cold start
Table of Contents
=================
* [Fission: Serverless Functions for Kubernetes](#fission-serverless-functions-for-kubernetes)
* [Performance: 100msec cold start](#performance-100msec-cold-start)
* [Kubernetes is the right place for Serverless](#kubernetes-is-the-right-place-for-serverless)
* [Getting Started](#getting-started)
* [Learn More](#learn-more)
* [Contributing](#contributing)
* [Get Help &amp; Community Meeting](#get-help--community-meeting)
* [Official Releases](#official-releases)
* [Sponsors](#sponsors)
* [Licensing](#licensing)
## Performance: 100msec cold start
Fission maintains a pool of "warm" containers that each contain a
small dynamic loader. When a function is first called,
@@ -26,7 +54,7 @@ i.e. "cold-started", a running container is chosen and the function is
loaded. This pool is what makes Fission fast: cold-start latencies
are typically about 100msec.
### Kubernetes is the right place for Serverless
## Kubernetes is the right place for Serverless
We're built on Kubernetes because we think any non-trivial app will
use a combination of serverless functions and more conventional
@@ -37,75 +65,60 @@ Building on Kubernetes also means that anything you do for operations
on your Kubernetes cluster &mdash; such as monitoring or log
aggregation &mdash; 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.
The following environments are currently available:
| Environment | Image |
| ------------------------------------ | ------------------------- |
| Binary (for executables or scripts) | `fission/binary-env` |
| Go | `fission/go-env` |
| JVM | `fission/jvm-env` |
| .NET | `fission/dotnet-env` |
| .NET 2.0 | `fission/dotnet20-env` |
| NodeJS (Alpine) | `fission/node-env` |
| NodeJS (Debian) | `fission/node-env-debian` |
| Perl | `fission/perl-env` |
| PHP 7 | `fission/php-env` |
| Python 3 | `fission/python-env` |
| Ruby | `fission/ruby-env` |
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
as of today supports [HTTP request](https://docs.fission.io/usage/trigger/#create-a-http-trigger), [timed](https://docs.fission.io/usage/trigger/#create-a-time-trigger), and [message queue](https://docs.fission.io/usage/trigger/#create-a-message-queue-trigger) triggers.
Usage
-----
## Getting Started
```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
# Create a function with a javascript one-liner that prints "hello world"
$ fission function create --name hello --env nodejs --code https://raw.githubusercontent.com/fission/examples/master/nodejs/hello.js
# Run the function. This takes about 100msec the first time.
$ fission function test --name hello
Hello, world!
```
See the [examples](examples) directory for more.
## Learn More
Running Fission on your Cluster
===============================
* Understand [Fission Concepts](https://docs.fission.io/docs/concepts/).
* See the [installation guide](https://docs.fission.io/docs/installation/) for installing and running Fission.
* You can learn more about Fission and get started from [Fission Docs](https://docs.fission.io/docs).
* See the [troubleshooting guide](https://docs.fission.io/docs/trouble-shooting/) for debugging your functions and Fission installation.
See the [installation guide](https://docs.fission.io/installation/).
## Contributing
Compiling Fission
=================
Check out the [contributing guide](CONTRIBUTING.md).
See the [compilation guide](https://docs.fission.io/contributing/).
## Get Help & Community Meeting
Reach us on [slack](http://slack.fission.io) or
[twitter](https://twitter.com/fissionio).
Fission is a project by [many contributors](https://github.com/fission/fission/graphs/contributors).
Reach us on [slack](https://join.slack.com/t/fissionio/shared_invite/enQtOTI3NjgyMjE5NzE3LTllODJiODBmYTBiYWUwMWQxZWRhNDhiZDMyN2EyNjAzMTFiYjE2Nzc1NzE0MTU4ZTg2MzVjMDQ1NWY3MGJhZmE) 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).
A regular community meeting takes place every other Thursday at 09:00 AM PT (Pacific Time). [Convert to your local timezone](http://www.thetimezoneconverter.com/?t=09:00&tz=PT%20%28Pacific%20Time%29).
Meeting Link: https://zoom.us/j/413921817
The meeting agenda for next meeting and notes from past meetings are maintained in [this document](https://docs.google.com/document/d/1E-xw4KJgka4sUpETHxr9BJBYntzrtxlAN_CE3Wt8kws). You are welcome to join to discuss direction of project, design and implementation reviews and general questions about project etc.
## 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.
## Sponsors
The following companies, organizations, and individuals support Fission's ongoing maintenance and development. If you are using/contributing to Fission, we would be happy to list you here, please raise a Pull request.
<p>
<a href="https://infracloud.io/"><img src="https://fission.io/sponsors/infracloud.png" alt="InfraCloud" height="70"></a>
<a href="https://srcmesh.com/"><img src="https://fission.io/sponsors/srcmesh.png" alt="Srcmesh" height="70"></a>
<a href="https://www.digitalocean.com/?utm_medium=opensource&utm_source=fissionio">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg" width="201px">
</a>
</p>
# Licensing
Fission is under the Apache 2.0 license.
+24 -6
View File
@@ -5,7 +5,7 @@
## Prerequisites
- Kubernetes 1.6 or later
- Kubernetes 1.9 or later
## Helm charts
@@ -43,10 +43,10 @@ Parameter | Description | Default
`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.2.1`
`imageTag` | Fission image tag | `1.13.0`
`pullPolicy` | Image pull policy | `IfNotPresent`
`fetcherImage` | Fission fetcher repository | `fission/fetcher`
`fetcherImageTag` | Fission fetcher image tag | `1.2.1`
`fetcher.image` | Fission fetcher repository | `fission/fetcher`
`fetcher.imageTag` | Fission fetcher image tag | `1.13.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`
@@ -62,9 +62,23 @@ Parameter | Description | Default
`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`
`prometheus.enabled` | Set to true if prometheus needs to be deployed along with fission | `true` in `fission-all`, `false` in `fission-core`
`prometheus.serviceEndpoint` | If prometheus.enabled is false, please assign the prometheus service URL that is accessible by components. | `nil`
`canaryDeployment.enabled` | Set to true if you need canary deployment feature | `true` in `fission-all`, `false` in `fission-core`
`extraCoreComponmentPodConfig` | Extend the container specs for the core fission pods. Can be used to add things like affinty/tolerations/nodeSelectors/etc. | None
`extraCoreComponentPodConfig` | Extend the container specs for the core fission pods. Can be used to add things like affinty/tolerations/nodeSelectors/etc. | None
`executor.adoptExistingResources` | If true, executor will try to adopt existing resources created by the old executor instance. | `false`
`router.deployAsDaemonSet` | Deploy router as DaemonSet instead of Deployment | `false`
`router.extraCoreComponentPodConfig` | Extend the container specs for the router fission pods. Can be used to add things like affinty/tolerations/nodeSelectors/etc. Overrides the generic `extraCoreComponentPodConfig`| None
`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.traceSamplingRate` | Uniformly sample traces with the given probabilistic sampling rate | `0.5`
`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`
@@ -76,8 +90,12 @@ Parameter | Description | Default
`logger.fluentdImage` | Logger fluentbit image | `fluent/fluent-bit`
`logger.fluentdImageTag` | Logger fluentbit image tag | `1.0.4`
`nats.enabled` | Nats streaming enabled | `true`
`nats.external` | Use external Nats installation | `false`
`nats.hostaddress` | Address of NATS cluster | `nats-streaming:4222`
`nats.authToken` | Nats streaming auth token | `defaultFissionAuthToken`
`nats.clusterID` | Nats streaming clusterID | `fissionMQTrigger`
`nats.clientID` | Client name registered with nats streaming | `fission`
`nats.queueGroup` | Queue group registered with nats streaming | `fission-messageQueueNatsTrigger`
`natsStreamingPort` | Nats streaming service port | `31316`
`azureStorageQueue.enabled` | Azure storage account name | `false`
`azureStorageQueue.key` | Azure storage account name | `""`
+6
View File
@@ -0,0 +1,6 @@
dependencies:
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 13.2.1
digest: sha256:136360a97bdc11f1933d75bab77728acc75dd9583257b973cb3336b6d136c9b6
generated: "2021-05-27T18:51:04.509283+05:30"
+14 -8
View File
@@ -1,15 +1,21 @@
apiVersion: v1
apiVersion: v2
name: fission-all
version: 1.2.1
version: 1.13.0
description: Fission is a fast serverless framework for Kubernetes.
keywords:
- fission
- serverless
home: http://fission.io/
home: https://fission.io/
maintainers:
- name: Soam Vasani
email: soamvasani@platform9.com
- name: Ta Ching Chen
email: contact@tachingchen.com
- name: Vishal Biyani
email: vishal@infracloud.io
- name: Sanket Sudake
email: sanket@infracloud.io
engine: gotpl
appVersion: 1.2.1
appVersion: 1.13.0
type: application
dependencies:
- name: prometheus
version: 13.2.1
repository: https://prometheus-community.github.io/helm-charts
condition: prometheus.enabled
+2 -1
View File
@@ -16,7 +16,8 @@
[FILTER]
Name kubernetes
Match log.*
Match *
Kube_Tag_Prefix log.var.log.fission.
Kube_URL https://kubernetes.default.svc.cluster.local:443
#
-6
View File
@@ -1,6 +0,0 @@
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
-5
View File
@@ -1,5 +0,0 @@
dependencies:
- name: prometheus
version: 7.1.0
repository: https://kubernetes-charts.storage.googleapis.com
condition: prometheusDeploy
+4 -4
View File
@@ -1,13 +1,13 @@
1. Install the client CLI.
Mac:
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.2.1/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
$ curl -Lo fission https://github.com/fission/fission/releases/download/{{ .Chart.Version }}/fission-{{ .Chart.Version }}-darwin-amd64 && chmod +x fission && sudo mv fission /usr/local/bin/
Linux:
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.2.1/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/
$ curl -Lo fission https://github.com/fission/fission/releases/download/{{ .Chart.Version }}/fission-{{ .Chart.Version }}-linux-amd64 && 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/1.2.1/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/{{ .Chart.Version }}/fission-{{ .Chart.Version }}-windows-amd64.exe
2. You're ready to use Fission!
@@ -15,7 +15,7 @@ Windows:
$ 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
$ curl https://raw.githubusercontent.com/fission/examples/master/nodejs/hello.js > hello.js
# Register this function with Fission
$ fission function create --name hello --env nodejs --code hello.js
+21 -1
View File
@@ -25,9 +25,29 @@ controller/config.go
{{- define "config" -}}
canary:
enabled: {{ .Values.canaryDeployment.enabled }}
{{- if .Values.prometheusDeploy }}
{{- if .Values.prometheus.enabled }}
prometheusSvc: "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"
{{- else }}
prometheusSvc: {{ .Values.prometheus.serviceEndpoint | default "" | quote }}
{{- 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 -}}
{{- if eq .Values.imageTag "" -}}
{{ .Values.repository }}/{{ .Values.image }}
{{- else -}}
{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}
{{- end }}
{{- else -}}
{{- if eq .Values.imageTag "" -}}
{{ .Values.image }}
{{- else -}}
{{ .Values.image }}:{{ .Values.imageTag }}
{{- end }}
{{- end }}
{{- end -}}
File diff suppressed because it is too large Load Diff
+84 -5
View File
@@ -19,14 +19,76 @@ data:
{{ else }}
{{ fail "invalid chart" }}
{{- end }}
{{- if .Values.logger.podSecurityPolicy.enabled }}
---
apiVersion: extensions/v1beta1
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: {{ .Release.Name }}-fission-logger-privileged
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
svc: logger
spec:
privileged: true
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
runAsUser:
rule: RunAsAny
fsGroup:
rule: RunAsAny
volumes:
- '*'
{{- if .Values.logger.podSecurityPolicy.additionalCapabilities }}
allowedCapabilities:
{{- range .Values.logger.podSecurityPolicy.additionalCapabilities }}
- {{ . }}
{{- end }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: psp:{{ .Release.Name }}-fission-logger-privileged
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
svc: logger
rules:
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ .Release.Name }}-fission-logger-privileged
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: psp:{{ .Release.Name }}-fission-logger-privileged
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
svc: logger
roleRef:
kind: Role
name: psp:{{ .Release.Name }}-fission-logger-privileged
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: default
namespace: {{ .Release.Namespace }}
{{- 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:
@@ -34,16 +96,21 @@ spec:
spec:
initContainers:
- name: init
image: busybox
image: {{ .Values.busyboxImage | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ['mkdir', '-p', '/var/log/fission']
volumeMounts:
- name: container-log
mountPath: /var/log/
readOnly: false
{{- if .Values.logger.enableSecurityContext }}
securityContext:
privileged: true
{{- end }}
containers:
- name: logger
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: IfNotPresent
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
env:
- name: NODE_NAME
valueFrom:
@@ -59,8 +126,16 @@ spec:
- name: docker-log
mountPath: /var/lib/docker/containers
readOnly: true
{{- if .Values.logger.enableSecurityContext }}
securityContext:
privileged: true
{{- end }}
- 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"]
@@ -83,6 +158,10 @@ spec:
key: password
- name: LOG_PATH
value: /var/log/fission/*.log
{{- if .Values.logger.enableSecurityContext }}
securityContext:
privileged: true
{{- end }}
volumeMounts:
- name: container-log
mountPath: /var/log/
@@ -93,7 +172,7 @@ spec:
- name: fluentbit-config
mountPath: /fluent-bit/etc/
readOnly: true
serviceAccount: fission-svc
serviceAccountName: fission-svc
volumes:
- name: container-log
hostPath:
@@ -26,7 +26,16 @@ spec:
restartPolicy: Never
containers:
- name: post-install-job
image: "fission/alpinecurl"
{{- if .Values.imageTag }}
image: {{ .Values.postInstallReportImage }}:{{ .Values.imageTag }}
{{- else }}
image: {{ .Values.postInstallReportImage }}
{{- end }}
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"]
command: [ "/reporter" ]
args: ["event", "-c", "fission-use", "-a", "yaml-post-install", "-l", "{{ .Chart.Name }}-{{ .Chart.Version }}"]
env:
- name: GA_TRACKING_ID
value: "{{ .Values.gaTrackingID }}"
serviceAccountName: fission-svc
{{- end }}
@@ -30,7 +30,16 @@ spec:
restartPolicy: Never
containers:
- name: post-install-job
image: "fission/alpinecurl"
{{- if .Values.imageTag }}
image: {{ .Values.postInstallReportImage }}:{{ .Values.imageTag }}
{{- else }}
image: {{ .Values.postInstallReportImage }}
{{- end }}
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"]
command: [ "/reporter" ]
args: ["event", "-c", "fission-use", "-a", "helm-post-install", "-l", "{{ .Chart.Name }}-{{ .Chart.Version }}"]
env:
- name: GA_TRACKING_ID
value: "{{ .Values.gaTrackingID }}"
serviceAccountName: fission-svc
{{- end }}
@@ -30,7 +30,16 @@ spec:
restartPolicy: Never
containers:
- name: post-upgrade-job
image: "fission/alpinecurl"
{{- if .Values.imageTag }}
image: {{ .Values.postInstallReportImage }}:{{ .Values.imageTag }}
{{- else }}
image: {{ .Values.postInstallReportImage }}
{{- end }}
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"]
command: [ "/reporter" ]
args: ["event", "-c", "fission-use", "-a", "helm-post-upgrade", "-l", "{{ .Chart.Name }}-{{ .Chart.Version }}"]
env:
- name: GA_TRACKING_ID
value: "{{ .Values.gaTrackingID }}"
serviceAccountName: fission-svc
{{- end }}
@@ -26,8 +26,12 @@ spec:
restartPolicy: Never
containers:
- name: pre-upgrade-job
{{- if .Values.imageTag }}
image: {{ .Values.preUpgradeChecksImage }}:{{ .Values.imageTag }}
{{- else }}
image: {{ .Values.preUpgradeChecksImage }}
{{- end }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: [ "/pre-upgrade-checks" ]
args: ["--fn-pod-namespace", "{{ .Values.functionNamespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
serviceAccount: fission-svc
serviceAccountName: fission-svc
+1 -1
View File
@@ -1,4 +1,4 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
{{- if and (.Values.persistence.enabled) (not .Values.persistence.existingClaim) (eq (.Values.persistence.storageType | default "local") "local") }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
-39
View File
@@ -1,39 +0,0 @@
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/v1beta2
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
+95
View File
@@ -0,0 +1,95 @@
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 }}"]
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: ROUTER_UNTAP_SERVICE_TIMEOUT
value: {{ .Values.router.unTapServiceTimeout | default "3600s" | quote }}
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.router.traceSamplingRate | default "0.5" | quote }}
- name: USE_ENCODED_PATH
value: {{ .Values.router.useEncodedPath | default false | quote }}
- name: DEBUG_ENV
value: {{ .Values.debugEnv | quote }}
- name: DISPLAY_ACCESS_LOG
value: {{ .Values.router.displayAccessLog | default false | quote }}
resources:
{{- toYaml .Values.router.resources | indent 10 }}
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
serviceAccountName: fission-svc
{{- if .Values.router.extraCoreComponentPodConfig }}
{{ toYaml .Values.router.extraCoreComponentPodConfig | indent 6 -}}
{{- else }}
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
{{- end }}
+21 -1
View File
@@ -6,6 +6,10 @@ metadata:
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.routerServiceType }}
ports:
@@ -37,7 +41,7 @@ spec:
selector:
svc: controller
{{- if .Values.nats.enabled }}
{{- if and .Values.nats.enabled (not .Values.nats.external) }}
---
apiVersion: v1
kind: Service
@@ -73,3 +77,19 @@ spec:
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
+226 -18
View File
@@ -10,6 +10,7 @@ serviceType: ClusterIP
routerServiceType: LoadBalancer
## Image base repository
## Leave it empty for using existing local image
repository: index.docker.io
## Fission image repository
@@ -19,13 +20,7 @@ image: fission/fission-bundle
pullPolicy: IfNotPresent
## Fission image version
imageTag: 1.2.1
## Fission fetcher repository
fetcherImage: fission/fetcher
## Fission fetcher image version
fetcherImageTag: 1.2.1
imageTag: 1.13.0
## Port at which Fission controller service should be exposed
controllerPort: 31313
@@ -34,6 +29,7 @@ controllerPort: 31313
routerPort: 31314
## Port at which NATS streaming service should be exposed
## (only if nats enabled and not external)
natsStreamingPort: 31316
## Set to false if you create the namespaces manually
@@ -50,30 +46,189 @@ builderNamespace: fission-builder
## Enable istio integration
enableIstio: false
fetcher:
## Fetcher repository
image: fission/fetcher
## Fetcher image version
imageTag: 1.13.0
## Fetcher is only for to downloading or uploading archive.
## Normally, you don't need to change the value here, unless necessary.
resource:
cpu:
requests: "10m"
## Low CPU limits will increases the function specialization time.
limits: ""
mem:
requests: "16Mi"
limits: ""
## Logger config
logger:
influxdbAdmin: "admin"
fluentdImageRepository: index.docker.io
fluentdImage: fluent/fluent-bit
fluentdImageTag: 1.0.4
fluentdImageTag: 1.5.1
## Fluent-bit writes/reads its own sqlite database to record a history of tracked
## files and a state of offsets, this is very useful to resume a state if the ser-
## vice is restarted. For Kubernetes environment with constraints like OpenShift,
## the containers are limited to write hostPath volume. Hence, we have to enable
## security context and set privileged to true.
enableSecurityContext: false
## Enable PodSecurityPolicies to allow privileged container
## Only required in some clusters and when enableSecurityContext is true
podSecurityPolicy:
enabled: false
## Configure additional capabilities
additionalCapabilities:
# example values for linkerd
#- NET_RAW
#- NET_ADMIN
executor:
adoptExistingResources: false
podReadyTimeout: 300s
## Router config
router:
deployAsDaemonSet: false
svcAddressMaxRetries: 5
svcAddressUpdateTimeout: 30s
unTapServiceTimeout: 3600s
## Display endpoint access logs
## To be aware of enabling logging endpoint access log, it increases
## router resource utilization when under heavy workloads.
displayAccessLog: false
## 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
## Sample with a rate per time window (traces/second)
traceSamplingRate: 0.5
## 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:
# Pod resources as:
# resources:
# limits:
# cpu: <tbd>
# memory: <tbd>
# requests:
# cpu: <tbd>
# memory: <tbd>
resources: {}
## Message queue trigger config
### NATS Streaming, enabled by default
nats:
# whether or not to use NATS
enabled: true
# if true, don't install NATS, but
external: false
# Address of NATS server (domain:port)
# change from default for external NATS
hostaddress: "nats-streaming:4222"
# Authorization token to use with NATS
authToken: "defaultFissionAuthToken"
# NATS streaming clusterID
clusterID: "fissionMQTrigger"
# Client name registered with NATS streaming
clientID: "fission"
# Queue group registered with NATS streaming
queueGroup: "fission-messageQueueNatsTrigger"
# The image to use for NATS streaming server
streamingserver:
image: nats-streaming
## Azure-storage-queue: enable and configure the details
azureStorageQueue:
enabled: false
key: ""
accountName: ""
## Kafka: enable and configure the details
kafka:
enabled: false
brokers: 'broker.kafka:9092'
# 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
# InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name.
insecureSkipVerify: false # Warning: Setting this to true, makes TLS susceptible to man-in-the-middle attacks
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
@@ -84,11 +239,23 @@ kafka:
## Persist data to a persistent volume.
persistence:
## If true, fission will create/use a Persistent Volume Claim
## If true, fission will create/use a Persistent Volume Claim unless storageType is set to s3
## If false, use emptyDir
##
enabled: true
## Must be set to either local or S3.
## If storateType is set(other than local), one of its backend configuration must be set as below.
#storageType: local | s3
## Sample configruation for AWS s3 storage backend
#s3:
# bucketName: <awsBucketName>
# subDir: <sub directory within a bucket>
# accessKeyId: <awsAccessKeyId>
# secretAccessKey: <awsSecretAccessKey>
# region: <awsRegion>
## A manually managed Persistent Volume Claim name
## Requires persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
@@ -106,10 +273,10 @@ persistence:
accessMode: ReadWriteOnce
size: 8Gi
## Extend the container specs for the core fission pods.
## Extend the container specs for the core fission pods.
## Can be used to add things like affinty/tolerations/nodeSelectors/etc.
## For example:
## extraCoreComponmentPodConfig:
## extraCoreComponentPodConfig:
## affinity:
## nodeAffinity:
## requiredDuringSchedulingIgnoredDuringExecution:
@@ -119,7 +286,7 @@ persistence:
## operator: In
## values:
## - app
extraCoreComponmentPodConfig:
#extraCoreComponentPodConfig:
# affinity:
# tolerations:
# nodeSelector:
@@ -131,9 +298,20 @@ analytics: true
## Internally used for generating an analytics job for non-helm installs
analyticsNonHelmInstall: false
## Google Analytics Tracking ID
gaTrackingID: UA-196546703-1
## Enable Heapster only in clusters where heapster does not exist already
heapster: false
## Enable InfluxDB
influxdb:
enabled: true
image: influxdb:1.7
# Allow user to override busybox image used in fluent-bit init container
busyboxImage: busybox
## 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.
@@ -142,19 +320,49 @@ pruneInterval: 60
## Fission pre-install/pre-upgrade checks live in this image
preUpgradeChecksImage: fission/pre-upgrade-checks
## Fission ppost-install/post-upgrade reporting live in this image
postInstallReportImage: fission/reporter
## 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: true
debugEnv: false
## Prometheus for scrapping service metrics
prometheus:
## set this flag to true if prometheus needs to be deployed along with fission
enabled: true
## set this flag to true if prometheus needs to be deployed along with fission
prometheusDeploy: true
## If enabled is false, please assign the prometheus service URL
## that is accessible by components.
serviceEndpoint: ""
## 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
## Message Queue Trigger Kind, KEDA: enable and configuration
mqt_keda:
enabled: true
connector_images:
kafka:
image: fission/keda-kafka-http-connector
tag: v0.6
rabbitmq:
image: fission/keda-rabbitmq-http-connector
tag: v0.6
awskinesis:
image: fission/keda-aws-kinesis-http-connector
tag: v0.6
aws_sqs:
image: fission/keda-aws-sqs-http-connector
tag: v0.6
nats_steaming:
image: fission/keda-nats-streaming-http-connector
tag: v0.6
gcp_pub_sub:
image: fission/keda-gcp-pubsub-http-connector
tag: v0.1
+6
View File
@@ -0,0 +1,6 @@
dependencies:
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 13.2.1
digest: sha256:136360a97bdc11f1933d75bab77728acc75dd9583257b973cb3336b6d136c9b6
generated: "2021-05-31T21:04:26.076006+05:30"
+14 -8
View File
@@ -1,15 +1,21 @@
apiVersion: v1
apiVersion: v2
name: fission-core
version: 1.2.1
version: 1.13.0
description: Fission is a fast serverless framework for Kubernetes.
keywords:
- fission
- serverless
home: http://fission.io/
home: https://fission.io/
maintainers:
- name: Soam Vasani
email: soamvasani@platform9.com
- name: Ta Ching Chen
email: contact@tachingchen.com
- name: Vishal Biyani
email: vishal@infracloud.io
- name: Sanket Sudake
email: sanket@infracloud.io
engine: gotpl
appVersion: 1.2.1
appVersion: 1.13.0
type: application
dependencies:
- name: prometheus
version: 13.2.1
repository: https://prometheus-community.github.io/helm-charts
condition: prometheus.enabled
-5
View File
@@ -1,5 +0,0 @@
dependencies:
- name: prometheus
version: 7.1.0
repository: https://kubernetes-charts.storage.googleapis.com
condition: prometheusDeploy
+4 -4
View File
@@ -1,13 +1,13 @@
1. Install the client CLI.
Mac:
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.2.1/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/
$ curl -Lo fission https://github.com/fission/fission/releases/download/{{ .Chart.Version }}/fission-{{ .Chart.Version }}-darwin-amd64 && chmod +x fission && sudo mv fission /usr/local/bin/
Linux:
$ curl -Lo fission https://github.com/fission/fission/releases/download/1.2.1/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/
$ curl -Lo fission https://github.com/fission/fission/releases/download/{{ .Chart.Version }}/fission-{{ .Chart.Version }}-linux-amd64 && 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/1.2.1/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/{{ .Chart.Version }}/fission-{{ .Chart.Version }}-windows-amd64.exe
2. You're ready to use Fission!
@@ -15,7 +15,7 @@ Windows:
$ 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
$ curl https://raw.githubusercontent.com/fission/examples/master/nodejs/hello.js > hello.js
# Register this function with Fission
$ fission function create --name hello --env nodejs --code hello.js
+14 -1
View File
@@ -24,8 +24,21 @@ controller/config.go
{{- define "config" -}}
canary:
enabled: {{ .Values.canaryDeployment.enabled }}
{{- if .Values.prometheusDeploy }}
{{- if .Values.prometheus.enabled }}
prometheusSvc: "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"
{{- else }}
prometheusSvc: {{ .Values.prometheus.serviceEndpoint | default "" | quote }}
{{- 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 -}}
+212 -140
View File
@@ -113,14 +113,20 @@ data:
"config.yaml": {{ include "config" . | b64enc }}
---
apiVersion: extensions/v1beta1
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:
@@ -129,11 +135,13 @@ spec:
spec:
containers:
- name: controller
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ["/fission-bundle"]
args: ["--controllerPort", "8888", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
args: ["--controllerPort", "8888"]
env:
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
- name: FISSION_FUNCTION_NAMESPACE
@@ -159,111 +167,32 @@ spec:
- name: config-volume
mountPath: /etc/config/config.yaml
subPath: config.yaml
serviceAccount: fission-svc
ports:
- containerPort: 8888
name: http
serviceAccountName: fission-svc
volumes:
- name: config-volume
configMap:
name: feature-config
{{- if .Values.extraCoreComponmentPodConfig }}
{{ toYaml .Values.extraCoreComponmentPodConfig | indent 6 -}}
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: router
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
replicas: 1
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: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
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: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
- name: ROUTER_ROUND_TRIP_TIMEOUT
value: {{ .Values.routerRoundTripTimeout | default "50ms" | quote }}
- name: ROUTER_ROUNDTRIP_TIMEOUT_EXPONENT
value: {{ .Values.routerRoundTripTimeoutExponent | default 2 | quote }}
- name: ROUTER_ROUND_TRIP_KEEP_ALIVE_TIME
value: {{ .Values.routerRoundTripKeepAliveTime | default "30s" | quote }}
- name: ROUTER_ROUND_TRIP_MAX_RETRIES
value: {{ .Values.routerRoundTripMaxRetries | default 10 | quote }}
- name: ROUTER_ROUND_TRIP_SVC_ADDRESS_MAX_RETRIES
value: {{ .Values.routerRoundTripSvcAddressMaxRetries | default 5 | quote }}
- name: ROUTER_ROUND_TRIP_SVC_ADDRESS_UPDATE_TIMEOUT
value: {{ .Values.routerRoundTripSvcAddressUpdateTimeout | default 30 | 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
serviceAccount: fission-svc
{{- if .Values.extraCoreComponmentPodConfig }}
{{ toYaml .Values.extraCoreComponmentPodConfig | indent 6 -}}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: executor
labels:
svc: executor
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
svc: executor
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8888
replicas: 1
selector:
svc: executor
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: executor
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
replicas: 1
matchLabels:
svc: executor
template:
metadata:
labels:
@@ -275,29 +204,35 @@ spec:
spec:
containers:
- name: executor
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ["/fission-bundle"]
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}", "--fission-namespace", "{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}"]
env:
- name: FETCHER_IMAGE
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
value: "{{ .Values.fetcher.image }}:{{ .Values.fetcher.imageTag }}"
- name: RUNTIME_IMAGE_PULL_POLICY
value: "{{ .Values.pullPolicy }}"
- 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: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
- name: ADOPT_EXISTING_RESOURCES
value: {{ .Values.executor.adoptExistingResources | default false | quote }}
- name: POD_READY_TIMEOUT
value: {{ .Values.executor.podReadyTimeout | default false | quote }}
- name: ENABLE_ISTIO
value: "{{ .Values.enableIstio }}"
- name: FETCHER_MINCPU
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
value: {{ .Values.fetcher.resource.cpu.requests | quote }}
- name: FETCHER_MINMEM
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
value: {{ .Values.fetcher.resource.mem.requests | quote }}
- name: FETCHER_MAXCPU
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
value: {{ .Values.fetcher.resource.cpu.limits | quote }}
- name: FETCHER_MAXMEM
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
value: {{ .Values.fetcher.resource.mem.limits | quote }}
readinessProbe:
httpGet:
path: "/healthz"
@@ -311,20 +246,29 @@ spec:
port: 8888
initialDelaySeconds: 35
periodSeconds: 5
serviceAccount: fission-svc
{{- if .Values.extraCoreComponmentPodConfig }}
{{ toYaml .Values.extraCoreComponmentPodConfig | indent 6 -}}
ports:
- containerPort: 8080
name: metrics
- containerPort: 8888
name: http
serviceAccountName: 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:
@@ -332,13 +276,13 @@ spec:
spec:
containers:
- name: buildermgr
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
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 }}"]
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
env:
- name: FETCHER_IMAGE
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
value: "{{ .Values.fetcher.image }}:{{ .Values.fetcher.imageTag }}"
- name: FETCHER_IMAGE_PULL_POLICY
value: "{{ .Values.pullPolicy }}"
- name: BUILDER_IMAGE_PULL_POLICY
@@ -346,31 +290,35 @@ spec:
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
- name: ENABLE_ISTIO
value: "{{ .Values.enableIstio }}"
- name: FETCHER_MINCPU
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
value: {{ .Values.fetcher.resource.cpu.requests | quote }}
- name: FETCHER_MINMEM
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
value: {{ .Values.fetcher.resource.mem.requests | quote }}
- name: FETCHER_MAXCPU
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
value: {{ .Values.fetcher.resource.cpu.limits | quote }}
- name: FETCHER_MAXMEM
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
serviceAccount: fission-svc
{{- if .Values.extraCoreComponmentPodConfig }}
{{ toYaml .Values.extraCoreComponmentPodConfig | indent 6 -}}
value: {{ .Values.fetcher.resource.mem.limits | quote }}
serviceAccountName: fission-svc
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
---
apiVersion: extensions/v1beta1
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:
@@ -378,27 +326,33 @@ spec:
spec:
containers:
- name: kubewatcher
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ["/fission-bundle"]
args: ["--kubewatcher", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
args: ["--kubewatcher", "--routerUrl", "http://router.{{ .Release.Namespace }}"]
env:
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
serviceAccount: fission-svc
{{- if .Values.extraCoreComponmentPodConfig }}
{{ toYaml .Values.extraCoreComponmentPodConfig | indent 6 -}}
serviceAccountName: 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:
@@ -406,27 +360,35 @@ spec:
spec:
containers:
- name: timer
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ["/fission-bundle"]
args: ["--timer", "--routerUrl", "http://router.{{ .Release.Namespace }}", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
args: ["--timer", "--routerUrl", "http://router.{{ .Release.Namespace }}"]
env:
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
serviceAccount: fission-svc
{{- if .Values.extraCoreComponmentPodConfig }}
{{ toYaml .Values.extraCoreComponmentPodConfig | indent 6 -}}
serviceAccountName: fission-svc
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
---
apiVersion: extensions/v1beta1
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:
@@ -435,27 +397,137 @@ spec:
spec:
containers:
- name: storagesvc
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ["/fission-bundle"]
args: ["--storageServicePort", "8000", "--filePath", "/fission", "--collectorEndpoint", "{{ .Values.traceCollectorEndpoint }}"]
{{- if and (.Values.persistence.enabled) (eq (.Values.persistence.storageType | default "local") "s3") }}
args: ["--storageServicePort", "8000", "--storageType", "s3"]
{{- else }}
args: ["--storageServicePort", "8000", "--storageType", "local"]
{{- end }}
env:
- name: PRUNE_INTERVAL
value: "{{.Values.pruneInterval}}"
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
{{- if and (.Values.persistence.enabled) (eq (.Values.persistence.storageType | default "local") "s3") }}
- name: STORAGE_S3_ENDPOINT
value: {{ .Values.persistence.s3.endPoint }}
- name: STORAGE_S3_BUCKET_NAME
value: {{ .Values.persistence.s3.bucketName }}
- name: STORAGE_S3_SUB_DIR
value: {{ .Values.persistence.s3.subDir }}
- name: STORAGE_S3_ACCESS_KEY_ID
value: {{ .Values.persistence.s3.accessKeyId }}
- name: STORAGE_S3_SECRET_ACCESS_KEY
value: {{ .Values.persistence.s3.secretAccessKey }}
- name: STORAGE_S3_REGION
value: {{ .Values.persistence.s3.region }}
{{- end }}
{{- if ne (.Values.persistence.storageType | default "local") "s3" }}
volumeMounts:
- name: fission-storage
mountPath: /fission
serviceAccount: fission-svc
{{- end }}
ports:
- containerPort: 8000
name: http
serviceAccountName: fission-svc
{{- if and (.Values.persistence.enabled) (ne (.Values.persistence.storageType | default "local") "s3") }}
volumes:
- name: fission-storage
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default "fission-storage-pvc" }}
{{- else }}
volumes:
- name: fission-storage
emptyDir: {}
{{- end }}
{{- if .Values.extraCoreComponmentPodConfig }}
{{ toYaml .Values.extraCoreComponmentPodConfig | indent 6 -}}
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
{{- if .Values.mqt_keda.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mqtrigger-keda
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
svc: mqtrigger-keda
messagequeue: keda
spec:
replicas: 1
selector:
matchLabels:
svc: mqtrigger-keda
messagequeue: keda
template:
metadata:
labels:
svc: mqtrigger-keda
messagequeue: keda
spec:
containers:
- name: mqtrigger-keda
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ["/fission-bundle"]
args: ["--mqt_keda", "--routerUrl", "http://router.{{ .Release.Namespace }}"]
env:
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
- name: DEBUG_ENV
value: {{ .Values.debugEnv | quote }}
- name: CONNECTOR_IMAGE_PULL_POLICY
value: "{{ .Values.pullPolicy }}"
- name: KAFKA_IMAGE
value: "{{ .Values.mqt_keda.connector_images.kafka.image }}:{{ .Values.mqt_keda.connector_images.kafka.tag }}"
- name: RABBITMQ_IMAGE
value: "{{ .Values.mqt_keda.connector_images.rabbitmq.image }}:{{ .Values.mqt_keda.connector_images.rabbitmq.tag }}"
- name: AWS-KINESIS-STREAM_IMAGE
value: "{{ .Values.mqt_keda.connector_images.awskinesis.image }}:{{ .Values.mqt_keda.connector_images.awskinesis.tag }}"
- name: AWS-SQS-QUEUE_IMAGE
value: "{{ .Values.mqt_keda.connector_images.aws_sqs.image }}:{{ .Values.mqt_keda.connector_images.aws_sqs.tag }}"
- name: STAN_IMAGE
value: "{{ .Values.mqt_keda.connector_images.nats_steaming.image }}:{{ .Values.mqt_keda.connector_images.nats_steaming.tag }}"
- name: GCP-PUB-SUB_IMAGE
value: "{{ .Values.mqt_keda.connector_images.gcp_pub_sub.image }}:{{ .Values.mqt_keda.connector_images.gcp_pub_sub.tag }}"
serviceAccountName: fission-svc
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: {{ .Values.functionNamespace }}
name: event-fetcher
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "watch", "list"]
- apiGroups: [""] # "" indicates the core API group
resources: ["events"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: fission-fetcher-pod-reader
namespace: {{ .Values.functionNamespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: event-fetcher
subjects:
- kind: ServiceAccount
name: fission-fetcher
namespace: {{ .Values.functionNamespace }}
@@ -26,6 +26,16 @@ 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"]
{{- if .Values.imageTag }}
image: {{ .Values.postInstallReportImage }}:{{ .Values.imageTag }}
{{- else }}
image: {{ .Values.postInstallReportImage }}
{{- end }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: [ "/reporter" ]
args: ["event", "-c", "fission-use", "-a", "yaml-post-install", "-l", "{{ .Chart.Name }}-{{ .Chart.Version }}"]
env:
- name: GA_TRACKING_ID
value: "{{ .Values.gaTrackingID }}"
serviceAccountName: fission-svc
{{- end }}
@@ -30,6 +30,16 @@ 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"]
{{- if .Values.imageTag }}
image: {{ .Values.postInstallReportImage }}:{{ .Values.imageTag }}
{{- else }}
image: {{ .Values.postInstallReportImage }}
{{- end }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: [ "/reporter" ]
args: ["event", "-c", "fission-use", "-a", "helm-post-install", "-l", "{{ .Chart.Name }}-{{ .Chart.Version }}"]
env:
- name: GA_TRACKING_ID
value: "{{ .Values.gaTrackingID }}"
serviceAccountName: fission-svc
{{- end }}
@@ -30,6 +30,16 @@ 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"]
{{- if .Values.imageTag }}
image: {{ .Values.postInstallReportImage }}:{{ .Values.imageTag }}
{{- else }}
image: {{ .Values.postInstallReportImage }}
{{- end }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: [ "/reporter" ]
args: ["event", "-c", "fission-use", "-a", "helm-post-upgrade", "-l", "{{ .Chart.Name }}-{{ .Chart.Version }}"]
env:
- name: GA_TRACKING_ID
value: "{{ .Values.gaTrackingID }}"
serviceAccountName: fission-svc
{{- end }}
@@ -30,4 +30,4 @@ spec:
imagePullPolicy: {{ .Values.pullPolicy }}
command: [ "/pre-upgrade-checks" ]
args: ["--fn-pod-namespace", "{{ .Values.functionNamespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
serviceAccount: fission-svc
serviceAccountName: fission-svc
+1 -1
View File
@@ -1,4 +1,4 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
{{- if and (.Values.persistence.enabled) (not .Values.persistence.existingClaim) (eq (.Values.persistence.storageType | default "local") "local") }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
+95
View File
@@ -0,0 +1,95 @@
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 }}"]
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: ROUTER_UNTAP_SERVICE_TIMEOUT
value: {{ .Values.router.unTapServiceTimeout | default "3600s" | quote }}
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
value: "{{ .Values.traceCollectorEndpoint }}"
- name: TRACING_SAMPLING_RATE
value: {{ .Values.router.traceSamplingRate | default "0.5" | quote }}
- name: USE_ENCODED_PATH
value: {{ .Values.router.useEncodedPath | default false | quote }}
- name: DEBUG_ENV
value: {{ .Values.debugEnv | quote }}
- name: DISPLAY_ACCESS_LOG
value: {{ .Values.router.displayAccessLog | default false | quote }}
resources:
{{- toYaml .Values.router.resources | indent 10 }}
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
serviceAccountName: fission-svc
{{- if .Values.router.extraCoreComponentPodConfig }}
{{ toYaml .Values.router.extraCoreComponentPodConfig | indent 6 -}}
{{- else }}
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
{{- end }}
+20
View File
@@ -6,6 +6,10 @@ metadata:
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.routerServiceType }}
ports:
@@ -53,3 +57,19 @@ spec:
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
+155 -15
View File
@@ -10,23 +10,18 @@ serviceType: 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: 1.2.1
imageTag: 1.13.0
## Image pull policy
pullPolicy: IfNotPresent
## Fission fetcher repository
fetcherImage: fission/fetcher
## Fission fetcher image version
fetcherImageTag: 1.2.1
## Port at which Fission controller service should be exposed
controllerPort: 31313
@@ -44,13 +39,123 @@ builderNamespace: fission-builder
## Enable istio integration
enableIstio: false
fetcher:
## Fetcher repository
image: fission/fetcher
## Fetcher image version
imageTag: 1.13.0
## Fetcher is only for to downloading or uploading archive.
## Normally, you don't need to change the value here, unless necessary.
resource:
cpu:
requests: "10m"
## Low CPU limits will increases the function specialization time.
limits: ""
mem:
requests: "16Mi"
limits: ""
executor:
adoptExistingResources: false
podReadyTimeout: 300s
## Router config
router:
deployAsDaemonSet: false
svcAddressMaxRetries: 5
svcAddressUpdateTimeout: 30s
unTapServiceTimeout: 3600s
## Display endpoint access logs
## To be aware of enabling logging endpoint access log, it increases
## router resource utilization when under heavy workloads.
displayAccessLog: false
## 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
## Sample with a rate per time window (traces/second)
traceSamplingRate: 0.5
## Extend the container specs for the router 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:
# Pod resources as:
# resources:
# limits:
# cpu: <tbd>
# memory: <tbd>
# requests:
# cpu: <tbd>
# memory: <tbd>
resources: {}
## Persist data to a persistent volume.
persistence:
## If true, fission will create/use a Persistent Volume Claim
## If true, fission will create/use a Persistent Volume Claim unless storageType is set to s3
## If false, use emptyDir
##
enabled: true
## Must be set to either local or S3.
## If storateType is set(other than local), one of its backend configuration must be set as below.
#storageType: local | s3
## Sample configruation for AWS s3 storage backend
#s3:
# bucketName: <awsBucketName>
# subDir: <sub directory within a bucket>
# accessKeyId: <awsAccessKeyId>
# secretAccessKey: <awsSecretAccessKey>
# region: <awsRegion>
## A manually managed Persistent Volume Claim name
## Requires persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
@@ -68,10 +173,10 @@ persistence:
accessMode: ReadWriteOnce
size: 8Gi
## Extend the container specs for the core fission pods.
## Extend the container specs for the core fission pods.
## Can be used to add things like affinty/tolerations/nodeSelectors/etc.
## For example:
## extraCoreComponmentPodConfig:
## extraCoreComponentPodConfig:
## affinity:
## nodeAffinity:
## requiredDuringSchedulingIgnoredDuringExecution:
@@ -81,7 +186,7 @@ persistence:
## operator: In
## values:
## - app
extraCoreComponmentPodConfig:
#extraCoreComponentPodConfig:
# affinity:
# tolerations:
# nodeSelector:
@@ -93,6 +198,9 @@ analytics: true
## Internally used for generating an analytics job for non-helm installs
analyticsNonHelmInstall: false
## Google Analytics Tracking ID
gaTrackingID: UA-196546703-1
## 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.
@@ -101,12 +209,21 @@ pruneInterval: 60
## Fission pre-install/pre-upgrade checks live in this image
preUpgradeChecksImage: fission/pre-upgrade-checks
## Fission ppost-install/post-upgrade reporting live in this image
postInstallReportImage: fission/reporter
## 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: true
debugEnv: false
## set this flag to true if prometheus needs to be deployed along with fission
prometheusDeploy: false
## Prometheus for scrapping service metrics
prometheus:
## set this flag to true if prometheus needs to be deployed along with fission
enabled: false
## If enabled is false, please assign the prometheus service URL
## that is accessible by components.
serviceEndpoint: ""
## set this flag to false if you dont need canary deployment feature
canaryDeployment:
@@ -114,4 +231,27 @@ canaryDeployment:
# 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
#traceSamplingRate: 0.75
## Message Queue Trigger Kind, KEDA: enable and configuration
mqt_keda:
enabled: true
connector_images:
kafka:
image: fission/keda-kafka-http-connector
tag: v0.6
rabbitmq:
image: fission/keda-rabbitmq-http-connector
tag: v0.6
awskinesis:
image: fission/keda-aws-kinesis-http-connector
tag: v0.6
aws_sqs:
image: fission/keda-aws-sqs-http-connector
tag: v0.6
nats_steaming:
image: fission/keda-nats-streaming-http-connector
tag: v0.6
gcp_pub_sub:
image: fission/keda-gcp-pubsub-http-connector
tag: v0.1
+26 -7
View File
@@ -1,6 +1,27 @@
FROM golang:1.11-alpine as fission-builder
FROM golang:1.15-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)
@@ -10,17 +31,15 @@ ARG BUILDVERSION=unknown
ARG BUILDDATE=unknown
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
ARG GOPKG=github.com/fission/fission
COPY . /go/src/${GOPKG}
WORKDIR /go/src/${GOPKG}/cmd/builder
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
RUN CGO_ENABLED=0 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.5
COPY --from=fission-builder /go/bin/builder /
FROM alpine:3.13 as base
RUN apk add --update ca-certificates
COPY --from=builder /go/bin/builder /
EXPOSE 8001
ENTRYPOINT ["/builder"]
+10 -2
View File
@@ -21,17 +21,25 @@ import (
"os"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/fission/fission/cmd/builder/app"
)
// Usage: builder <shared volume path>
func main() {
logger, err := zap.NewProduction()
config := zap.NewProductionConfig()
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
logger, err := config.Build()
if err != nil {
log.Fatalf("can't initialize zap logger: %v", err)
}
defer logger.Sync()
defer func() {
err := logger.Sync()
if err != nil {
log.Fatal(err)
}
}()
shareVolume := os.Args[1]
if _, err := os.Stat(shareVolume); err != nil {
+25 -6
View File
@@ -1,6 +1,27 @@
FROM golang:1.11-alpine as builder
FROM golang:1.15-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)
@@ -10,16 +31,14 @@ ARG BUILDVERSION=unknown
ARG BUILDDATE=unknown
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
ARG GOPKG=github.com/fission/fission
COPY . /go/src/${GOPKG}
WORKDIR /go/src/${GOPKG}/cmd/fetcher
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
RUN CGO_ENABLED=0 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.4
FROM alpine:3.13 as base
RUN apk add --update ca-certificates
COPY --from=builder /go/bin/fetcher /
EXPOSE 8000
+34 -6
View File
@@ -1,3 +1,19 @@
/*
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 (
@@ -5,16 +21,16 @@ import (
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"os"
"go.opencensus.io/exporter/jaeger"
"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 {
@@ -78,7 +94,7 @@ func Run(logger *zap.Logger) {
// do specialization in other goroutine to prevent blocking in newdeploy
go func() {
if *specializeOnStart {
var specializeReq types.FunctionSpecializeRequest
var specializeReq fetcher.FunctionSpecializeRequest
err := json.Unmarshal([]byte(*specializePayload), &specializeReq)
if err != nil {
@@ -100,21 +116,33 @@ func Run(logger *zap.Logger) {
mux.HandleFunc("/specialize", f.SpecializeHandler)
mux.HandleFunc("/upload", f.UploadHandler)
mux.HandleFunc("/version", f.VersionHandler)
mux.HandleFunc("/readniess-healthz", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/wsevent/start", f.WsStartHandler)
mux.HandleFunc("/wsevent/end", f.WsEndHandler)
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{
err = http.ListenAndServe(":8000", &ochttp.Handler{
Handler: mux,
})
if err != nil {
log.Fatal(err)
}
}
func fetcherUsage() {
+10 -3
View File
@@ -20,17 +20,24 @@ import (
"log"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/fission/fission/cmd/fetcher/app"
)
// Usage: fetcher <shared volume path>
func main() {
logger, err := zap.NewProduction()
config := zap.NewProductionConfig()
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
logger, err := config.Build()
if err != nil {
log.Fatalf("can't initialize zap logger: %v", err)
}
defer logger.Sync()
defer func() {
err := logger.Sync()
if err != nil {
log.Fatal(err)
}
}()
app.Run(logger)
}
+24 -8
View File
@@ -1,6 +1,27 @@
FROM golang:1.11-alpine as builder
FROM golang:1.15-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)
@@ -10,18 +31,13 @@ ARG BUILDVERSION=unknown
ARG BUILDDATE=unknown
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
ARG GOPKG=github.com/fission/fission
COPY . /go/src/${GOPKG}
RUN rm -f /go/src/${GOPKG}/Dockerfile*
WORKDIR /go/src/${GOPKG}/cmd/fission-bundle
ENV GO111MODULE=on
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -mod vendor \
RUN CGO_ENABLED=0 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.4
FROM alpine:3.13 as base
RUN apk add --update ca-certificates
COPY --from=builder /go/bin/fission-bundle /
+91 -34
View File
@@ -1,3 +1,19 @@
/*
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 (
@@ -7,18 +23,20 @@ import (
"os"
"strconv"
"contrib.go.opencensus.io/exporter/jaeger"
docopt "github.com/docopt/docopt-go"
"go.opencensus.io/exporter/jaeger"
"go.opencensus.io/trace"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/fission/fission/cmd/fission-bundle/mqtrigger"
"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"
mqt "github.com/fission/fission/pkg/mqtrigger"
"github.com/fission/fission/pkg/router"
"github.com/fission/fission/pkg/storagesvc"
"github.com/fission/fission/pkg/timer"
@@ -34,8 +52,8 @@ func runRouter(logger *zap.Logger, port int, executorUrl string) {
logger.Fatal("router exited")
}
func runExecutor(logger *zap.Logger, port int, fissionNamespace, functionNamespace, envBuilderNamespace string) {
err := executor.StartExecutor(logger, fissionNamespace, functionNamespace, envBuilderNamespace, port)
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))
}
@@ -56,20 +74,25 @@ func runTimer(logger *zap.Logger, routerUrl string) {
}
func runMessageQueueMgr(logger *zap.Logger, routerUrl string) {
err := messagequeue.Start(logger, routerUrl)
err := mqtrigger.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"
// KEDA based MessageQueue Trigger Manager
func runMQManager(logger *zap.Logger, routerURL string) {
err := mqt.StartScalerManager(logger, routerURL)
if err != nil {
logger.Fatal("error starting mqt scaler manager", zap.Error(err))
}
}
func runStorageSvc(logger *zap.Logger, port int, storage storagesvc.Storage) {
err := storagesvc.Start(logger, storage, port)
if err != nil {
logger.Fatal("error starting storage service", zap.Error(err))
}
enableArchivePruner := true
storagesvc.RunStorageService(logger, storagesvc.StorageTypeLocal,
filePath, subdir, port, enableArchivePruner)
}
func runBuilderMgr(logger *zap.Logger, storageSvcUrl string, envBuilderNamespace string) {
@@ -102,8 +125,8 @@ func getStringArgWithDefault(arg interface{}, defaultValue string) string {
}
func registerTraceExporter(logger *zap.Logger, arguments map[string]interface{}) error {
collectorEndpoint := getStringArgWithDefault(arguments["--collectorEndpoint"], "")
if collectorEndpoint == "" {
collectorEndpoint := os.Getenv("TRACE_JAEGER_COLLECTOR_ENDPOINT")
if len(collectorEndpoint) == 0 {
logger.Info("skipping trace exporter registration")
return nil
}
@@ -126,6 +149,8 @@ func registerTraceExporter(logger *zap.Logger, arguments map[string]interface{})
serviceName = "Fission-BuilderMgr"
} else if arguments["--storageServicePort"] != nil {
serviceName = "Fission-StorageSvc"
} else if arguments["--mqt_keda"] == true {
serviceName = "Fission-Keda-MQTrigger"
}
exporter, err := jaeger.NewExporter(jaeger.Options{
@@ -151,12 +176,15 @@ func registerTraceExporter(logger *zap.Logger, arguments map[string]interface{})
}
func main() {
var err error
// 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")
// TODO: fix the lint error. Error checking here is causing all components to crash with error "logtostderr not found"
flag.Set("logtostderr", "true") //nolint: errcheck
usage := `fission-bundle: Package of all fission microservices: controller, router, executor.
@@ -180,18 +208,18 @@ Use it to start one or more of the fission servers:
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 --controllerPort=<port>
fission-bundle --routerPort=<port> [--executorUrl=<url>]
fission-bundle --executorPort=<port> [--namespace=<namespace>] [--fission-namespace=<namespace>]
fission-bundle --kubewatcher [--routerUrl=<url>]
fission-bundle --storageServicePort=<port> --storageType=<storateType>
fission-bundle --builderMgr [--storageSvcUrl=<url>] [--envbuilder-namespace=<namespace>]
fission-bundle --timer [--routerUrl=<url>]
fission-bundle --mqt [--routerUrl=<url>]
fission-bundle --mqt_keda [--routerUrl=<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.
@@ -205,17 +233,36 @@ Options:
--kubewatcher Start Kubernetes events watcher.
--timer Start Timer.
--mqt Start message queue trigger.
--mqt_keda Start message queue trigger of kind KEDA
--builderMgr Start builder manager.
--version Print version information
`
logger, err := zap.NewProduction()
if err != nil {
log.Fatalf("can't initialize zap logger: %v", err)
}
defer logger.Sync()
var logger *zap.Logger
var config zap.Config
isDebugEnv, _ := strconv.ParseBool(os.Getenv("DEBUG_ENV"))
if isDebugEnv {
config = zap.NewDevelopmentConfig()
config.DisableStacktrace = true
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
} else {
config = zap.NewProductionConfig()
config.DisableStacktrace = true
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
}
logger, err = config.Build()
if err != nil {
log.Fatalf("I can't initialize zap logger: %v", err)
}
defer func() {
err := logger.Sync()
if err != nil {
log.Fatal(err)
}
}()
version := fmt.Sprintf("Fission Bundle Version: %v", info.BuildInfo().String())
arguments, err := docopt.Parse(usage, nil, true, version, false)
arguments, err := docopt.ParseArgs(usage, nil, version)
if err != nil {
logger.Fatal("Could not parse command line arguments", zap.Error(err))
}
@@ -226,7 +273,6 @@ Options:
}
functionNs := getStringArgWithDefault(arguments["--namespace"], "fission-function")
fissionNs := getStringArgWithDefault(arguments["--fission-namespace"], "fission")
envBuilderNs := getStringArgWithDefault(arguments["--envbuilder-namespace"], "fission-builder")
executorUrl := getStringArgWithDefault(arguments["--executorUrl"], "http://executor.fission")
@@ -245,7 +291,7 @@ Options:
if arguments["--executorPort"] != nil {
port := getPort(logger, arguments["--executorPort"])
runExecutor(logger, port, fissionNs, functionNs, envBuilderNs)
runExecutor(logger, port, functionNs, envBuilderNs)
}
if arguments["--kubewatcher"] == true {
@@ -260,6 +306,10 @@ Options:
runMessageQueueMgr(logger, routerUrl)
}
if arguments["--mqt_keda"] == true {
runMQManager(logger, routerUrl)
}
if arguments["--builderMgr"] == true {
runBuilderMgr(logger, storageSvcUrl, envBuilderNs)
}
@@ -270,8 +320,15 @@ Options:
if arguments["--storageServicePort"] != nil {
port := getPort(logger, arguments["--storageServicePort"])
filePath := arguments["--filePath"].(string)
runStorageSvc(logger, port, filePath)
var storage storagesvc.Storage
if arguments["--storageType"] != nil && arguments["--storageType"] == string(storagesvc.StorageTypeS3) {
storage = storagesvc.NewS3Storage()
} else if arguments["--storageType"] == string(storagesvc.StorageTypeLocal) {
storage = storagesvc.NewLocalStorage("/fission")
}
runStorageSvc(logger, port, storage)
}
select {}
+115
View File
@@ -0,0 +1,115 @@
/*
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 mqtrigger
import (
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"github.com/pkg/errors"
"go.uber.org/zap"
fv1 "github.com/fission/fission/pkg/apis/core/v1"
"github.com/fission/fission/pkg/crd"
"github.com/fission/fission/pkg/mqtrigger"
"github.com/fission/fission/pkg/mqtrigger/factory"
"github.com/fission/fission/pkg/mqtrigger/messageQueue"
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/azurequeuestorage"
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/kafka"
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/nats"
)
func Start(logger *zap.Logger, routerUrl string) error {
fissionClient, _, _, _, err := crd.MakeFissionClient()
if err != nil {
return errors.Wrap(err, "failed to get fission or kubernetes client")
}
err = fissionClient.WaitForCRDs()
if err != nil {
return errors.Wrap(err, "error waiting for CRDs")
}
mqType := (fv1.MessageQueueType)(os.Getenv("MESSAGE_QUEUE_TYPE"))
mqUrl := os.Getenv("MESSAGE_QUEUE_URL")
secretsPath := strings.TrimSpace(os.Getenv("MESSAGE_QUEUE_SECRETS"))
var secrets map[string][]byte
if len(secretsPath) > 0 {
// For authentication with message queue
secrets, err = readSecrets(logger, secretsPath)
if err != nil {
return err
}
}
mq, err := factory.Create(
logger,
mqType,
messageQueue.Config{
MQType: (string)(mqType),
Url: mqUrl,
Secrets: secrets,
},
routerUrl,
)
if err != nil {
logger.Fatal("failed to connect to remote message queue server", zap.Error(err))
}
mqtrigger.MakeMessageQueueTriggerManager(logger, fissionClient, mqType, mq).Run()
return nil
}
func readSecrets(logger *zap.Logger, secretsPath string) (map[string][]byte, error) {
// return if no secrets exist
if _, err := os.Stat(secretsPath); os.IsNotExist(err) {
return nil, err
}
secretFiles, err := ioutil.ReadDir(secretsPath)
if err != nil {
return nil, err
}
secrets := make(map[string][]byte)
for _, secretFile := range secretFiles {
fileName := secretFile.Name()
// /etc/secrets contain some hidden directories (like .data)
// ignore them
if !secretFile.IsDir() && !strings.HasPrefix(fileName, ".") {
logger.Info(fmt.Sprintf("Reading secret from %s", fileName))
filePath := path.Join(secretsPath, fileName)
secret, fileReadErr := ioutil.ReadFile(filePath)
if fileReadErr != nil {
return nil, fileReadErr
}
secrets[fileName] = secret
}
}
return secrets, nil
}
+92
View File
@@ -0,0 +1,92 @@
package app
import (
"github.com/spf13/cobra"
"github.com/fission/fission/pkg/controller/client"
"github.com/fission/fission/pkg/controller/client/rest"
"github.com/fission/fission/pkg/fission-cli/cliwrapper/cli"
wrapper "github.com/fission/fission/pkg/fission-cli/cliwrapper/driver/cobra"
"github.com/fission/fission/pkg/fission-cli/cliwrapper/driver/cobra/helptemplate"
"github.com/fission/fission/pkg/fission-cli/cmd"
"github.com/fission/fission/pkg/fission-cli/cmd/canaryconfig"
"github.com/fission/fission/pkg/fission-cli/cmd/environment"
"github.com/fission/fission/pkg/fission-cli/cmd/function"
"github.com/fission/fission/pkg/fission-cli/cmd/httptrigger"
"github.com/fission/fission/pkg/fission-cli/cmd/kubewatch"
"github.com/fission/fission/pkg/fission-cli/cmd/mqtrigger"
_package "github.com/fission/fission/pkg/fission-cli/cmd/package"
"github.com/fission/fission/pkg/fission-cli/cmd/spec"
"github.com/fission/fission/pkg/fission-cli/cmd/support"
"github.com/fission/fission/pkg/fission-cli/cmd/timetrigger"
"github.com/fission/fission/pkg/fission-cli/cmd/version"
"github.com/fission/fission/pkg/fission-cli/console"
"github.com/fission/fission/pkg/fission-cli/flag"
flagkey "github.com/fission/fission/pkg/fission-cli/flag/key"
"github.com/fission/fission/pkg/fission-cli/util"
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/azurequeuestorage"
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/kafka"
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/nats"
)
const (
usage = `Fission: Fast and Simple Serverless Functions for Kubernetes
* Github: https://github.com/fission/fission
* Documentation: https://docs.fission.io/docs
`
)
func App() *cobra.Command {
cobra.EnableCommandSorting = false
rootCmd := &cobra.Command{
Use: "fission",
Long: usage,
//SilenceUsage: true,
PersistentPreRunE: wrapper.Wrapper(
func(input cli.Input) error {
console.Verbosity = input.Int(flagkey.Verbosity)
if input.IsSet(flagkey.ClientOnly) {
// TODO: use fake rest client for offline spec generation
cmd.SetClientset(client.MakeFakeClientset(nil))
} else {
serverUrl, err := util.GetServerURL(input)
if err != nil {
return err
}
restClient := rest.NewRESTClient(serverUrl)
cmd.SetClientset(client.MakeClientset(restClient))
}
return nil
},
),
}
// Workaround fix for not to show help command
// https://github.com/spf13/cobra/issues/587
rootCmd.SetHelpCommand(&cobra.Command{
Use: "no-help",
Hidden: true,
})
wrapper.SetFlags(rootCmd, flag.FlagSet{
Global: []flag.Flag{flag.GlobalServer, flag.GlobalVerbosity, flag.KubeContext},
})
groups := helptemplate.CommandGroups{}
groups = append(groups, helptemplate.CreateCmdGroup("Basic Commands", environment.Commands(), _package.Commands(), function.Commands()))
groups = append(groups, helptemplate.CreateCmdGroup("Trigger Commands", httptrigger.Commands(), mqtrigger.Commands(), timetrigger.Commands(), kubewatch.Commands()))
groups = append(groups, helptemplate.CreateCmdGroup("Deploy Strategies Commands", canaryconfig.Commands()))
groups = append(groups, helptemplate.CreateCmdGroup("Declarative Application Commands", spec.Commands()))
groups = append(groups, helptemplate.CreateCmdGroup("Other Commands", support.Commands(), version.Commands()))
groups.Add(rootCmd)
flagExposer := helptemplate.ActsAsRootCommand(rootCmd, nil, groups...)
// show global options in usage
flagExposer.ExposeFlags(rootCmd, flagkey.Server, flagkey.Verbosity, flagkey.KubeContext)
return rootCmd
}
+11 -2
View File
@@ -19,9 +19,18 @@ package main
import (
"os"
fcli "github.com/fission/fission/pkg/fission-cli"
"github.com/fission/fission/cmd/fission-cli/app"
"github.com/fission/fission/pkg/fission-cli/console"
)
func main() {
fcli.NewCliApp().Run(os.Args)
cmd := app.App()
cmd.SilenceErrors = true // use our own error message printer
err := cmd.Execute()
if err != nil {
// let program exit with non-zero code when error occurs
console.Error(err.Error())
os.Exit(1)
}
}
@@ -1,6 +1,27 @@
FROM golang:1.11-alpine as builder
FROM golang:1.15-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)
@@ -10,17 +31,13 @@ ARG BUILDVERSION=unknown
ARG BUILDDATE=unknown
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
ARG GOPKG=github.com/fission/fission
COPY . /go/src/${GOPKG}
WORKDIR /go/src/${GOPKG}/cmd/preupgradechecks
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a \
RUN CGO_ENABLED=0 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.4
FROM alpine:3.13 as base
RUN apk add --update ca-certificates
COPY --from=builder /go/bin/pre-upgrade-checks /
+18 -6
View File
@@ -21,6 +21,7 @@ import (
"github.com/docopt/docopt-go"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/fission/fission/pkg/info"
)
@@ -34,11 +35,19 @@ func getStringArgWithDefault(arg interface{}, defaultValue string) string {
}
func main() {
logger, err := zap.NewProduction()
config := zap.NewProductionConfig()
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
logger, err := config.Build()
if err != nil {
log.Fatalf("can't initialize zap logger: %v", err)
}
defer logger.Sync()
defer func() {
err := logger.Sync()
if err != nil {
log.Fatal(err)
}
}()
usage := `Package to perform operations needed prior to fission installation
Usage:
@@ -47,7 +56,7 @@ 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)
arguments, err := docopt.ParseArgs(usage, nil, info.BuildInfo().String())
if err != nil {
logger.Fatal("Could not parse command line arguments", zap.Error(err))
}
@@ -61,12 +70,15 @@ Options:
zap.Error(err))
}
if !crdBackedClient.IsFissionReInstall() {
crd := crdBackedClient.GetFunctionCRD()
if crd == nil {
logger.Info("nothing to do since CRDs are not present on the cluster")
return
}
err = crdBackedClient.LatestSchemaApplied()
if err != nil {
logger.Fatal("New CRDs are not applied")
}
crdBackedClient.VerifyFunctionSpecReferences()
crdBackedClient.RemoveClusterAdminRolesForFissionSAs()
crdBackedClient.SetupRoleBindings()
}
+57 -110
View File
@@ -17,20 +17,21 @@ limitations under the License.
package main
import (
"context"
"fmt"
"strings"
multierror "github.com/hashicorp/go-multierror"
"github.com/pkg/errors"
"go.uber.org/zap"
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
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"
fv1 "github.com/fission/fission/pkg/apis/core/v1"
"github.com/fission/fission/pkg/crd"
"github.com/fission/fission/pkg/types"
"github.com/fission/fission/pkg/utils"
)
type (
@@ -47,10 +48,11 @@ type (
const (
maxRetries = 5
FunctionCRD = "functions.fission.io"
MqtCRD = "messagequeuetriggers.fission.io"
)
func makePreUpgradeTaskClient(logger *zap.Logger, fnPodNs, envBuilderNs string) (*PreUpgradeTaskClient, error) {
fissionClient, k8sClient, apiExtClient, err := crd.MakeFissionClient()
fissionClient, k8sClient, apiExtClient, _, err := crd.MakeFissionClient()
if err != nil {
return nil, errors.Wrap(err, "error making fission client")
}
@@ -65,20 +67,52 @@ func makePreUpgradeTaskClient(logger *zap.Logger, fnPodNs, envBuilderNs string)
}, 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 {
// GetFunctionCRD checks if function CRD is present on the cluster and returns it. It returns nil if not found
// We can use this to find out if fission had been previously installed on this cluster too.
func (client *PreUpgradeTaskClient) GetFunctionCRD() *v1.CustomResourceDefinition {
for i := 0; i < maxRetries; i++ {
_, err := client.apiExtClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(FunctionCRD, metav1.GetOptions{})
crd, err := client.apiExtClient.ApiextensionsV1().CustomResourceDefinitions().Get(context.TODO(), FunctionCRD, metav1.GetOptions{})
if err != nil && k8serrors.IsNotFound(err) {
return false
}
if err == nil {
return true
continue
}
return crd
}
return nil
}
// GetMqtCRD checks if MQT CRD is present on the cluster and returns it. It returns nil if not found
func (client *PreUpgradeTaskClient) GetMqtCRD() *v1.CustomResourceDefinition {
crd, err := client.apiExtClient.ApiextensionsV1().CustomResourceDefinitions().Get(context.TODO(), MqtCRD, metav1.GetOptions{})
if err != nil {
client.logger.Error("Could not find MQT CRD", zap.Error(err))
return nil
}
return crd
}
// LatestSchemaApplied ensures that the end user has applied the latest CRDs generated to the cluster.
// For future reference: whenever a new field is added, we need to check for that field's existence in this function
func (client *PreUpgradeTaskClient) LatestSchemaApplied() error {
client.logger.Info("Checking if user has applied the latest CRDs")
funcCRD := client.GetFunctionCRD()
if funcCRD == nil {
return errors.New("Could not get the Function CRD")
}
// Any new field added in Function spec can be checked here provided the substring matches the description in CRD Validation of the field
if !strings.Contains(funcCRD.Spec.String(), "RequestsPerPod") || !strings.Contains(funcCRD.Spec.String(), "OnceOnly") {
return errors.New("Apply the newer CRDs before upgrading")
}
return false
mqtCRD := client.GetMqtCRD()
if mqtCRD == nil {
return errors.New("Could not get the MQT CRD")
}
// Any new field added in MQT spec can be checked here provided the substring matches the description in CRD Validation of the field
if !strings.Contains(mqtCRD.Spec.String(), "PodSpec") {
return errors.New("Apply the newer CRDs before upgrading")
}
return nil
}
// VerifyFunctionSpecReferences verifies that a function references secrets, configmaps, pkgs in its own namespace and
@@ -86,12 +120,11 @@ func (client *PreUpgradeTaskClient) IsFissionReInstall() bool {
func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
client.logger.Info("verifying function spec references for all functions in the cluster")
var 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{})
fList, err = client.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
if err == nil {
break
}
@@ -103,28 +136,30 @@ func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
zap.Int("max_retries", maxRetries))
}
errs := &multierror.Error{}
// 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))
if secret.Namespace != fn.ObjectMeta.Namespace {
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a secret : %s in namespace : %s", fn.ObjectMeta.Name, fn.ObjectMeta.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 configmap.Namespace != fn.ObjectMeta.Namespace {
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a configmap : %s in namespace : %s", fn.ObjectMeta.Name, fn.ObjectMeta.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 fn.Spec.Package.PackageRef.Namespace != fn.ObjectMeta.Namespace {
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a package : %s in namespace : %s", fn.ObjectMeta.Name, fn.ObjectMeta.Namespace, fn.Spec.Package.PackageRef.Name, fn.Spec.Package.PackageRef.Namespace))
}
}
if result != nil {
if errs.ErrorOrNil() != 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"))
@@ -132,91 +167,3 @@ func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
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
}
+43
View File
@@ -0,0 +1,43 @@
FROM golang:1.15-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/reporter
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 go build \
-o /go/bin/reporter \
-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.13 as base
RUN apk add --update ca-certificates
COPY --from=builder /go/bin/reporter /
ENTRYPOINT ["/reporter"]
@@ -1,11 +1,11 @@
/*
Copyright 2014 Google Inc.
Copyright 2021 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,21 +14,20 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package stringutil
package app
import "testing"
import (
"github.com/spf13/cobra"
)
func TestReverse(t *testing.T) {
for _, c := range []struct {
in, want string
}{
{"Hello, world", "dlrow ,olleH"},
{"Hello, 世界", "界世 ,olleH"},
{"", ""},
} {
got := Reverse(c.in)
if got != c.want {
t.Errorf("Reverse(%q) == %q, want %q", c.in, got, c.want)
}
func App() *cobra.Command {
cobra.EnableCommandSorting = false
rootCmd := &cobra.Command{
Use: "reporter",
Short: "Report fission events to analytics service",
ValidArgs: []string{"event"},
Args: cobra.OnlyValidArgs,
}
rootCmd.AddCommand(EventCommand())
return rootCmd
}
+76
View File
@@ -0,0 +1,76 @@
/*
Copyright 2021 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 (
"log"
"github.com/fission/fission/pkg/tracker"
"github.com/spf13/cobra"
)
func eventCommandHandler(cmd *cobra.Command, args []string) error {
var err error
flags := cmd.PersistentFlags()
event := tracker.Event{}
event.Category, err = flags.GetString("category")
if err != nil {
return err
}
event.Action, err = flags.GetString("action")
if err != nil {
return err
}
event.Label, err = flags.GetString("label")
if err != nil {
return err
}
event.Value, err = flags.GetString("value")
if err != nil {
return err
}
return tracker.Tracker.SendEvent(event)
}
//EventCommand reports an event to analytics
func EventCommand() *cobra.Command {
eventCmd := &cobra.Command{
Use: "event",
Short: "Report event to analytics",
RunE: eventCommandHandler,
Args: cobra.NoArgs,
}
persistentFlags := eventCmd.PersistentFlags()
persistentFlags.StringP("category", "c", "", "event category")
persistentFlags.StringP("action", "a", "", "event action")
persistentFlags.StringP("label", "l", "", "event label")
persistentFlags.StringP("value", "v", "", "event value")
err := eventCmd.MarkPersistentFlagRequired("category")
if err != nil {
log.Fatal(err)
}
err = eventCmd.MarkPersistentFlagRequired("action")
if err != nil {
log.Fatal(err)
}
return eventCmd
}
@@ -1,11 +1,11 @@
/*
Copyright 2014 Google Inc.
Copyright 2021 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
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,
@@ -17,11 +17,14 @@ limitations under the License.
package main
import (
"fmt"
"log"
"github.com/golang/example/stringutil"
"github.com/fission/fission/cmd/reporter/app"
)
func main() {
fmt.Println(stringutil.Reverse("!selpmaxe oG ,olleH"))
err := app.App().Execute()
if err != nil {
log.Fatal(err)
}
}
+81
View File
@@ -0,0 +1,81 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: canaryconfigs.fission.io
spec:
group: fission.io
names:
kind: CanaryConfig
listKind: CanaryConfigList
plural: canaryconfigs
singular: canaryconfig
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: CanaryConfig is for canary deployment of two functions.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: CanaryConfigSpec defines the canary configuration spec
properties:
duration:
description: 'Weight increment interval, string representation of time.Duration, ex : 1m, 2h, 2d (default: "2m")'
type: string
failureType:
description: FailureType refers to the type of failure
type: string
failurethreshold:
description: Threshold in percentage beyond which the new version of the function is considered unstable
type: integer
newfunction:
description: New version of the function
type: string
oldfunction:
description: Old stable version of the function
type: string
trigger:
description: HTTP trigger that this config references
type: string
weightincrement:
description: Weight increment step for function
type: integer
required:
- newfunction
- oldfunction
- trigger
type: object
status:
description: CanaryConfigStatus represents canary config status
properties:
status:
type: string
required:
- status
type: object
required:
- metadata
- spec
- status
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
File diff suppressed because it is too large Load Diff
+177
View File
@@ -0,0 +1,177 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: functions.fission.io
spec:
group: fission.io
names:
kind: Function
listKind: FunctionList
plural: functions
shortNames:
- fn
singular: function
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: Function is function runs within environment runtime with given package and secrets/configmaps.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: FunctionSpec describes the contents of the function.
properties:
InvokeStrategy:
description: InvokeStrategy is a set of controls which affect how function executes
properties:
ExecutionStrategy:
description: ExecutionStrategy specifies low-level parameters for function execution, such as the number of instances.
properties:
ExecutorType:
description: "ExecutorType is the executor type of a function used. Defaults to \"poolmgr\". \n Available value: - poolmgr - newdeploy"
type: string
MaxScale:
description: This is only for newdeploy to set up maximum replicas of deployment.
type: integer
MinScale:
description: This is only for newdeploy to set up minimum replicas of deployment.
type: integer
SpecializationTimeout:
description: This is the timeout setting for executor to wait for pod specialization.
type: integer
TargetCPUPercent:
description: This is only for newdeploy to set up target CPU utilization of HPA.
type: integer
type: object
StrategyType:
description: StrategyType is the strategy type of a function. Now it only supports 'execution'.
type: string
type: object
concurrency:
description: Maximum number of pods to be specialized which will serve requests This is optional. If not specified default value will be taken as 500
type: integer
configmaps:
description: Reference to a list of configmaps.
items:
description: ConfigMapReference is a reference to a kubernetes configmap.
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
nullable: true
type: array
environment:
description: Environment is the build and runtime environment that this function is associated with. An Environment with this name should exist, otherwise the function cannot be invoked.
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
functionTimeout:
description: FunctionTimeout provides a maximum amount of duration within which a request for a particular function execution should be complete. This is optional. If not specified default value will be taken as 60s
type: integer
idletimeout:
description: IdleTimeout specifies the length of time that a function is idle before the function pod(s) are eligible for deletion. If no traffic to the function is detected within the idle timeout, the executor will then recycle the function pod(s) to release resources.
type: integer
onceOnly:
description: OnceOnly specifies if specialized pod will serve exactly one request in its lifetime and would be garbage collected after serving that one request This is optional. If not specified default value will be taken as false
type: boolean
package:
description: Reference to a package containing deployment and optionally the source.
properties:
functionName:
description: "FunctionName specifies a specific function within the package. This allows functions to share packages, by having different functions within the same package. \n Fission itself does not interpret this path. It is passed verbatim to build and runtime environments. \n This is optional: if unspecified, the environment has a default name."
type: string
packageref:
description: Package reference
properties:
name:
type: string
namespace:
type: string
resourceversion:
description: Including resource version in the reference forces the function to be updated on package update, making it possible to cache the function based on its metadata.
type: string
type: object
type: object
requestsPerPod:
description: RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod This is optional. If not specified default value will be taken as 1
type: integer
resources:
description: cpu and memory resources as per K8S standards This is only for newdeploy to set up resource limitation when creating deployment for a function.
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
secrets:
description: Reference to a list of secrets.
items:
description: SecretReference is a reference to a kubernetes secret.
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
nullable: true
type: array
required:
- InvokeStrategy
- environment
- package
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
+109
View File
@@ -0,0 +1,109 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: httptriggers.fission.io
spec:
group: fission.io
names:
kind: HTTPTrigger
listKind: HTTPTriggerList
plural: httptriggers
singular: httptrigger
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: HTTPTrigger is the trigger invokes user functions when receiving HTTP requests.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: HTTPTriggerSpec is for router to expose user functions at the given URL path.
properties:
createingress:
description: If CreateIngress is true, router will create a ingress definition.
type: boolean
functionref:
description: FunctionReference is a reference to the target function.
properties:
functionweights:
additionalProperties:
type: integer
description: Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose.
nullable: true
type: object
name:
description: Name of the function.
type: string
type:
description: 'Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights'
type: string
required:
- name
- type
type: object
host:
description: 'TODO: remove this field since we have IngressConfig already Deprecated: the original idea of this field is not for setting Ingress. Since we have IngressConfig now, remove Host after couple releases.'
type: string
ingressconfig:
description: 'TODO: make IngressConfig a independent Fission resource IngressConfig for router to set up Ingress.'
properties:
annotations:
additionalProperties:
type: string
description: Annotations will be add to metadata when creating Ingress.
nullable: true
type: object
host:
description: Host is for ingress controller to apply rules. If host is empty or "*", the rule applies to all inbound HTTP traffic.
type: string
path:
description: Path is for path matching. The format of path depends on what ingress controller you used.
type: string
tls:
description: TLS is for user to specify a Secret that contains TLS key and certificate. The domain name in the key and crt must match the value of Host field.
type: string
type: object
method:
description: Use Methods instead of Method. This field is going to be deprecated in a future release HTTP method to access a function.
type: string
methods:
description: HTTP methods to access a function
items:
type: string
type: array
prefix:
description: 'Prefix with which functions are exposed. NOTE: Prefix takes precedence over URL/RelativeURL. Note that it does not treat slashes specially ("/foobar/" will be matched by the prefix "/foobar").'
type: string
relativeurl:
description: RelativeURL is the exposed URL for external client to access a function with.
type: string
required:
- functionref
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
@@ -0,0 +1,82 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: kuberneteswatchtriggers.fission.io
spec:
group: fission.io
names:
kind: KubernetesWatchTrigger
listKind: KubernetesWatchTriggerList
plural: kuberneteswatchtriggers
singular: kuberneteswatchtrigger
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: KubernetesWatchTrigger watches kubernetes resource events and invokes functions.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: KubernetesWatchTriggerSpec defines spec of KuberenetesWatchTrigger
properties:
functionref:
description: The reference to a function for kubewatcher to invoke with when receiving events.
properties:
functionweights:
additionalProperties:
type: integer
description: Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose.
nullable: true
type: object
name:
description: Name of the function.
type: string
type:
description: 'Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights'
type: string
required:
- name
- type
type: object
labelselector:
additionalProperties:
type: string
description: Resource labels
type: object
namespace:
type: string
type:
description: Type of resource to watch (Pod, Service, etc.)
type: string
required:
- functionref
- namespace
- type
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
File diff suppressed because it is too large Load Diff
+127
View File
@@ -0,0 +1,127 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: packages.fission.io
spec:
group: fission.io
names:
kind: Package
listKind: PackageList
plural: packages
shortNames:
- pkg
singular: package
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: Package Think of these as function-level images.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: PackageSpec includes source/deploy archives and the reference of environment to build the package.
properties:
buildcmd:
description: BuildCommand is a custom build command that builder used to build the source archive.
type: string
deployment:
description: Deployment is the deployable archive that environment runtime used to run user function.
properties:
checksum:
description: Checksum ensures the integrity of packages referenced by URL. Ignored for literals.
properties:
sum:
type: string
type:
description: ChecksumType specifies the checksum algorithm, such as sha256, used for a checksum.
type: string
type: object
literal:
description: Literal contents of the package. Can be used for encoding packages below TODO (256KB?) size.
format: byte
type: string
type:
description: 'Type defines how the package is specified: literal or URL. Available value: - literal - url'
type: string
url:
description: URL references a package.
type: string
type: object
environment:
description: Environment is a reference to the environment for building source archive.
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
source:
description: Source is the archive contains source code and dependencies file. If the package status is in PENDING state, builder manager will then notify builder to compile source and save the result as deployable archive.
properties:
checksum:
description: Checksum ensures the integrity of packages referenced by URL. Ignored for literals.
properties:
sum:
type: string
type:
description: ChecksumType specifies the checksum algorithm, such as sha256, used for a checksum.
type: string
type: object
literal:
description: Literal contents of the package. Can be used for encoding packages below TODO (256KB?) size.
format: byte
type: string
type:
description: 'Type defines how the package is specified: literal or URL. Available value: - literal - url'
type: string
url:
description: URL references a package.
type: string
type: object
required:
- environment
type: object
status:
description: Status indicates the build status of package.
properties:
buildlog:
description: BuildLog stores build log during the compilation.
type: string
buildstatus:
default: Pending
description: BuildStatus is the package build status.
type: string
lastUpdateTimestamp:
description: LastUpdateTimestamp will store the timestamp the package was last updated metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. https://github.com/kubernetes/apimachinery/blob/44bd77c24ef93cd3a5eb6fef64e514025d10d44e/pkg/apis/meta/v1/time.go#L26-L35
format: date-time
nullable: true
type: string
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
+74
View File
@@ -0,0 +1,74 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: timetriggers.fission.io
spec:
group: fission.io
names:
kind: TimeTrigger
listKind: TimeTriggerList
plural: timetriggers
singular: timetrigger
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: TimeTrigger invokes functions based on given cron schedule.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: TimeTriggerSpec invokes the specific function at a time or times specified by a cron string.
properties:
cron:
description: Cron schedule
type: string
functionref:
description: The reference to function
properties:
functionweights:
additionalProperties:
type: integer
description: Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose.
nullable: true
type: object
name:
description: Name of the function.
type: string
type:
description: 'Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights'
type: string
required:
- name
- type
type: object
required:
- cron
- functionref
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
+13
View File
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
group: fission.io
resources:
- fission.io_canaryconfigs.yaml
- fission.io_environments.yaml
- fission.io_functions.yaml
- fission.io_httptriggers.yaml
- fission.io_kuberneteswatchtriggers.yaml
- fission.io_messagequeuetriggers.yaml
- fission.io_packages.yaml
- fission.io_timetriggers.yaml
-5
View File
@@ -81,11 +81,6 @@ clear
popd
#
# Record replay
#
clear
#
# Canary Deployments
#
+6 -3
View File
@@ -1,12 +1,15 @@
package main
import (
"log"
"net/http"
)
// Handler is the entry point for this fission function
func Handler(w http.ResponseWriter, r *http.Request) {
func Handler(w http.ResponseWriter, r *http.Request) { //nolint: deadcode
msg := "Hello, CNCF Webinar!\n"
w.Write([]byte(msg))
_, err := w.Write([]byte(msg))
if err != nil {
log.Fatal(err)
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ metadata:
name: guestbook
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
-6
View File
@@ -1,6 +0,0 @@
#!/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
-7
View File
@@ -1,7 +0,0 @@
from flask import request
from flask import current_app
def main():
name=request.args["name"]
return "Hello, %s" % name
-28
View File
@@ -1,28 +0,0 @@
#!/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"
-18
View File
@@ -1,18 +0,0 @@
FROM golang:onbuild
WORKDIR /go
COPY *.go /go/
RUN GOOS=linux GOARCH=386 go build -o server .
FROM alpine:3.5
WORKDIR /app
RUN apk update
RUN apk add coreutils binutils findutils grep
COPY --from=0 /go/server /app/server
EXPOSE 8888
ENTRYPOINT ["./server"]
-59
View File
@@ -1,59 +0,0 @@
# Binary Environment Examples
The `binary` runtime is a go server that uses a subprocess to invoke executables or execute shell scripts.
Use Cases
- Execute bash scripts
- Execute arbitrary binaries (such as common sysadmin tools)
- Get support in _any_ programming language by executing the generated executable.
⚠️ **Words of Caution** ⚠️
The environment runs on an alpine image with some additional utility commandline tools installed, such as 'grep'.
However, in case you want to make use of more esoteric commandline tools, you should add the relevant apk to the
Dockerfile and build a new binary environment. See 'Compiling' for instructions.
When executing functions using binaries, **ensure that the executable is built for the right architecture**.
Using the default binary environment this means that the binary should be build for Linux.
Looking for ready-to-run examples? See the [binary examples directory](../../examples/binary).
## Usage
To get started with the latest binary environment:
```bash
fission env create --name binary --image fission/binary-env --builder fission/binary-builder
```
The interface to the executable used by this environment is somewhat similar to a [CGI interface](https://en.wikipedia.org/wiki/Common_Gateway_Interface).
This means that any HTTP headers are converted to environment variables of the form "HTTP_<header-name>". For example these
are some of frequently occurring headers:
```bash
# Request Metadata
CONTENT_LENGTH
REQUEST_URI
REQUEST_METHOD
# HTTP Headers
HTTP_ACCEPT
HTTP_USER-AGENT
HTTP_CONTENT-TYPE
# ...
```
The body of HTTP piped over the STDIN to the executable.
All output that is provided to the server over the STDOUT will be transformed into the HTTP response.
## Compiling
To build the runtime environment:
```bash
docker build --tag=${USER}/binary-env .
```
To build the builder environment:
```bash
(cd builder/ && docker build --tag=${USER}/binary-builder .)
```
-4
View File
@@ -1,4 +0,0 @@
ARG BUILDER_IMAGE=fission/builder:latest
FROM ${BUILDER_IMAGE}
ADD build.sh /usr/local/bin/build
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
apk update
CWD=$(pwd)
if [ -f ${SRC_PKG}/build.sh ]; then
cd ${SRC_PKG}
./build.sh
cd ${CWD}
fi
cp -rf ${SRC_PKG} ${DEPLOY_PKG}
-47
View File
@@ -1,47 +0,0 @@
package main
import (
"fmt"
"strings"
)
// Utility functions for working with environment variables
type Env struct {
Vars []*EnvVar
}
type EnvVar struct {
Key string
Val string
}
func FromString(rawEnvVar string) *EnvVar {
parts := strings.SplitN(rawEnvVar, "=", 2)
return &EnvVar{parts[0], parts[1]}
}
func (ev *EnvVar) ToString() string {
return fmt.Sprintf("%s=%s", ev.Key, ev.Val)
}
func (e *Env) SetEnv(envVar *EnvVar) {
e.Vars = append(e.Vars, envVar)
}
func (e *Env) ToStringEnv() []string {
var result []string
for _, envVar := range e.Vars {
result = append(result, envVar.ToString())
}
return result
}
func NewEnv(stringEnv []string) *Env {
env := &Env{}
if stringEnv != nil {
for _, rawEnvVar := range stringEnv {
env.SetEnv(FromString(rawEnvVar))
}
}
return env
}
-178
View File
@@ -1,178 +0,0 @@
package main
import (
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path/filepath"
"strings"
)
const (
DEFAULT_CODE_PATH = "/userfunc/user"
DEFAULT_INTERNAL_CODE_PATH = "/bin/userfunc"
)
var specialized bool
type (
BinaryServer struct {
fetchedCodePath string
internalCodePath string
}
FunctionLoadRequest struct {
// FilePath is an absolute filesystem path to the
// function. What exactly is stored here is
// env-specific. Optional.
FilePath string `json:"filepath"`
// FunctionName has an environment-specific meaning;
// usually, it defines a function within a module
// containing multiple functions. Optional; default is
// environment-specific.
FunctionName string `json:"functionName"`
// URL to expose this function at. Optional; defaults
// to "/".
URL string `json:"url"`
}
)
func (bs *BinaryServer) SpecializeHandler(w http.ResponseWriter, r *http.Request) {
if specialized {
w.WriteHeader(http.StatusBadRequest)
w.Write([]byte("Not a generic container"))
return
}
request := FunctionLoadRequest{}
codePath := bs.fetchedCodePath
err := json.NewDecoder(r.Body).Decode(&request)
switch {
case err == io.EOF:
case err != nil:
panic(err)
}
if request.FilePath != "" {
fileStat, err := os.Stat(request.FilePath)
if err != nil {
panic(err)
}
codePath = request.FilePath
switch mode := fileStat.Mode(); {
case mode.IsDir():
codePath = filepath.Join(request.FilePath, request.FunctionName)
}
}
_, err = os.Stat(codePath)
if err != nil {
if os.IsNotExist(err) {
w.WriteHeader(http.StatusNotFound)
w.Write([]byte(codePath + ": not found"))
return
} else {
panic(err)
}
}
// Future: Check if executable is correct architecture/executable.
// Copy the executable to ensure that file is executable and immutable.
userFunc, err := ioutil.ReadFile(codePath)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte("Failed to read executable."))
return
}
err = ioutil.WriteFile(bs.internalCodePath, userFunc, 0555)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte("Failed to write executable to target location."))
return
}
fmt.Println("Specializing ...")
specialized = true
fmt.Println("Done")
}
func (bs *BinaryServer) InvocationHandler(w http.ResponseWriter, r *http.Request) {
if !specialized {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte("Generic container: no requests supported"))
return
}
// CGI-like passing of environment variables
execEnv := NewEnv(nil)
execEnv.SetEnv(&EnvVar{"REQUEST_METHOD", r.Method})
execEnv.SetEnv(&EnvVar{"REQUEST_URI", r.RequestURI})
execEnv.SetEnv(&EnvVar{"CONTENT_LENGTH", fmt.Sprintf("%d", r.ContentLength)})
for header, val := range r.Header {
execEnv.SetEnv(&EnvVar{fmt.Sprintf("HTTP_%s", strings.ToUpper(header)), val[0]})
}
// Future: could be improved by keeping subprocess open while environment is specialized
cmd := exec.Command(bs.internalCodePath)
cmd.Env = execEnv.ToStringEnv()
if r.ContentLength != 0 {
fmt.Println(r.ContentLength)
stdin, err := cmd.StdinPipe()
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(fmt.Sprintf("Failed to get STDIN pipe: %s", err)))
panic(err)
}
_, err = io.Copy(stdin, r.Body)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(fmt.Sprintf("Failed to pipe input: %s", err)))
}
stdin.Close()
}
out, err := cmd.Output()
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(fmt.Sprintf("Function error: %s", err)))
return
}
w.WriteHeader(http.StatusOK)
w.Write(out)
}
func main() {
codePath := flag.String("c", DEFAULT_CODE_PATH, "Path to expected fetched executable.")
internalCodePath := flag.String("i", DEFAULT_INTERNAL_CODE_PATH, "Path to specialized executable.")
flag.Parse()
absInternalCodePath, err := filepath.Abs(*internalCodePath)
if err != nil {
panic(err)
}
fmt.Printf("Using fetched code path: %s\n", *codePath)
fmt.Printf("Using internal code path: %s\n", absInternalCodePath)
server := &BinaryServer{*codePath, absInternalCodePath}
http.HandleFunc("/", server.InvocationHandler)
http.HandleFunc("/specialize", server.SpecializeHandler)
http.HandleFunc("/v2/specialize", server.SpecializeHandler)
fmt.Println("Listening on 8888 ...")
err = http.ListenAndServe(":8888", nil)
if err != nil {
panic(err)
}
}
-6
View File
@@ -1,6 +0,0 @@
bin/*
obj/*
out/*
.vscode/*
project.lock*
TODO_dotnet
-15
View File
@@ -1,15 +0,0 @@
FROM microsoft/dotnet:1.1-sdk AS builder
COPY * /proj/
RUN cd /proj && ./project-build.sh
# Build env image
FROM microsoft/dotnet:1.1.0-runtime
WORKDIR /fission-workdir
COPY --from=builder /proj/out .
EXPOSE 8888
ENTRYPOINT ["dotnet"]
CMD ["fission-dotnet.dll"]
-82
View File
@@ -1,82 +0,0 @@
using Fission.DotNetCore.Compiler;
using Fission.DotNetCore.Api;
using System.Collections.Generic;
using Nancy;
using System.IO;
using System;
namespace Fission.DotNetCore
{
public class ExecutorModule : NancyModule
{
#if DEBUG
private const string CODE_PATH = "/tmp/func.cs";
#else
private const string CODE_PATH = "/userfunc/user";
#endif
private static Function _userFunc;
private static Logger _logger = new Logger();
public ExecutorModule()
{
Post("/specialize", args => Specialize());
Get("/", _ => Run());
Post("/", _ => Run());
Put("/", _ => Run());
Head("/", _ => Run());
Options("/", _ => Run());
Delete("/", _ => Run());
}
private object Specialize()
{
var errors = new List<string>();
if (File.Exists(CODE_PATH))
{
var code = File.ReadAllText(CODE_PATH);
_userFunc = FissionCompiler.Compile(code, out errors);
if (_userFunc == null)
{
var errstr = string.Join(Environment.NewLine, errors);
_logger.WriteError(errstr);
var response = (Response)errstr;
response.StatusCode = HttpStatusCode.InternalServerError;
return response;
}
return null;
}
else
{
var errstr = $"Unable to locate code at '{CODE_PATH}'";
_logger.WriteError(errstr);
var response = (Response)errstr;
response.StatusCode = HttpStatusCode.InternalServerError;
return response;
}
}
private object Run()
{
if (_userFunc == null)
{
var response = (Response)"Generic container: no requests supported";
response.StatusCode = HttpStatusCode.InternalServerError;
return response;
}
try
{
return _userFunc.Invoke(FissionContext.Build(Request, new Logger()));
}
catch (Exception e)
{
_logger.WriteError(e.ToString());
var response = (Response)e.Message;
response.StatusCode = HttpStatusCode.BadRequest;
return response;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More