Commit Graph
31 Commits
Author SHA1 Message Date
Ta-Ching ChenandSoam Vasani a63b8b372f Builder manager bugfixes (#367)
This contains a few different builder manager fixes:

* Update the zip file structure to avoid an extra subdirectory
* Annotate packages with what functions are using them
* Only trigger builds when there is no deployment archive
* Python environment loadpath bugfixes
* Other bugfixes
2017-11-06 23:01:46 -08:00
Ta-Ching ChenandSoam Vasani 380b7d1bcd Use k8s client store to sync functions and triggers for fast synchronization (#382) 2017-11-06 12:58:19 -08:00
Ta-Ching ChenandSoam Vasani 5f14b9b0ae Switch from ThirdPartyResources to CustomResourceDefinitions (#381)
Switch Fission's storage over to the new CustomResourceDefinitions, from the deprecated ThirdPartyResources. This allows us to be compatible with Kubernets 1.8 and onwards.

This also adds a CLI tool for dumping state from an old fission version and restoring state into new CRDs.

The storage service is unaffected by this change.
2017-11-04 14:55:16 -07:00
Ta-Ching ChenandSoam Vasani 439e7d4535 Use Kubernetes informer and cache in router (#376)
Use Kubernetes client's informer and cache to watch functions and triggers in the router. This replaces the polling loop we were using so far.
2017-10-25 15:10:44 -07:00
Ta-Ching ChenandSoam Vasani a25c167d23 Update k8s client version to 4.0.0 (#351)
Move to client-go v4.0.0 from 1.5.
2017-09-29 07:37:36 -07:00
Ta-Ching ChenandSoam Vasani e587eca08f Add builder manager support (#308)
This change orchestrates function builds.

Environments (in v2) define a builder image, just like they do a runtime image. The builder image contains a build script that's invoked with source and deployment paths (as env vars).

The buildermgr watches for environments with build images defined, and creates build deployments and services.

Functions can define source and deployment. Buildermgr watches for functions with source code (and build status == pending) and invokes the environment's builder when appropriate. It captures logs from the build and sets the build status (success/failure) and build lots into the PackageStatus.
2017-09-25 07:53:09 -07:00
Ta-Ching ChenandSoam Vasani a720377f3c Use Containers to find matched storage containers (#350) (#353)
Use stow api correctly to find our function storage container on restarts.
2017-09-24 10:36:06 -07:00
Ta-Ching ChenandSoam Vasani 42819ba362 Fix storage service failed to start after restarting it (#352) 2017-09-24 08:21:13 -07:00
Ta-Ching ChenandSoam Vasani e56e6482b3 Fix missing checksum from CLI uploads (issue #342) (#343)
Archive upload from the CLI wasn't filling in the checksum field, causing validation to fail.
2017-09-22 12:27:42 -07:00
Ta-Ching ChenandSoam Vasani 9d7bd49338 Use latest function metadata to check cached function service. (#316)
Watch functions in the router and use that to trigger functionReferenceResolver cache invalidation.

We might want to rate-limit syncTriggers in a future change, since we might be triggering it more often than needed.
2017-09-08 13:53:02 -07:00
Ta-Ching ChenandSoam Vasani 1b9fa5bc30 Unarchive zip file after fetcher downloads the package (#301)
Fetcher now uncompresses archive files. 

This is triggered by automatically detecting the file format, although maybe we should make that explicit or at least move the detection into the client.
2017-09-01 07:50:47 -07:00
Ta-Ching ChenandSoam Vasani 9d1b096bac Add Environment v2 Builder (#298)
Build server and client for environments.

This build server will run inside environment builders and invoke environment-specific scripts for doing builds. It provides a uniform language-independent API for builds to the fission build manager.

The change also includes an implementation of a builder for Python -- this "builder" acts on requirements.txt and runs `pip install` to collect all function deps.
2017-08-31 10:56:40 -07:00
Ta-Ching ChenandSoam Vasani c03f1a6d9c Add env builder & srcpkg through cli (#296)
CLI support for specifying an environment builder and source packages.
2017-08-28 10:44:31 -07:00
Ta-Ching ChenandSoam Vasani 31f94dbc12 Set fetcher image through poolmgr env (#280)
Add a helm value for the fetcher image. Pass the fetcher image path to poolmgr through an env var.
2017-08-18 15:12:10 -07:00
Ta-Ching ChenandSoam Vasani 6bca24a3f5 Fix fetcher failed to access TPR if RBAC is enabled (#288) 2017-08-18 15:01:21 -07:00
Ta-Ching ChenandSoam Vasani 961ee069ed Set message content-type based on the trigger.Spec.ContentType (#279) 2017-08-17 10:30:24 -07:00
Ta-Ching ChenandSoam Vasani a52425a31d Parse metadata.Name before creating tpr resource (#284) 2017-08-14 08:55:31 -07:00
Ta-Ching ChenandSoam Vasani 45f3095fb1 Remove etcd from fission-all chart (#282)
Since we use Kubernetes APIs for storing our state now, etcd can be removed.
2017-08-12 16:04:30 -07:00
Ta-Ching ChenandSoam Vasani 37aa266a4d Update/Add fission-core & fission-all helm charts (#239)
Improve fission helm chart; split it into "fission core" and "fission all". fission-core is the minimal install, and fission-all will have all the bells and whistles.

* Update/Add fission-core & fission-all helm charts
* Fix incompatible types for comparison
* Add message queue trigger
* Rename openshiftRBAC to openshift
* Update documentation & comments
* Fix logger & kubewatcher failed to access kubernetes resource due to RBAC
2017-07-31 14:10:26 -07:00
Ta-Ching ChenandSoam Vasani a8fc7a7029 Fix nats trigger replies message to non-existing resptopic (#260) 2017-07-26 11:43:23 -07:00
Ta-Ching ChenandSoam Vasani 2036d80778 Fix logger prints wrong log (#263) 2017-07-20 13:44:23 -07:00
Ta-Ching ChenandSoam Vasani 46ff55ab49 Fix unstoppable kubewatcher (#208)
Fix a bug due to which watches could never be stopped; simplify control flow a bit.
2017-07-10 16:01:48 -07:00
Ta-Ching ChenandSoam Vasani e4fe007838 Add message queue trigger support (#218)
Adds support for message queue triggers based on the NATS-Streaming message queue.

This lets the user map a queue topic to a function, and optionally send the function's response into another queue topic.

The message queue trigger manager is designed to be message queue independent, so we should be able add support for more queues by adding implementations for the relatively simple mqtrigger.MessageQueue interface.
2017-07-05 17:19:58 -07:00
Ta-Ching ChenandSoam Vasani 5fe4b276eb Fission update must require at least one change to function (#241) 2017-06-26 22:22:09 -07:00
Ta-Ching ChenandSoam Vasani d9b98830cf Fix http response body not closed correctly, return immediately on error (#210)
* Fix controller timer handler not return when error occurred

* Fix controller not close http response correctly

This PR aims to fix controller not close response correctly. Also, I’ve check all over the project there is no more resource leak issues exist after this patch.

* Fix controller not return immediately when error occurred

* Sort import
2017-06-17 13:10:54 -07:00
Ta-Ching ChenandSoam Vasani c43cde8891 Fix pool contains wrong environment metadata (#221)
The generic pool manager creates a generic pool with the reference of environment metadata. Since the reference is address of loop variable, so the content of metadata will be replaced with the last element of envs. So pool manager sets up logging with wrong env.
2017-06-08 11:11:58 -07:00
Ta-Ching ChenandSoam Vasani 2f6cd6d659 Print log when timetrigger is removed (#209) 2017-05-30 14:21:41 -07:00
Ta-Ching ChenandSoam Vasani 990d943f21 Retrieve function logs from controller (#207)
Establish a proxy server from the controller to the log database.

Redirect query commands send from client to database then proxy back the db response.

Use parameter binding instead of fmt.Sprintf to prevent SQL injection.
2017-05-30 14:19:22 -07:00
Ta-Ching ChenandSoam Vasani a13015e75a Add function logs support (#53) (#131)
Add function log aggregation and persistence using Fluentd and InfluxDB.

Fluentd and a helper sidecar run as a daemonset.  The poolmgr sets up logging for each function pod, using the helper sidecar. Fluentd forwards logs to InfluxDB, which is run as a deployment and service. The client CLI directly queries InfluxDB for logs.

Fluentd supports many outputs besides InfluxDB, so we aren't very tied to InfluxDB.

The setup is somewhat manual, which we should be able to improve by integrating this into the helm chart.

Diagram of component interactions: https://cloud.githubusercontent.com/assets/202578/23100399/b0e3ea00-f6ba-11e6-8f2f-6588cfef2e84.png
2017-03-22 15:59:42 -07:00
Ta-Ching ChenandSoam Vasani ad63ba63c8 Fixed pod has no ip (#139) (#141)
Fixes #139.  The code before this change was saving up pointers to the loop variable in a slice. So loop was useless and we always chose the last pod in the list, whether it was ready or not.  With this fix, choosePod should always return a ready pod.

Also adds a check for the pod phase, before looping over the containers in the pod, and discard pods that aren't running yet.
2017-03-05 11:01:47 -08:00
Ta-Ching ChenandSoam Vasani 14c55912f5 Fix failure to delete function when function's file doesn't exist (#118) 2017-02-10 23:38:13 -08:00