Commit Graph
106 Commits
Author SHA1 Message Date
Ta-Ching ChenandGitHub 9c885ef6f5 Fix spec command overrides existing archive's url of a package (#764) 2018-07-11 13:03:45 +08:00
Ta-Ching ChenandGitHub 61569d1c38 Change flag name to KeepArchive for backward compatibility (#787) 2018-07-06 03:13:07 +08:00
xiekeyangandSoam Vasani 74212f1810 envns should be availabe in message line (#734)
This line warns the user that dependent environment doesn’t exist, and presents the command line
for creating an environment.

When the variable `envNamespace` is specified, the `envns` option should be available as well.
2018-06-26 11:15:41 -07:00
Nafisa ShaziaandTa-Ching Chen 1ed59f0789 Push error messages to error topic when NATS mqtrigger fail (#724) 2018-06-27 00:27:57 +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
VishalandGitHub 6d08e6e0bc Archives bigger than 256K size need env variable for uploading (#697)
For archives bigger than 256K, the Storage service was called from the client side, this needed few environment variables to be set. This change uses port forwarding to achieve the same and does not need environment variables to be set.
2018-06-14 01:12:06 +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
Joe StevensandTa-Ching Chen 2ad07d68b6 Fix for Windows CLI Port Forwarding (#715) 2018-06-07 16:37:37 +08:00
Ta-Ching ChenandGitHub 0057270551 Add time trigger cron spec examination tool (#680) 2018-06-04 19:02:54 +08:00
Ta-Ching ChenandGitHub 7a7d15b50c Update k8s dependencies to 1.10 (#687) 2018-06-01 15:43:19 +08:00
VishalandGitHub a761393816 Ingress integration (#688)
Ingress integration to allow the optional creation of ingress for a given route. The ingress controller needs to be set up by the user separately so that ingress path is accessible outside the cluster.
2018-05-31 11:27:55 +05:30
Ta-Ching ChenandGitHub fedf6b6e5b Check spec directory exists before reading spec files (#709)
* Check spec directory exists before reading spec files
* Fix spec example
2018-05-31 03:01:40 +08:00
xiekeyangandTa-Ching Chen 940b9adabd Indicate HTTP status code by library const (#703) 2018-05-24 19:10:45 +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
VishalandTa-Ching Chen 0aff2f214d Fixes the issue with fn test and adds relevant test cases, fixes #650 (#651)
* Fixes the issue with fn test and adds relevant test cases, fixes #650
* Checking log size for invalid function
* Testing the invalid function logs a few time beforr quitting
* Disabling the test for now, linked to issue #653
2018-04-30 14:14:46 +08:00
VishalandTa-Ching Chen dec4a39c15 Function update should be possible without change to code (#652) 2018-04-30 11:35:19 +08:00
smruthi2187andTa-Ching Chen 772fdfa15c Setting package buildStatus to pending when functions source is updated. (#637) 2018-04-24 15:24:46 +08:00
VishalandTa-Ching Chen ff01cf2452 Removed the fn pods functionality (#594) 2018-04-19 14:32:16 +08:00
Ta-Ching ChenandGitHub cf53e17be5 Remove confusing default value description & add default value to cli flag (#619) 2018-04-16 17:27:10 +08:00
Ta-Ching ChenandGitHub d01b309fc7 Add validate function to crd resource and do validate before creation/update (#580) 2018-04-08 00:56:13 +08:00
Soam VasaniandGitHub 95a50dbbd6 --spec flags for env and trigger creates (#607) 2018-04-06 09:00:01 -07:00
Ta-Ching ChenandGitHub 9406720e8a Add deprecated message to subcommand pods (#592) 2018-04-04 01:26:27 +08: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
Soam VasaniandGitHub 5baf67f143 Spec validator, better errors, apply waits for previous build (#560)
Adds a validator, invoked through `fission spec validate` and before `fission spec apply`. The validator checks for duplicate names, dangling references, and unused resources.

Also attempts to fix a race between CLI and builder.  Avoids replacing a package while it's building, instead waiting for the build status to change from pending before updating it.
2018-04-02 14:33:31 -07:00
xiekeyangandSoam Vasani 6d61f6e5eb bug fix: spec dir flag (#595)
The cli spec dir flag name should be `specdir`, not `specs`, that should match to:

```go
specDirFlag := cli.StringFlag{Name: "specdir", Usage: "Directory to store specs, defaults to ./specs"}
```

in fission/main.go

Currently it cause the specific specs dir not to work.

```
$ fission spec apply --specdir <my spec dir>
Everything up to date.
```
2018-04-02 05:51:46 -07:00
VishalandGitHub a8482a8b89 Function logs: Uses proper way to get server URL
After changes related to port forwarding, function logs was getting empty URL, fixed to use the appropriate method instead.
2018-03-29 15:26:47 +05:30
smruthi2187andSoam Vasani 77be3379b2 Prepending a slash to user input url if missing. (#547)
* Prepending a slash to user input url if missing.

* Adding the url slash check for spec.
2018-03-26 12:31:02 -07: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
Soam VasaniandGitHub 8708fdec93 Add verbosity flag and verbose logs for portforwarder (#575)
Also, parse flags before connecting to server.
2018-03-26 12:23:45 -07:00
VishalandGitHub 15bedfb688 Warning when updating function from poolmgr type to newdeploy executor type
When changing the function executor type from pool manager to new deployment - warning should not be given about ignore environment resources
2018-03-20 14:11:30 -07:00
Ta-Ching ChenandGitHub 1447e6949d Show fission deployment version with cli (#538)
Add version information to binary through go ldflags
2018-03-19 14:14:55 +08:00
Ta-Ching ChenandGitHub afd7f7f436 Show warning when trying to create a route with non-existent function (#539) 2018-03-09 02:45:30 +08:00
Soam Vasani d852ddd91c Version update: 0.6.0 2018-03-01 13:43:59 -08:00
Soam VasaniandGitHub 714f32d290 Detect fission namespace in cli (#519)
Remove the hard coded default "fission" namespace that was added in the last PR, replacing it with some logic to figure out where fission is installed and connecting to it if there's exactly one installation. If there is more than one fission installation, error out with a useful message.

Also improve the error message for a missing kubeconfig file.
2018-03-01 12:16:50 -08:00
Soam VasaniandGitHub 7ddbea59a2 Default values for FISSION_* env vars (#518)
This makes set up easier for new users.  Users can still set
FISSION_NAMESPACE but it will default to "fission".  Users can also
still set KUBECONFIG, but it will default to $HOME/.kube/config.

Also, update the post-install chart notes.txt and the install guide to
use "fission function test" as the first step after install.  This
means that if there's anything wrong with the setup, the user will see
useful errors instead of "internal server error".  Also, they can test
their setup without worrying about nodeports or ingresses or whatever.

All existing functionality of FISSION_URL and FISSION_ROUTER continues
to work.
2018-02-28 18:14:57 -08: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 5e2f984136 Fix CLI not update function's secret/configmap correctly (#512)
This PR addressed some issues introduced in PR399. Also, now env builders and function pods can mount shared secret/configmap volumes correctly.
2018-02-28 05:28:05 +08:00
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
prithvirameshandsmruthi2187 b9a559af2f Service type ClusterIP - Controller port forward through CLI (#431)
setting serviceType to ClusterIP as default for fission controller and corresponding changes in fission cli to be able to port-forward the controller pod.
2018-02-27 08:22:57 -08:00
smruthi2187andGitHub 245506efe3 Delete and list orphan pkgs (#468)
* prevent leaking packages; add new clis to list and delete orphan packages.

* Fixes after testing.

* Address review comment.

* Removing deleting orphan packages from fnUpdate and fnDelete.

* goFmt and removing unwanted code.
2018-02-20 15:21:10 -08:00
Peter HueneandSoam Vasani 4d0e6af5de Implement support for Azure storage message queue triggers (#371)
These commits implement support for consuming messages from an Azure storage queue to trigger Fission functions.

* Add stubbed Azure message queue implementation and modify Helm charts.

This commit stubs an implementation for an Azure storage message queue trigger
that will be completed by future commits.

It also modifies the Helm chart to add support for deploying Fission with an
mqtrigger configured for Azure storage queue triggers.

* Add Azure Go SDK to glide.

This commit adds the Azure Go SDK to glide for the upcoming work to support
Azure storage queue triggers.

* Implement Azure message queue trigger.

This commit implements a message queue trigger based on Azure storage queues.

Required message queue trigger manager environment variables:

* AZURE_STORAGE_ACCOUNT_NAME - the Azure storage account to use.
* AZURE_STORAGE_ACCOUNT_KEY - the Azure storage account key.

When creating a message queue trigger, the topic will be the Azure storage
queue to receive messages from.

* Add CA certificates to fission-bundle.

This commit adds the root CA certificates to the fission-bundle image. This
allows Fission to contact third-party APIs that use HTTPS with root CA
signed certificates.

* Add Makefile to build and test.

This commit adds a simple Makefile for building the client and bundle, running
tests, creating the Docker image, and pushing the Docker image.
2018-02-09 10:38:06 -08:00
Ta-Ching ChenandGitHub 398c58365a Version -> 0.5.0 (#489) 2018-02-08 03:39:02 +08:00
Ta-Ching ChenandSoam Vasani c56ed598cb Fix potential nil pointer problem when both watchResources and waitForBuild are equal to false (#485) 2018-02-06 15:14:47 -08:00
Ta-Ching ChenandGitHub 3f81510729 Fix possible context leak problem (#483) 2018-02-06 21:34:01 +08:00
Soam VasaniandGitHub 07c7b759d2 Declarative application specifications for Fission (#422)
This change enables users to have declarative specifications for Fission resources. Users can specify their "app" in a set of spec files, and use a new fission CLI command to "apply" these specs to a running cluster.

The new "spec" CLI also includes archiving of local source files, and a file watcher that re-builds archives and uploads them on file changes, and a package build watcher that waits for package builds on the CLI. 

A "--spec" option is also added to "function create", and will be added to other resources in future changes.  This option causes a YAML to be outputted to the specs directory instead of the resource being created on the cluster.

The CLI "fission spec --help" outputs usage information.
2018-02-05 21:58:44 -08:00
prithvirameshandTa-Ching Chen 1eb0453ce4 Functions have access to secrets/configmaps specified by the user (#399)
This commit solves part of the issue #52 , functions are able to access secrets/configmaps specified by the user. For now, CLI only accept one secret/configmap. For advanced users, it will be able to use YAML to declare multiple secrets/configmaps in later changes.
2018-02-05 17:49:26 +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 4f7eb19b7c Show warning when user tries to create a function with a non-existent environment (#436)
Show warning when user try to create a function with non-existent environment
2018-01-26 16:35:17 -08:00