Commit Graph
27 Commits
Author SHA1 Message Date
VishalandGitHub 92d66fa82b Configurable zero pool size in case of newdeploy function (#1121)
It should be possible to keep zero pool size when the environment is created so that there are no idle resources for a newdeploy function. Fixes: https://github.com/fission/fission/issues/1104
2019-03-18 15:52:29 +05:30
Ta-Ching ChenandGitHub 7cedf8d580 Fix issues when specifying resources/scales during updating/creation process (#970) 2018-11-29 20:46:48 +08:00
Ta-Ching ChenandGitHub bfa8e6a45f Show builder image when list all envs (#971) 2018-11-05 23:18:37 +08:00
Ta-Ching ChenandGitHub 6b49c194ca Fission supportability: Add dump command to dump information for debugging (#754)
* Add v1 support tool proposal
* Fission supportability: Add dump command to dump information for debugging
2018-09-19 14:35:51 +08:00
Ta-Ching ChenandGitHub 61569d1c38 Change flag name to KeepArchive for backward compatibility (#787) 2018-07-06 03:13:07 +08:00
VishalandGitHub 1b86c367a0 Added a flag to control the extraction of archive based on user input (#675)
For certain environments, the archive should not be extracted and kept as it is (For ex. for Java the jar file should not be extracted). This change enables an environment level flag to control this behaviour.
2018-06-14 12:32:40 +05:30
Erwin van EykandTa-Ching Chen cf1f944069 Extract portforward to separate package (#728)
* Extract port-forward from CLI to own package (for reuseability)
* Extract CLI logging to subpackage
2018-06-13 11:26:39 +08:00
Soam VasaniandGitHub 952b48bd68 Environment warning message bugfix (#725) 2018-06-07 14:17:27 -07:00
Ta-Ching ChenandGitHub 7a7d15b50c Update k8s dependencies to 1.10 (#687) 2018-06-01 15:43:19 +08:00
smruthi2187andGitHub 8984e4916e Enabling multi-tenancy for fission objects. (#655)
This feature allows creation of fission objects in different namespaces, in addition to retaining the existing behavior of creating fission objects in default namespace if user doesnt provide one. 
It also removes cluster admin roles for fission-fetcher and fission-builder Service Accounts and grants them only those privileges that they need.
2018-05-23 13:22:46 -07:00
VishalandTa-Ching Chen 2ece0db13f Fixed the issue with update wiping original values & added resources in listing, fixes #654 (#663) 2018-05-02 22:29:08 +08:00
Soam VasaniandGitHub 95a50dbbd6 --spec flags for env and trigger creates (#607) 2018-04-06 09:00:01 -07:00
Ta-Ching ChenandGitHub 2a06705320 Use a separate controller loop to watch functions change and create a service (#544) 2018-04-04 01:17:51 +08:00
VishalandSoam Vasani c0acaa74c3 Fixes the issue #559 with env versions (#569)
Do not set automatically set env version if user has already specified it.
2018-03-26 12:25:16 -07:00
VishalandGitHub b895f98e88 Update Fn: Executor New Deployment (#504)
Enables updating functions of executor type new deployment and switching between executor types for a function.
2018-02-28 16:33:39 +05:30
Ta-Ching ChenandGitHub 23942fdf7d Istio integration (#421)
This the very first step for fission to integrate with Istio, which is an open platform to connect, manage, and secure microservices. With Istio, users are able to monitor functions usage and trace requests latency through dashboards. For more information, please visit http://fission.io/docs/
2018-02-28 04:09:32 +08:00
VishalandTa-Ching Chen 4cf195768e Newdeploy backend (#387)
A newdeploy backend which uses new deployment to serve requests. This is the second phase of #193 and builds on top of changes in #384 .

* Executor layer added on top of pool manager

* Removed the external server for executor

* Minor changes to keep existing semantics as much possible

* Separating the executor vs. poolmgr backend functionality and associated data members

* Executor logic separated from Poolmgr backend completely, placeholder for new backend

* Changed references to poolmgr in tests

* Moved poolmgr to it's package, as a side effect moved Cache to its's package (was causing cyclical dependency) and had to make some data structures exposed outside package

* Rebased from master and changed references to tpr -> crd

* Executor layer added on top of pool manager

* Executor logic separated from Poolmgr backend completely, placeholder for new backend

* Changed podName to a generic objectReference in fscache (#391)

Changed podName to a generic objectReference in function service cache implementation.

* Moved poolmgr to it's package, as a side effect moved Cache to its's package (was causing cyclical dependency) and had to make some data structures exposed outside package

* Rebased from master and changed references to tpr -> crd

* Merged from master with latest changes

* Executor layer added on top of pool manager

* Removed the external server for executor

* Minor changes to keep existing semantics as much possible

* Separating the executor vs. poolmgr backend functionality and associated data members

* Executor logic separated from Poolmgr backend completely, placeholder for new backend

* Changed references to poolmgr in tests

* update compiling.md to use helm

* Compile instructions: changed pullPolicy to IfNotPresent (#378)

Containers will get stuck in ErrImagePull/ImagePullBackOff state otherwise

* Moved poolmgr to it's package, as a side effect moved Cache to its's package (was causing cyclical dependency) and had to make some data structures exposed outside package

* Fetcher called when pod is created for newDeploy backend but also supports older way, this is WIP and still needs pod specialization and creating & exposing a service so the URL can be hit by end user

* WIP Specializing the POD as part of startup along with fetching

* Working specialization of a new deployment. Needs some work on caching, cleanup etc.

* Switched to service based address instead of POD address

* Minor formating issue fixed

* Added logging to pods and a readiness check, the readiness check is flaky though ATM

* Fixed some rebase issues that were failing build

* Better names for K8S objects and methods

* Switched usage of FuncSvc in backends from pod to api.ObjectReference

* Adding retry to fetcher request, for now just using default retry client which might need tweaking in future

* Switching to plain old retry, some issue in getting retryablehttp with glide import

* Removed stale executor service & deployment from previous merge

* Addressed review comments, still testing some areas

* Added types in FunctionSpec

* Resolved conflicts due to merge from executor_abstraction branch

* Added backend type on EnvironmentSpec along with operations for create/list/update, the pools are created/destroyed based on change in backend type

* Backend from types and a minor err return issue fixed

* Draft version of CPU and memory parameters added to environment

* Added resourceReq to newDeploy, though it has some issues

* Issue with resourceName fixed, now newdeploy pods also pick up resources from the environment config

* Adding scale params, removing validation on CPU params for now

* Fixed a formatting issue

* Checking if slight more delay helps in the test which is currently failing for internal routes

* The resourceList newly added in Env can not be compared by compiler, hence must use breakdown comparison instead

* Added strategy selection on client side

* Added caching, informers, delete operations for newdeploy backend functions

* Deleted a stale directory

* A simple HPA based on scale parameters, testing still WIP

* Fixed a small issue in delete function, added HPA delete too when deleting a function

* Previous merge missed the pkg flag for update fn command somehow, fixed that

* Fixed comments from review

* Changed poolmgr cleanup to be generic cleanup and moved to executor, added instanceID labels to newdeploy so that cleanup works

* Moved instanceIdLabel to types to avoid cyclic dependency

* More review fixes

* Tweaking sleep to see results

* If user does not provide poolsize, then it should not default to zero

* Switched to naming convention for now, fixed default poolsize if not provided

* Changed error return behaviour in delete fn, also changed cleanup to look based on obj type though support for additional type will need more work

* Changed check location so avoid false logging

* Test for newdeploy backend

* Adding tests for poolmgr backend

* Fixed an issue with glide dependency version, already fixed in master

* Added instanceId for NewDeploy, Initial cleanup now cleans older objects of newdeploy backend, removed eagercreate flag and instead using minScale to drive eager creation

* Moved cleanup to executor layer with cleanup for newDeploy backend, changes to use the new Cache impl

* Cleaning up pod & rs along with deployment for newdeploy backend

* Enhanced fn and env listing to show min/maxscale and resuorces respectively

* Added conditional heapster deployment and fixed a small issue with resources for fetcher container in function pod

* Addressed review comments from previous change

* Addressed some more review comments - majorly create only on NotFoundError

* Added TargetCPU as an input for scaling

* Bumped target CPU to be greater than 0 and added a default value

* Min replicas should be 1 even if the minScale is 0 when creating deployment

* Changed name from 'backend' to executorType, added additional test for minscale 0 case, changed TargetCPU to TargetCPUPercent
2018-02-03 01:02:28 +08:00
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 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 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 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
Soam VasaniandGitHub e238776bf7 V2 types and TPR (#266)
This changes the core fission function, environment and trigger types. It also changes Fission's storage to use ThirdPartyResources.

 - Functions are now specified by packages. Functions can also have both source and deployment packages. A package can be specified by a literal, or by a URL.
 - Environments have a build and runtime component.
 - Triggers reference functions by a FunctionReference. This is a layer of indirection between triggers and functions, and will allow things like incremental function upgrades in future releases.

See Documentation/wip/env-v2.md for design discussion about points 1 and 2.

Changes:

* V2 Types

All types now have a spec, following the pattern of K8s objects.

Functions now have source and deployment packages. A Package can be
specified by literal, or by URL.

Environments now have a builder and runtime component.

All triggers use a new FunctionReference to specify the function. This
for now only uses a function name, but in the future can be extended
to be more flexible.

A new FunctionLoadRequest type is added for specialization requests to
the environment runtime.

* TPR types, TPR init code, and a "fission client"

Implements TPR types using the spec types in fission/types.go.

Adds code for adding creating TPR types, and convenient types for crud
operations on each of our resource types.

Adds code for connecting to K8s API and configuring a REST client with
fission types set up.

* Change old stateful controller into a thin apiserver

This apiserver is now simply a stateless api layer on top of the TPR
types. At the moment it doesn't do anything that couldn't be done by
simply talking to the TPR types. In the future we can have better
validation and potentially some higher level APIs (like versioning for
example) in here.

* Split controller client into files and update for v2 types.

* Update CLI for v2 types.

As far as possible we keep the CLI flags the same. We'll have to add
flags for source/deploy packages and builder/runtime
environments. That will come in the next change.

* Update poolmgr and fetcher for v2 types.

Also adds a poolmgr_test.

* Update router for new types.

Also adds a function reference resolver, which separates out the job
of resolving a FunctionReference to a function.

* Update kubewatcher and timer for v2 types.

* Update Message Queue trigger type for v2 types.

* Minor odds and ends.

* Fission bundle CLI updates

Remove controllerUrl flag, since we don't need it any more.

* Remove etcd deployment (replaced by storing state in TPR)

Also update the poolmgr commandline, and use an env var for the
fetcher image URL.

* Explicit ChecksumType and consts

* Clarify separation of environment interface types
2017-08-05 01:18:30 -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
Laurent CrisciandSoam Vasani c353e7f230 Error when env name/image not provided (#98)
I also renamed image to envImg for consistency
2017-02-02 10:23:16 -08:00
J. Gavin Ray 943d430870 # This is a combination of 2 commits.
# This is the 1st commit message:

Changed package names to match the new organization

# This is the commit message #2:

Forgot Cache
2016-12-24 08:11:35 -08:00
Soam Vasani 96616507fd Fission CLI
fission (function|httptrigger|environment) (create|get|update|delete|list)

TODO: Commands for getting status, logs, perf stats.  Commands for
changing configuration.  Add examples.
2016-11-04 22:59:52 -07:00