Commit Graph
65 Commits
Author SHA1 Message Date
VishalandGitHub 52a7ef283b Function update after change in env (#1116)
If an environment image changes then the new deployment function also should be updated with the newer image
2019-04-25 17:03:56 +05:30
Ta-Ching ChenandGitHub d6c89d5449 Change log level in executor for better log reading/troubleshooting (#1163) 2019-04-15 23:02:55 +08:00
Soam VasaniandTa-Ching Chen 02c8a957b2 Switch from fluentd to fluentbit for log forwarding (#1086)
This removes fluentd in favor of using fluentbit, which is lighter (in
memory usage) and seems to be more actively maintained.

Fluentbit's config file format is different from fluentd's.  It also
doesn't support the same record modification stuff that fluentd
supports, so we have to change the influxdb query slightly.  This
means that after an upgrade, the new CLI may won't work for querying older 
logs.  Hopefully, this slight breakage is acceptable; if users 
really need older logs they can use the older CLI.
2019-03-18 15:42:37 +08:00
Jon CarlandVishal 45a06cb161 use zap for logging (#1112)
Use zap for logging
2019-03-14 21:11:15 +05:30
VishalandGitHub 73df384cf4 OpenTracing for Fission (#1079)
Added Opentracing integration using opencensus libraries for all Fission components.
2019-02-07 11:56:41 +05:30
Ta-Ching ChenandGitHub 87c7b3bb96 Fix executor tries to create same name deployment (#1082)
The root cause of the issue was introduced by PR https://github.com/fission/fission/pull/1009/files .
To be short, even the CRD of environment was delete, it still takes time for executor (poolmgr) to destroy env pool. In our cases, the previous test creates an env and delete it when test finished, then the next one creates the same name env, but failed to create pool due to the deploy name conflict. So the executor selects the pod from the first created env pool. Then, executor starts to delete the env pool, and makes the pod state became Termination state. To fix this problem, a unique name of deployment will be returned after this PR to prevent the name conflict.
2019-01-30 22:14:14 +08:00
Bhavin GandhiandTa-Ching Chen bc42401ccb Consider Pod Phase in IsReadyPod (#1080) 2019-01-28 13:15:38 +08:00
VishalandTa-Ching Chen 8c1d4b23b9 Clear message in case of function/pod failure (#1069)
* Clear message in case of function/pod failure
* Added err handling while getting pods
* Using multierror instead of strings
2019-01-23 22:26:13 +08:00
VishalandGitHub 802b4fa153 New deploy should clean up objects it created if there are errors (#1040)
The PR cleans up resources left behind if there is an error while creating resources for new deployment executor functions
2019-01-11 13:27:02 +05:30
Ta-Ching ChenandGitHub d040165511 Fix requests are sent to unready function pod (newdeploy) (#1005)
* Refactor specialization process
* Separate readiness and liveness probe to different routes

For newdeploy, readiness probe should check whether a fetcher specializes env container successfully or not. In this commit, fetcher returns the actual state of current specialization status instead of returning 200ok directly.
2018-12-27 16:29:31 +08:00
Ta-Ching ChenandGitHub a729cc5281 Fix builder & newdeploy not using latest image during CI build (#1033) 2018-12-19 22:35:28 +08:00
Ta-Ching ChenandVishal 2c47842298 Pre-create kubernetes resources for function with minScale=0 (#976)
Pre-create Kubernetes resources if functions has MinScale=0 and then scale when first function is called.
2018-12-03 15:52:07 +05:30
Ta-Ching ChenandGitHub 479b332600 Use executor type as a delimiter to prevent deploy name conflict (#1009) 2018-11-30 13:04:44 +08:00
Ta-Ching ChenandGitHub 42d0075d17 Fix issues when specifying resources/scales during updating/creation process (#970) 2018-11-29 20:46:48 +08:00
Ta-Ching ChenandGitHub e551fa0eba Shorten executor kubernetes objects name (#975) 2018-11-24 20:41:38 +08:00
Ta-Ching ChenandVishal 65bc02ecc8 Newdeploy - change only in minscale should not restart deployment 2018-11-15 15:31:28 +05:30
Ta-Ching ChenandGitHub 493cd78f7d Optimize function latency when cache expired/invalid under high concurrency (#856)
* Optimize router response time by adding update lock

In 0.9.2, the router sends multiple GetServiceForFunction requests to executor
to get the service URL. However, the response time of executor will increase
under high-concurrency situation due to too many requests are waiting for
processing.

To solve the problem, an update lock was added to the router. All of goroutines belongs
to the same function need to grab the update lock before sending the request.
Only the first goroutine which gets the update lock is allowed to send request.
In this way, we reduce the burden of executor and lower the failure rate.
2018-10-27 23:35:00 +08:00
smruthi2187andGitHub 851216c637 Return the error on failed specializations with fn test --debug (#917) 2018-10-19 11:17:58 -07:00
Ta-Ching ChenandGitHub a87ef2b133 Check pod container ready state (#861)
Ensure pod is ready by checking pod’s containers state and deletionTimestamp
2018-09-07 22:17:07 +08:00
Adam BouhenguelandSoam Vasani e295d4dc6a FIX CleanupOldExecutorObjects in all namespaces (#879)
Don't just look in functionNamespace anymore
2018-08-29 15:12:31 -07:00
Ta-Ching ChenandGitHub 4edd24daee Scale deployment to zero when function is in idle state (#775) 2018-08-17 23:03:34 +08:00
Ta-Ching ChenandGitHub 833c04243b Fix newdeploy fail to update HPA, deployment of a function after function update (#862) 2018-08-15 19:56:30 +08:00
Ta-Ching ChenandGitHub 20468a67e2 Fix router not taps function services (#860) 2018-08-13 19:45:49 +08:00
Ta-Ching ChenandGitHub 3ff72f9ca2 Fix newdeploy not updates deployment after function's entrypoint changed (#838) 2018-08-02 21:00:27 +08:00
Ta-Ching ChenandGitHub 697f22f10b Add more meaningful error messages to executor when getServiceForFunction (#752) 2018-07-30 09:10:48 +08:00
Ta-Ching ChenandGitHub 58ee3541db Change flag name to KeepArchive for backward compatibility (#787) 2018-07-06 03:13:07 +08:00
Erwin van EykandTa-Ching Chen 9ccd8601b0 Support annotations in environment specs (#733)
* Added annotations to runtime and builder environment specs
* Use crd annotations for env pod
2018-06-30 05:38:22 +08:00
Ta-Ching ChenandGitHub d7ed94dfe4 Fix executor not reaps idle function pods for functions with executortype newdeploy (#744) 2018-06-21 17:54:42 +08:00
VishalandGitHub a98b2bc3a8 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
xiekeyangandVishal f654a7c7df Make fetcher resource requests and limits configurable (#708)
This change allows fetcher container resource requests and limits to be configurable.
2018-06-13 16:12:55 +05:30
Ta-Ching ChenandGitHub 60e46745ce Update k8s dependencies to 1.10 (#687) 2018-06-01 15:43:19 +08:00
xiekeyangandSoam Vasani 119820918c Formatted specifiers are not compatible with variables (#706)
It missed specifier for namespace
2018-05-29 09:08:38 -07:00
xiekeyangandTa-Ching Chen 980d53088a Indicate HTTP status code by library const (#703) 2018-05-24 19:10:45 +08:00
smruthi2187andGitHub 2444e673ef 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
Soam VasaniandGitHub 15a29b17b1 Fission metrics integration (#677)
Add prometheus metrics collection endpoints to router and executor. Add prometheus annotations to router and executor pods.
2018-05-21 13:57:18 -07:00
Ta-Ching ChenandGitHub 5a5927c1be Delete deployment with proper delete propagation policy (#630) 2018-05-01 23:25:50 +08:00
Ta-Ching ChenandGitHub 67b6cb5530 Fix newdeploy backend failed to delete deployment due to incorrect resource version (#657) 2018-05-01 16:48:34 +08:00
Ta-Ching ChenandGitHub 87feda395e Fix executor does not reap specialized function pod when env no longer exists (#633) 2018-04-19 07:39:37 +08:00
smruthi2187andGitHub 602cbf12b9 Invalidate stale router cache entry with podIP's for deleted pods. (#546)
The router's cache entry for a function might become stale if the pod that had the function specialized gets deleted somehow. In such a case, we'd retry getting a new service for the function from executor and retry forwarding the user request to the newly created service.
2018-04-05 13:47:47 -07:00
Ta-Ching ChenandGitHub 5fc04e681d Fix components crash before crds creation (#602)
* Wait for CRDs creation for 30 sec when component start
* Fix ensureCRD return nil while the error is not empty
2018-04-04 15:40:55 +08:00
Ta-Ching ChenandGitHub 9067431e48 Use a separate controller loop to watch functions change and create a service (#544) 2018-04-04 01:17:51 +08:00
Erwin van EykandSoam Vasani 564a2e4400 Add Container object to environment build and runtime specs (#413)
Environment Specs so far had only an image URL to specify a container image.

This was fine for public images but fell short in a few of cases:
(a) Using private image registries
(b) Specifying environment variables (this is needed for workflows helm install)
(c) Setting a SecurityContext for the container

This change adds the Container object to both build and runtime Environments. 

Compatibility is preserved -- the existing ImageURL field is still used.  See the comments in types.go for the overriding rules in the case that both Container and ImageURL are specified.
2018-03-22 00:13:02 -07:00
Ta-Ching ChenandGitHub 4fd884820e Fix executor failed to clean cache & kubeobjs after function deleted (#534) 2018-03-14 02:29:12 +08:00
Ta-Ching ChenandGitHub 896303cddf Always retry for function pod specialization when istio feature is enabled. (#536) 2018-03-11 23:17:05 +08:00
Ta-Ching ChenandGitHub dd4dc593d4 Fix executor tries to create a new deployment when a function is updated (#524)
Newdeploy manager now checks the existence of function service cache by function UID before trying to create a new deployment. And return the cached fsvc directly if the cache exists.
2018-03-08 02:52:36 +08:00
smruthi2187andGitHub 7cf2494567 Delete healthz log (#525)
Silencing the healthz logs.
2018-03-02 15:50:48 -08:00
VishalandGitHub fdf20bd839 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 b6430a258b 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 78ac09fef0 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
VishalandGitHub bf19d51d8b Fixes the backward compatibility with for environments created in earlier versions (#508)
Makes environment poolsize & pod cleanup tags compatible with previous versions
2018-02-26 23:21:09 +05:30