Commit Graph
55 Commits
Author SHA1 Message Date
Sanket SudakeandGitHub 8a3d8a4762 Optimize Kafka Client in Kafka Connector (#2630)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-11-28 16:31:34 +05:30
827baea974 Allow namespace configuration for different CRD resources in Fission (#2539)
* Allow multiple namespaces for builder manager
* Enable multiple namespaces for executor informers
* Added missing context
* helm chart support for multiple namespaces
* Directly consume map type from GetInformerForNamespaces fn
* Optimize function resolver by choosing namespace-specific informer
* helm chart support for multiple namespaces
* consider default namespace and move duplicate code to helm template
* Improve documentation for fission namespace values

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: shubham bansal <shubhambansaliimtgn@gmail.com>
2022-10-19 15:48:47 +05:30
Sanket SudakeandGitHub f2b790921b Remove unwanted permissions from Fission components (#2568)
* Remove unwanted permissions from Fission components
* Remove unwanted permission from buildermgr
* Remove rbac permissions from controller
* Remove unwanted namespace permission
* Remove unwanted fission resource permissions
* Add deployment list permission for buildermgr
* add deployment create permission for buildermgr
* Update action version
* Add rolebinding permission for buildermanager
* Reduce permissions for fetcher and builder components
* Aded deployment delete permission to buildermgr
* Add logger to wait crds function
* Revert "Grant CustomResourcedefintion read permission to specific components (#2567)"

This reverts commit 8fe62b755c.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-10-13 15:04:49 +05:30
Sanket SudakeandGitHub 3fa0f4bde3 Ensuring passing context across fission (#2555)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-09-26 16:05:45 +05:30
Sanket SudakeandGitHub e87c84ee2c Capture context from cobra CLI and pass forward (#2551)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-09-22 13:54:05 +05:30
Shubham BansalandGitHub dc4c6e20e3 Add metric fission_mqt_message_lag for kafka mqt connector (#2544)
These changes have specifically been made for Kafka connector. This will expose a new metric named `fission_mqt_message_lag`, which will show a number of messages lag per topic and partition.

We can use this metric in the auto-scaling of the pod for the new deploy type executor function. While creating a new deploy function we need to add hpa metrics of external type inside the function definition.
2022-09-15 14:45:51 +05:30
neha_guptaandGitHub b16010dfa3 add values for nats jetstream keda connector (#2515)
* add values for jetstream connector

* formatte fission cli

* Update jetstream connector version
2022-08-29 10:45:18 +05:30
Sanket SudakeandGitHub 1184864c14 Reestablish kakfa consumer group session on disconnection (#2504)
* Reestablish kakfa consumer group session on disconnection
* Add wait for the consumer
* Ignore empty message
* Update github.com/Shopify/sarama to v1.35.0

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-08-09 11:06:19 +05:30
Sanket SudakeandGitHub 2a43213387 Use Clientset interface instead of type for Fission/kubernetes clients (#2416)
Using interface makes it easy to create a fake client and unit test
a specific portion of the code. We should be able to more write unit
test and increase coverage of code with this change.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-04-21 16:49:52 +05:30
Sanket SudakeandGitHub 8442e21621 Use common httpserver across fission (#2409)
* Defining httpserver package to capture httpserver shutdown and
introduces uniform running of http server across codebase.
* Add unit tests for httpserver

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-04-14 11:35:58 +05:30
Sanket SudakeandGitHub 8b9c2b4da1 Remove deprecated Fission Azure Storage Queue connector (#2404)
We are removing Fission deprecated Azure Storage Queue connector and
planning to adopt Keda going forward to have better
delegated functionality and more rich support.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-04-06 15:13:56 +05:30
Sanket SudakeandGitHub 4e91579ef2 Remove deprecated Fission Nats connector (#2403)
We are removing Fission deprecated Nats connector and
planning to adopt Keda going forward to have better
delegated functionality and more rich support.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-04-06 13:41:38 +05:30
24dee03e18 Added metrics for fission mqtrigger and optimizations in trigger subscriptions (#2399)
- Use mqtrigger watch instead of polling mqtrigger every 5 seconds
- Added metrics to monitor no of subscriptions, and no of messages per subscription
- Add standard go metrics exported by prometheus
- Enable prometheus discovery for mqtrigger pod
- Optimized mqtrigger manager cache
- Add unit tests for mqtrigger cache

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-04-05 21:51:05 +05:30
Ankit ChawlaandGitHub 8ee74161fc Added validation to keda types and updated help (#2346)
* Added validation to keda types and updated help

* Changed formatting of help

* Changed variable name
2022-02-09 19:55:14 +05:30
Ankit ChawlaandGitHub 89aeddaf3a Minor bug fixes (#2298) 2022-01-11 17:06:21 +05:30
Sanket SudakeandGitHub bf8c01cff0 MQT Kafka: Use Sarama Group Consumer instead of bsm/sarama-cluster library (#2286)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-12-22 18:00:25 +05:30
Sanket SudakeandGitHub 59e876062f Capture os signals to gracefully shutdown fission components (#2261)
- Currently, fission components don't handle shutdown signals.
So we don't get any to do the required cleanup before the fission process
exits. Adding signal capture process with cancelling context so
that all dependent processes stop working when the process gets term
signal.
- Set log level to error in otel shutdown function

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-11-11 17:02:11 +05:30
Eng Zer JunandGitHub 2f4ec4b2b9 refactor: move from io/ioutil to io and os package (#2236)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-23 17:14:12 +05:30
Sanket SudakeandGitHub 1b9d21b5e3 Change default informer resync period to 30 minutes (#2167)
Currently most of informers used in Fission are using resync
period of 30sec which is quite low and causes lot of disturbances
in overall system. Since informers already have watchers which would
be delivering events to the handlers. If any handlers require lower
sync period they should register handler with `AddEventHandlersWithResyncPeriod`
instead of we generaling informer.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-20 09:03:09 +05:30
Sanket SudakeandGitHub eb72fdc717 Enable race detector for unit tests (#2085)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-23 13:24:10 +05:30
Sanket SudakeandGitHub 74c0142968 Replace controller with generated SharedIndexerInformers (#2103)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-06 13:56:10 +05:30
Sanket SudakeandGitHub 154fe0d447 Retrieve pod metrics only if metrics server is running and Go lint fixes (#2094)
* Retrieve pod metrics only if metrics server is running

Currently we query pod metrics every 30 sec which floods executor logs,
added check which confirms if metrics server is running then only we start
querying pod metrics for identifying CPU utilization.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Fixed couple of typos and misspells with Go CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Remove unnecessary conversions with Go CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-28 10:06:32 +05:30
Harsh ThakurandGitHub 6facdac464 Fix golang lint errors (#2068)
* Fix golang lint errors

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Typo for fields

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Multi error fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Multi error fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Add nolint to logtostderr errcheck

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-15 15:03:42 +05:30
3055a3ada0 Added body in the error topic header (#1830)
Signed-off-by: therahulbhati <rjbhati009@gmail.com>

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-07 22:28:11 +05:30
4e2632e100 Keda podspec (#2021)
* Add podspec to MQT

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Add preupgrade check

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use zap logger

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-27 14:21:34 +05:30
1e0baf5f6c Crds update (#2033)
* Add code generated using latest code-generator

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Update client-go and respective dependencies to v0.19.2

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Upgrading CRD version

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Minor changes

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Resolved client-go calls as per new generated code

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Function validations fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix environment and package validations

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Add basic validation to all CRDs

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Remove CRD installation related code

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Modify GHA for CRD installation

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix Package and HTTPTrigger validations

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Change Go version in CI to 1.15

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Style: kubebuilder marker change

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix test with deprecated fields

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Update kind node image to v1.16.15 in CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Update kind node image to v1.19.11 in CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Replace context Background with TODO for future implementation

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Optimize initial CRD check code

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Use Get call only to check CRDs

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Add kustomize for CRD apply

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-26 15:07:03 +05:30
3880279e89 do not use deprecated functions/methods (#2027)
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-21 13:53:28 +05:30
d7ac0ee17a feat: Add image pull policy when create KEDA connector deployments (#1944)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-05-20 01:22:25 +05:30
Rahul BhatiandGitHub 25acd7fd16 Feature request per pod (#1946)
This feature enables routing more than one request to a pod at the same time. This is the first draft of the work and might involve more optimizations later.
2021-03-31 12:35:30 +05:30
e4a0aa3480 Migrating to keda2.0 (#1868)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-05 10:28:54 +05:30
ef83d4314e Put message to error topic when exceed max retries in kafka mqt (#1885)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
2021-02-02 23:20:40 +05:30
Gaurav GahlotandGitHub 695b0759e4 Fixed golangci-lint issues: /fission/pkg (#1902) 2021-01-19 23:29:20 +05:30
TosoneandGitHub 6dbdf4d88b Remove unnecessary import package. (#1897) 2020-12-28 18:48:02 +05:30
Rahul BhatiandGitHub ab0b43d51c Added flag for insecureSkipVerfiy (#1829) 2020-10-13 21:03:19 +05:30
07b294778a logs: change timestamp to ISO (#1708)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-11 08:04:29 +05:30
975286c2ac Add headers to Kafka MQT error topics (#1701)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-09-07 19:13:36 +05:30
Rahul BhatiandGitHub f751546913 Removed code related to mqtrigger (#1680) 2020-08-06 20:59:08 +05:30
Rahul BhatiandGitHub 8e0571c7c9 Fission MQT integration with keda (#1657)
Fission MQT integration based on Keda with Kafka connector
2020-07-14 21:35:48 +05:30
33c23c1341 Fixing verify-staticcheck.sh (#1622)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2020-06-04 15:16:09 +05:30
758ee32aa9 External nats streaming (#1576)
Support for external NATS streaming instead of the one deployed with Fission

Co-authored-by: Shaun Cutts <shaunc@factfiber.com>
2020-04-19 21:53:27 +05:30
Ta-Ching ChenandGitHub cc14044b6b Add message queue service factory (#1537) 2020-02-20 23:30:39 +08:00
Ta-Ching ChenandGitHub 735f9abef7 Update NATS-Streaming dependencies version (#1533) 2020-02-12 20:35:20 +08:00
Ta-Ching ChenandGitHub f2ddaa7921 Fix Git issue on case-insensitive OS (#1532) 2020-02-12 16:08:05 +08:00
Ta-Ching ChenandGitHub 75321d306a Reorganize message queue trigger directory structure (#1531) 2020-02-12 15:40:00 +08:00
Ta-Ching ChenandGitHub 11f9ef1045 Follow kubernetes APIs directory structure (#1497) 2020-01-20 17:06:46 +08:00
Ta-Ching ChenandGitHub bb3e6d6907 Codebase cleanup & optimization (#1493)
Remove old v1 types that are no longer used and move fetcher structs to fetcher directory.
2020-01-16 16:47:32 +08:00
Ta-Ching ChenandGitHub 574fb55fcf Use code-generator to generate clientset/informer/lister (#1492)
To reduce maintenance effort and avoid writing duplicate informer code,
use code-generator to generate clientset/informer/lister code.
2020-01-16 15:18:38 +08:00
Ta-Ching ChenandGitHub b9a5588ca9 Update staticcheck version and fix all warnings (#1381) 2019-11-05 18:09:12 +08:00
Vivek SinghandTa-Ching Chen 22de11190c Calling the function that handles kafka messages, asynchronously (#1355) 2019-10-19 14:41:46 +08:00
Suraj BanakarandTa-Ching Chen 395a8adf37 Implement TLS authentication for kafka mqt (#1300)
* use secrets to store keys and certificates
2019-10-10 00:18:57 +08:00