Commit Graph
385 Commits
Author SHA1 Message Date
neha_guptaandGitHub fa037166e1 Add Fission version API to router for CLI consumption (#2612)
* add version API to router

* return empty struct in case of error in getserverinfo
2022-11-11 12:58:40 +05:30
Shubham BansalandGitHub 32bd874ab6 List fission resources in specific namespace instead of all namespace (#2604) 2022-11-08 10:25:09 +05:30
b71a36dc1c Use Kubernetes Client instead of Controller APIs from CLI (#2605)
Use the Kubernetes and Fission Client from CLI instead of Controller API.
This removes port-forwarding for the controller across Fission CLI mostly.

* Use configurable client in CLI
* Move resource namespace under cmd client
* use server to get fission version
* get archive with URL

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-11-07 21:42:39 +05:30
Shubham BansalandGitHub 261bf24974 Use informer for environment handling in buildermanager with multiple namespaces (#2603)
* changes to add informer for environment

* remove unnecessary code

* code refactor

* code review changes
2022-11-04 11:57:37 +05:30
Sanket SudakeandGitHub 6af53807aa Monitor specific namespaces for configmap/secret updates (#2598)
We allow functions to refer to configmap/secrets. We are monitoring all namespaces for config maps and secrets and also allow cross-namespace references.
This fix monitors configmaps/secret updates in specific namespaces. Also, we ignore cross-namespace references for configmap/secret updates.

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

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-11-03 14:12:22 +05:30
Shubham BansalandGitHub f37e9e6f89 Use informer for kube watcher handling with multiple namespace support (#2594)
* changes to add informer for kube watcher
* code refactor and fix cli issue for deleting watch
2022-11-02 19:10:06 +05:30
b9fa6ca20a Use informer for time trigger handling with multiple namespace support (#2593)
* changes to add informer in timer for time trigger
* Refactor timer trigger handlers and remove unwanted code

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-11-02 16:08:48 +05:30
Shubham BansalandGitHub c33842c94c Run package informer in go routine for multiple namespaces in buildermanager (#2592) 2022-11-01 20:01:03 +05:30
Shubham BansalandGitHub 9ff9a6e075 newdeploy executor to work with specific namespaces (#2590) 2022-10-31 12:55:57 +05:30
neha_guptaandGitHub a64fcc3faf use controller-runtime signals (#2589) 2022-10-31 12:03:06 +05:30
Shubham BansalandGitHub 47cbbef06f List Fission resource for specific namespace in executor reaper (#2587)
* pool manager to work with specific namespaces

* code review changes and revert changes for go.mod and values.yaml file
2022-10-28 20:39:08 +05:30
Shubham BansalandGitHub dbd2153181 Fission failed to list resources if namespace flag is not provided (#2585)
* use default namespace if no namespace is available
* remove the current-context namespace from push_pr GitHub workflow
2022-10-28 17:39:49 +05:30
Sanket SudakeandGitHub 2bd005c387 Refactor code generator for deepcopy files (#2580)
* Refactor code generator for deep copy files
* Add timeout to push PR workflow
* Add timeout for the fission-dump command
* Update helm and kind versions

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-10-27 16:24:59 +05:30
Shubham BansalandGitHub 3a9e5ab65d Error if rolebinding exists with different role reference in namespace (#2579)
* added unit test for setup role binding method
* changes to throw an error in case of mismatch in cluster role name
* changes to add a check for role kind
2022-10-27 14:10:38 +05:30
Sanket SudakeandGitHub ee790b3e1e Update chart version to v1.18.0-rc1 (#2576)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-10-20 11:44:10 +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
neha_guptaandGitHub facd14de90 mprove warning/verbose messages around namespace in Fission CLI (#2572)
Removed extra warning message while creating HTTP trigger, and updated some verbose logs to show info related to the namespace.
2022-10-17 17:52:34 +05:30
Sanket SudakeandGitHub d933f0ba6c Skip CI if label added to PR (#2571)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-10-15 17:52:12 +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
neha_guptaandGitHub b9513868ed add namespace param for fn and env (#2556)
This PR moves fission CLI as closer as possible to kubectl command behaviour.  We have improved namespace handling behaviour across CLI.

* add namespace param for fn and env
* use common fn for ns check
* update validation
* default namespace for httpTrigger, env and package, config and triggers
* use default ns
* add namespace filter to spec
* add forceNamespace flag
* set current namespace
* add default namespace in config
* add namespace specific destroy
* add all namespace in the list of resources
* add namespace as global tag
* use %s instead of %v
* add test cases for namespace
* use ns in get all functions
2022-10-11 13:23:47 +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
Andrey DudinandGitHub 1102999b4d Add ability to configure object reaper interval for different executor types (#2543)
Added properties to configure object reaper interval, global and specific to exec type.

OBJECT_REAPER_INTERVAL - global
NEWDEPLOY_OBJECT_REAPER_INTERVAL - for new deploy type
CONTAINER_OBJECT_REAPER_INTERVAL - for container type
POOLMGR_OBJECT_REAPER_INTERVAL - for poolmgr
2022-09-23 11:35:13 +05:30
AmborandGitHub da50c3759d feat: add the fn annotations to newdeploy function based deployment (#2554)
* feat: add copy the fn annotations to the deploy annotations

* feat: add copy the fn labels to the deploy labels
2022-09-22 14:21:27 +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 d03395949b changes to inject of otelhttp transport in executor (#2552) 2022-09-22 10:47:47 +05:30
b19d18c8bc Enable promlinter and enhance exposed metrics. (#2550)
* Enable promlinter
* Rename archives metric and update dashboard, linter

Co-authored-by: shaunak_deshmukh <shaunak@infracloud.io>
2022-09-20 12:40:34 +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
2882e0d3e7 allow two HTTP triggers with no URLs and different prefix (#2540)
* allow two HTTP triggers with no URL and different prefix
* update dependency
* Fix controller existing tests
* Ensure namespace cleanup in API test
* update test cases
* handle error conditions in test

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-09-13 13:30:00 +05:30
Sanket SudakeandGitHub dea7b2be94 Generate fission code using code-generator from upstream 1.25 release (#2534)
* Generate fission code using code-generator from upstream 1.25 release
* Update sigs.k8s.io/controller-runtime v0.13.0

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-09-07 10:15:29 +05:30
7dad7c8399 Ensure newdeploy function pod restart on referred configmap update (#2528)
Configmap inside pods for newdeploy and pool manager executor type were not being updated if the user update the configmap.
This fix will help to update the pods for both executor type with new configmap. As per the changes if there is any configmap update then pods will get restarted for both executor type and then it will refer new configmap.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-09-06 16:12:55 +05:30
ed6f4ea375 Dump labels and annotations for function via getmeta cli (#2525)
Co-authored-by: Nemanja Miletic <nmiletic@paloaltonetworks.com>
2022-08-31 12:51:11 +05:30
Sanket SudakeandGitHub fef2d8f875 Propogate context for prometheus queries via canaryconfig ops (#2527)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-08-31 12:03:00 +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
Andrey DudinandGitHub 9016b6d28c Correct error message in otel propagators test (#2522) 2022-08-26 11:43:37 +05:30
Sanket SudakeandGitHub 3b4211b581 Update go dependencies to latest and actions used in workflows (#2510)
* Updated all Go language dependencies to latest version available
* Formatted all files as per gofmt
* Update Golangci-lint version to 1.48.0
* Updated action version wherer application in Github workflows
* Updated Kubernetes version to latest available
* Remove "io/ioutil" references and replace with "io"/"os"

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-08-19 13:36:37 +05:30
Sanket SudakeandGitHub d32e09aaf9 Update go-restful libraries (#2509)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-08-09 16:09:40 +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 9343eb9911 Use sig.k8s.io/yaml instead of ghodss/yaml (#2506)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-08-05 16:09:34 +05:30
Shubham BansalandGitHub 3c8edab514 removed unused reference of TRACING_SAMPLING_RATE (#2498) 2022-07-27 14:30:30 +05:30
Sanket SudakeandGitHub 5c886e4cf4 Upgrade Opentelemetry Libraries and adopt enhancements (#2484)
1. Use websocket support introduced in Openetelemetry Librarries
2. Use propagators settings introduced in Opentelemetry Go SDK
3. Use samplers settings introduced in Openetelemetry Go SDK

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-07-20 11:13:12 +05:30
Pranoy Kumar KunduandGitHub dba9143f45 Prevent creating function of executor type container via fn create command (#2486) 2022-07-19 15:26:12 +05:30
Shubham BansalandGitHub 1abe4dadb7 fix to change value of BuildStatus from Pending to pending (#2489) 2022-07-19 13:29:36 +05:30
Shubham BansalandGitHub 9cedeb4fa6 Generate package within 63 character limit when creating function (#2482) 2022-07-13 10:19:45 +05:30
Sanket SudakeandGitHub 899e6e96d6 cleanup: Remove Opentracing support as no active users (#2196)
References:
[1] #2193
[2] https://fissionio.slack.com/archives/C3LUX6BBP/p1631706812069300

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-07-12 14:52:17 +05:30
Ankit ChawlaandGitHub 7838debadf Added fix to retrieve correct s3 urls (#2465)
* Added fix to retrieve correct s3 urls

* Fixes to S3 url

* Squashing commits

* Fixing if conditions for storagetype in geturl
2022-07-12 11:56:25 +05:30
Shubham BansalandGitHub 5838340594 Increase time for port forwarding exponentially in fission CLI (#2468) 2022-07-07 15:36:36 +05:30
Shubham BansalandGitHub c71867169b Pods immediately terminate for idletimeout in new deployment and container executer type (#2459)
* added waitgroup to handle multiple goroutine scenario
* changes for cache service
* changes to get function service from cache by UID
2022-06-29 11:49:34 +05:30
Ankit ChawlaandGitHub 473acc4e2b Added support to set builder and fn pod specs via helm chart (#2461)
The users can now set the pod spec for builder and fn pods via helm chart.
Currently we have set some default securitycontext for the pods. Before there were no permissions set and the user would by default enter root when kubectl exec into pod. Now the permissions have been set and the user will not be able to access root directory in poolmgr and newdeploy pods.
2022-06-27 16:52:28 +05:30
21ea35b02a CLI to operate archives managed by Storage Service (#2450)
* Add API for listing storage service archives
If id is mentioned we allow user to download specific
archive. If id is not mentioned we list all archives
present with storage service.
This will allow us to build CLI with storage service
and help users to debug storage service.
* Added commands for storagesvc cli and functionalities
* Reusing code and added geturl and download.
* Fixed geturl for localstorage.
* Fixed description of fission archive command
* Added unit tests for function getstorageurl
* Added integration test for archive cli




Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-06-15 18:53:36 +05:30
Shubham BansalandGitHub 7f21b708e7 Avoid fission installation failure due to analytics connection error (#2457) 2022-06-15 11:32:06 +05:30