Commit Graph
67 Commits
Author SHA1 Message Date
VishalandGitHub 49f9944b86 Skaffold for Fission (#1172)
Skaffold for development of Fission and switching to multi-stage Dockerfile for all components.
2019-05-27 12:51:00 +05:30
VishalandGitHub c88033fc0b DRY up fetcher configuration (#1168)
Consolidates the addition of the fetcher container to the pod into a new type FetcherConfig and takes care of serviceAccountName if not set. Also added PreStop lifecycle handler if pod set TerminationGracePeriodSeconds
2019-05-02 21:39:42 +05:30
VishalandGitHub 1a5b0ec567 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 8015ab9a1e Change log level in executor for better log reading/troubleshooting (#1163) 2019-04-15 23:02:55 +08:00
Soam VasaniandTa-Ching Chen 4e4c8aa14f 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 0fc864f230 use zap for logging (#1112)
Use zap for logging
2019-03-14 21:11:15 +05:30
VishalandGitHub 5d2abdd95b 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 8b0a201f69 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 1806259637 Consider Pod Phase in IsReadyPod (#1080) 2019-01-28 13:15:38 +08:00
VishalandTa-Ching Chen 101e188f41 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 ad4c4cd014 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 37846a5827 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 0a135173b4 Fix builder & newdeploy not using latest image during CI build (#1033) 2018-12-19 22:35:28 +08:00
Ta-Ching ChenandVishal 314e16a88e 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 72faa927de Use executor type as a delimiter to prevent deploy name conflict (#1009) 2018-11-30 13:04:44 +08:00
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 4b5ab0ad93 Shorten executor kubernetes objects name (#975) 2018-11-24 20:41:38 +08:00
Ta-Ching ChenandVishal d9eee058ce Newdeploy - change only in minscale should not restart deployment 2018-11-15 15:31:28 +05:30
Ta-Ching ChenandGitHub 29aabaabda 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 dd35750482 Return the error on failed specializations with fn test --debug (#917) 2018-10-19 11:17:58 -07:00
Ta-Ching ChenandGitHub a4f58fbf10 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 2dbae32f20 FIX CleanupOldExecutorObjects in all namespaces (#879)
Don't just look in functionNamespace anymore
2018-08-29 15:12:31 -07:00
Ta-Ching ChenandGitHub d443f8b2ef Scale deployment to zero when function is in idle state (#775) 2018-08-17 23:03:34 +08:00
Ta-Ching ChenandGitHub 9d7355cbaa 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 07ca5df8d0 Fix router not taps function services (#860) 2018-08-13 19:45:49 +08:00
Ta-Ching ChenandGitHub 0e40cb5f4f Fix newdeploy not updates deployment after function's entrypoint changed (#838) 2018-08-02 21:00:27 +08:00
Ta-Ching ChenandGitHub 9a7ffc2f5b Add more meaningful error messages to executor when getServiceForFunction (#752) 2018-07-30 09:10:48 +08:00
Ta-Ching ChenandGitHub 61569d1c38 Change flag name to KeepArchive for backward compatibility (#787) 2018-07-06 03:13:07 +08:00
Erwin van EykandTa-Ching Chen 032d1a8b9a 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 c705ba355e Fix executor not reaps idle function pods for functions with executortype newdeploy (#744) 2018-06-21 17:54:42 +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
xiekeyangandVishal ef7d4ae385 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 7a7d15b50c Update k8s dependencies to 1.10 (#687) 2018-06-01 15:43:19 +08:00
xiekeyangandSoam Vasani 6eec55223d Formatted specifiers are not compatible with variables (#706)
It missed specifier for namespace
2018-05-29 09:08:38 -07: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
Soam VasaniandGitHub d846aed612 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 0e3a270d27 Delete deployment with proper delete propagation policy (#630) 2018-05-01 23:25:50 +08:00
Ta-Ching ChenandGitHub 6a7381c575 Fix newdeploy backend failed to delete deployment due to incorrect resource version (#657) 2018-05-01 16:48:34 +08:00
Ta-Ching ChenandGitHub 400e19a48f Fix executor does not reap specialized function pod when env no longer exists (#633) 2018-04-19 07:39:37 +08:00
smruthi2187andGitHub 8014c83b02 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 1dbf8f9243 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 2a06705320 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 70a93a7302 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 048ab6149a Fix executor failed to clean cache & kubeobjs after function deleted (#534) 2018-03-14 02:29:12 +08:00
Ta-Ching ChenandGitHub 039e003af6 Always retry for function pod specialization when istio feature is enabled. (#536) 2018-03-11 23:17:05 +08:00
Ta-Ching ChenandGitHub b4300feabc 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 a3826046a5 Delete healthz log (#525)
Silencing the healthz logs.
2018-03-02 15:50:48 -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