Commit Graph
1652 Commits
Author SHA1 Message Date
56b49dcee8 Ability to retain specialised pods for poolmanager functions (#2830)
- added retainPods flag to take in the number of specialized pods to retain
- add retainPods in both the create function and update function command
- modify crd keys to be typed instead of string
- keep track of function generation in case of update function operation
- add delete handler function to make sure specialized pods are deleted in case function is deleted

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Signed-off-by: Pranoy Kundu <pranoy1998k@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
2023-09-27 13:33:19 +05:30
Sanket SudakeandGitHub 657aee7cc2 Update go deps across project (#2837)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-09-24 11:14:43 +05:30
Anthony KingandGitHub 44922bce6c fix missing namespace environment variables for various services (#2828)
the FISSION_..._NAMESPACE environment variables are used by all services during init
to check if the CRDs are loaded.

Move them to the 'fission-resource-namespace' macro to ensure all services know the relavant namespaces.

Signed-off-by: Anthony King <anthony@datapane.com>
2023-09-23 13:01:53 +05:30
Sanket SudakeandGitHub 3bcda55aa8 Update kubernetes libs to latest (#2834)
- k8s.io/api v0.28.1
- k8s.io/apiextensions-apiserver v0.28.1
- k8s.io/apimachinery v0.28.1
- k8s.io/client-go v0.28.1
- k8s.io/metrics v0.28.1
- sigs.k8s.io/controller-runtime v0.16.1
- sigs.k8s.io/controller-tools v0.13.0

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-09-23 09:10:51 +05:30
Sanket SudakeandGitHub 997493351a Update go version 1.21 (#2833)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-09-05 22:15:32 +05:30
guangwuandGitHub 3d77077bc5 fix: Environment typo (#2829)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-30 07:50:09 +05:30
Shubham BansalandGitHub f955d1182a update chart version to v1.19.0 (#2798)
Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
v1.19.0
2023-05-18 15:18:04 +05:30
AmborandGitHub 1cbc0ba9ff fix: passthrough the build log error (#2795)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-05-18 13:47:54 +05:30
Shubham BansalandGitHub 0936c6a2d7 Update dependencies (#2796)
* updated dependencies

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>

* updated depencies related to otel and few other

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>

* revert changes for go version

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>

* revert changes for k8s dependencies

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>

---------

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
2023-05-18 13:44:51 +05:30
Shubham BansalandGitHub f0ec328d24 Changed prometheus version from latest to 45.28.0 (#2797)
* updated prometheus version for CI failure

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>

* updated prometheus version for CI failure

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>

---------

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
2023-05-18 12:44:20 +05:30
Shubham BansalandGitHub 2b1ac28300 updating all direct dependencies (#2793)
Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
2023-05-17 12:17:23 +05:30
Shubham BansalandGitHub 0fb2096788 security upgrade for alpine to 3.18 (#2792) 2023-05-16 17:45:36 +05:30
Scott CôtéandGitHub 6e375629e7 Configure router deployment replicas (#2782) 2023-05-16 16:20:29 +05:30
Shubham BansalandGitHub 1133386ce9 update chart version to v1.19.0-rc2 (#2791)
Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
v1.19.0-rc2
2023-05-12 10:33:51 +05:30
f99f10134c Executor: Dump function service cache for pool manager functions (#2789)
* dump function service cache for executor
* fix lint issue
* code refactor and lint fixes

---------

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2023-05-12 09:49:54 +05:30
6c431e4d9b Ensure handling for specialization failure in pool manager (#2788)
* Add fixes for failure in specialization
* reduce specialization in progress and remove expired requests from queue when specialization is timed out
* rename markSpecializationFailure and remove logger from the queue
* refactor clean up code in api.go and add test case for queue

Details:

- Cleanup svc waiting for the counter in the pool manager if specialization fails
- Cleanup active requests counter in pool manager if client exists the demand for function service while we have allocated function service
- Consider specialization timeout if pod ready timeout > specialization timeout in waiting for ready pod. We also consider if the request to choosePod is cancelled.
- We ensure if we have requests waiting for service requests but if there is no pod in the specialization we clean up those.
---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
2023-05-11 21:03:57 +05:30
31c81e132e fix: lose cold start error counter for the poolmgr functions (#2755)
* fix: lose cold start error counter for the poolmgr functions

Co-authored-by: ZhengHe-MD <ranchardzheng@gmail.com>
Co-authored-by: gw123 <iamakillerforyou@gmail.com>
Signed-off-by: saltbo <saltbo@foxmail.com>

* fix: miss code for the metric

Signed-off-by: saltbo <saltbo@foxmail.com>

---------

Signed-off-by: saltbo <saltbo@foxmail.com>
Co-authored-by: ZhengHe-MD <ranchardzheng@gmail.com>
Co-authored-by: gw123 <iamakillerforyou@gmail.com>
2023-05-09 12:37:58 +05:30
Nikhil SharmaandGitHub a5f3402dbc add functionality to update spec of fission custom resources (#2701)
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
2023-05-08 13:36:05 +05:30
AmborandGitHub 784bd82ec7 fix: panic for the builder/client (#2780)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-04-13 10:40:45 +05:30
AmborandGitHub cd742a6d18 fix: error port for the pprof server (#2766)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-04-11 08:43:36 +05:30
AmborandGitHub 32530ac474 fix: add flush to support chunked for the metric middleware (#2772)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-04-11 08:40:58 +05:30
AmborandGitHub 117c383fac style: typo for the BuilderNamespace (#2776)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-04-11 08:39:42 +05:30
Shubham BansalandGitHub 3a1db58066 update chart version to v1.19.0-rc1 (#2761)
Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
v1.19.0-rc1
2023-03-31 15:07:20 +05:30
AmborandGitHub ce42dbc647 refactor: update the client retry by the pkg retryablehttp (#2752)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-03-31 13:20:22 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3840a90b54 Bump github.com/opencontainers/runc from 1.1.2 to 1.1.5 (#2757)
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.2 to 1.1.5.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.2...v1.1.5)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 13:06:55 +05:30
AmborandGitHub 77d4745242 fix: invalid error unwrap for the httperror (#2753)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-03-31 12:23:37 +05:30
715ef8267e Improve poolmanager concurrency handling with virtual capacity (#2737)
* add functionality to wait for specialization by keeping track of incoming requests
* format executor package
* fix required capacity to specialise new pod condition
* move handling concurrency logic into pool cache from executor
* remove unused methods and structs
* implement queue in to store the svc wait
* create a queue struct and its methods to handle concurrent inputs
* use newly created queue to store waiting for svc requests
* add waiting requests in queue and use them when a svc is ready
* set function to request in queue if the context is still alive
* remove concurrency approach to set svc for waiting requests
* update the active requests whenever requests from pool are assigned a svc
* add doc to define why the conditions exist
* remove unwanted params in strcut and clean up code
* set error while getting svc value if sum of specialization in progress and specialized is only more than concurrency limit
* remove duplicate functions and unnecessary values in struct
* close svc channel on set value and create constants for default concurrency and rpp
* get next value in queue in case context is timed out for fetched value
* remove specializationInProgress counter from pool cache
* return in case the queue is empty wihle setting func to svc
* test getSvcVaue and setSvcValue in poolcache
* add unit tests for GetConcurrent and GetRequestsPerPod methods
* reorder imports
* add fuzzy testing for getSVCValue and setSVCValue in poolcache
* restructure go mod file and update pool cache test cases
* Add tests and bug fixes
* refactor code and add test cases
* add svcWaiting check while setting svc value

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2023-03-30 20:19:51 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b622f13ab6 Bump golang.org/x/image from 0.0.0-20190802002840-cff245a6509b to 0.5.0 (#2735)
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.0.0-20190802002840-cff245a6509b to 0.5.0.
- [Release notes](https://github.com/golang/image/releases)
- [Commits](https://github.com/golang/image/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 11:26:34 +05:30
2213ebc637 feat: add trace and timeout support for the timer (#2750)
* feat: add trace and timeout support for the timer

Co-authored-by: gw123 <iamakillerforyou@gmail.com>
Signed-off-by: saltbo <saltbo@foxmail.com>

* fix: add error check for the lint

Signed-off-by: saltbo <saltbo@foxmail.com>

---------

Signed-off-by: saltbo <saltbo@foxmail.com>
Co-authored-by: gw123 <iamakillerforyou@gmail.com>
2023-03-29 09:27:55 +05:30
Nikhil SharmaandGitHub 1f138d03fa handle addr when port is passed in host:port format in the StartServer func (#2747)
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
2023-03-23 16:38:17 +05:30
a8e8cfb72d fix: websocket event listener (#2745)
Co-authored-by: 李霖 <lee@lilindeMacBook-Pro.local>
2023-03-23 11:52:20 +05:30
AmborandGitHub 963081e096 fix: ending retry loop when the request canceled for the choosePod (#2731)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-03-21 14:38:45 +05:30
Sanket SudakeandGitHub a96b92f41f Update Go version 1.20 (#2740)
* Update Go version 1.20
* Update golangci-lint version v1.51.1

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-03-12 08:45:43 +05:30
Nikhil SharmaandGitHub a93e9b4074 poolmgr: stop pod specialization when pod namespace and cm/secret namespace is mismatched (#2703)
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
2023-03-11 16:24:52 +05:30
Pranoy Kumar KunduandGitHub 0de8923ea8 Add funcSvcGroup type in pool cache for grouping of function services (#2728)
* add specfic structs for function svc and group

* remove unused var in funcSvcGroup

* format poolcache
2023-02-28 09:06:16 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1cb18a78a6 Bump golang.org/x/net from 0.4.0 to 0.7.0 (#2724)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-26 11:02:47 +05:30
Shubham BansalandGitHub 4ebdb16623 security upgrade for alpine to 3.17 (#2723) 2023-02-17 21:10:02 +05:30
Shubham BansalandGitHub 3c0c96e98e CLI: Use fntimeout to stop terminating of function in middle (#2709)
* use flag FnExecutionTimeout instead of FnTestTimeout

* use flag FnExecutionTimeout instead of FnTestTimeout

* keep FnTestTimeout and FunctionTimeout both

* code review changes

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>

---------

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
2023-02-09 13:57:57 +05:30
Shubham BansalandGitHub e462f9ab71 Allow permission to router for ingress resource (#2710) 2023-02-02 10:20:46 +05:30
Shubham BansalandGitHub d025022042 Make ghcr.io to default container registry (#2711)
* changed default container registry from docker.io to ghcr.io
* user ghcr.io in CI test
* use ghcr.io in reporter image
* revert skaffold changes
2023-02-02 10:19:59 +05:30
Shubham BansalandGitHub c4ed12d9c5 Push docker images to github container registry (#2705)
* changes to push images in github container registry

* reverting changes for helm chart to pass CI test

* use gitURL instead of whole URL

* use gitURL instead of whole URL

* added release process for docker.io

* removed trailing spaces

* added support for multi arch images in GHCR
2023-01-30 17:26:06 +05:30
Shubham BansalandGitHub d3a615211f router pod fails to run if authentication is enabled during helm upgrade (#2700) 2023-01-19 09:20:54 +05:30
Shubham BansalandGitHub 2b017f810a Fission version failed if authentication.enabled is set to true (#2697)
* set authorization header for fission version and check command

* display warning if response status is unauthorize or forbidden

* passing context to http request
2023-01-18 16:26:06 +05:30
Nikhil SharmaandGitHub 5c3c55d52f allow users to set envGracePeriod to 0 (#2696)
Signed-off-by: Nikhl Sharma <nikhilsharma230303@gmail.com>

Signed-off-by: Nikhl Sharma <nikhilsharma230303@gmail.com>
2023-01-18 10:57:30 +05:30
Shubham BansalandGitHub 5db09a899a Create roles for custom resource in function and builder namespace (#2695)
* create roles for custom resource in function and builder namespace
* Create roles for CR for builder in function and builder namespace
* convert warn to info to remove error stack trace
2023-01-17 22:15:04 +05:30
Sanket SudakeandGitHub 0edf2640b1 internal: Making poolcache typed and merged into fscache (#2693)
Merged pool cache package into fscache to avoid import cycle.
Also changed all types in pool cache from interface to specific
types.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-01-15 23:50:05 +05:30
Shubham BansalandGitHub deb3523b59 update chart version to 1.18.0 (#2687) v1.18.0 2023-01-12 23:35:51 +05:30
Nikhil SharmaandGitHub 0635a6a644 remove .* suffix after Dockerfile (#2685)
Signed-off-by: Nikhl Sharma <nikhilsharma230303@gmail.com>

Signed-off-by: Nikhl Sharma <nikhilsharma230303@gmail.com>
2023-01-11 14:04:56 +05:30
Nikhil SharmaandGitHub a9d55423ae update vulnerable dependencies (#2684)
Signed-off-by: Nikhl Sharma <nikhilsharma230303@gmail.com>

Signed-off-by: Nikhl Sharma <nikhilsharma230303@gmail.com>
2023-01-10 15:40:44 +05:30
Shubham NazareandGitHub 496e4e3162 feat(cli): provide imagepullsecret option for container as function (#2680)
Signed-off-by: Shubham Nazare <shubham4443@gmail.com>
2023-01-09 16:18:56 +05:30