Commit Graph
230 Commits
Author SHA1 Message Date
Sanket SudakeandGitHub caffed92f4 Remove github.com/pkg/errors with appropriate replacements (#3172)
* errors.Wrap* removal

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

* remove errors.Errorf

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

* Remove remaining calls

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

* Few more errors

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

* Fix golint errors

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

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2025-02-20 08:58:37 +05:30
Sanket SudakeandGitHub 2853498a98 Update all images used to GHCR repo (#3154) 2025-01-25 20:39:54 +05:30
soharab-icandGitHub 36f318186b Add podSpec to generated environment manifest (#3033)
* Use builder and container names when creating environment K8s object instead of keeping it empty.
Add skeleton for podSpec field to give user an idea of how to use podSpec field.
* Add a positive test for env podSpec
* Add the test to CI tests
* Remove duplicate wait_for_builder function
* Fix CI tests failure
* Fix CI tests failure
* Add a negative test for env podSpec
* Fix issues with negative test
* Removing negative test as it may break executor which will affect other tests
* Rebase with main as executor issue is fixed.
Add the negative test.
* Fix negative test


---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-10-09 11:11:19 +05:30
soharab-icandGitHub 93869d3bc8 Add method and subpath flags to timetrigger object for triggering a function (#3017)
* Update timetrigger crd and add method and subpath fields in spec.
Update fission-cli to accept user input for method and subpath fields.
Update publisher package to utilize these fields for triggering a function.
Update timer controller to use method and subpath fields for publishing a request.
Add a new test TestPublisherSubpath in pulisher package.

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Use kubebuilder default annotation.
Update test for fission-cli timetrigger create, update command to support method and subpath flags.

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-09-16 17:15:54 +05:30
soharab-icandGitHub 103c7d57e4 Upgrade libs and go version (#2949)
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-27 12:51:54 +05:30
Robbie CroninandGitHub c6d01827b0 Fix: MutatingWebhookConfiguration naming conflict (#2948) 2024-05-27 11:53:53 +05:30
Robbie CroninandGitHub d8fe37e736 Fix: ValidatingWebhookConfiguration conflict (#2947) 2024-05-27 11:24:51 +05:30
soharab-icandGitHub f7e9e71ee1 Set latest envVersion 3 as default (#2945)
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-22 14:06:36 +05:30
soharab-icandGitHub 8bfe2d0ed1 Fix CLI pkg getsrc returns deploy archive instead of source archive (#2941)
* CLI command `pkg getsrc` returns deploy archive

```
Fix CLI command to return source archive instead of deploy archive.
If source archive is not available then return deploy archive.
```

* Add e2e tests for `fission package` CLI commands
* Cleanup environments created for pkg test
* Fix unit test failures


---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-16 18:29:58 +05:30
soharab-icandGitHub 241983d2f7 Fix fission check command doesnt work for namespace other than fission (#2932)
* Fix `fission check` command which does not work outside of `fission` namespace

If user provide namespace then use it for running `fission check` command.
If user does not provide namespace then use `fission` as default namespace.

* Update go version to 1.22.2

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-07 11:18:22 +05:30
Sanket SudakeandGitHub b0e4440328 Update Go modules (#2900)
- Update go modules
    + github.com/prometheus/client_golang v1.17.0 [v1.18.0]
   + golang.org/x/net v0.19.0 [v0.20.0]
    + sigs.k8s.io/controller-tools v0.13.0 [v0.14.0]
- Remove Kafka tests disabled.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2024-01-14 11:48:40 +05:30
Vardhaman SuranaandGitHub 12f8017d9b added fetcher test cases (#2893)
* added fetcher test cases

* error message formatting fix

* error message formatting fix for e2e framework
2023-12-21 17:02:39 +05:30
Sanket SudakeandGitHub 62f729727a Change container base image to cgr.dev/chainguard/static (#2881)
* Change container base image to cgr.dev/chainguard/static
* Lint fixes
* fix test failure
* Add router deployment wait
* add check command in upgrade script

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-24 19:01:31 +05:30
Sanket SudakeandGitHub 17fbe42fcc Update fission version v1.20.0-rc2 (#2879)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-23 13:00:50 +05:30
Sanket SudakeandGitHub d23ed572f9 Add tests for preupgradchecks and spec/archive CLI (#2874)
* Add tests for preupgradchecks
* Add spec tests
* Add package archive tests
* Wait for cleanup
* Fix test and coverage

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-17 14:08:38 +05:30
Sanket SudakeandGitHub e7d6381876 Add webhook server to tests (#2873)
* Add webhook server to tests
* fix config for webhoook service
* Fix logger in webhook manager
* Use interface for webhook manager
* single reference for router url
* Cleanup token code

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-16 14:16:28 +05:30
Sanket SudakeandGitHub 57b537f09e Add CLI tests for mqtrigger/timetrigger (#2872)
* Add tests for mqtrigger/timetrigger
* Change command to run tests
* correct coverage command
* update coverpkg

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-13 17:14:47 +05:30
Sanket SudakeandGitHub 2e4825def0 Add function test CLI tests (#2871)
* Add function test CLI tests
* Add few more services to tests

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-13 14:34:56 +05:30
Vardhaman SuranaandGitHub 2a40b4538c added manger to keep track of go routines in the services (#2869)
- added manager to wait for all go routines to end before exit
- code refactor
- renamed Manafer to Interface and GoRoutineManager to GroupManager
- replaced some go routine calls with manager Add func
- added unit tests for manager
2023-11-07 15:30:48 +05:30
Sanket SudakeandGitHub 27132975c4 Add interfaces for executor/fetcher/storagesvc clients (#2867)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-06 16:09:51 +05:30
Sanket SudakeandGitHub b099db38d7 Update Go deps (#2868)
---

github.com/IBM/sarama v1.41.3 [v1.42.0]
github.com/gorilla/mux v1.8.0 [v1.8.1]
github.com/spf13/cobra v1.7.0 [v1.8.0]

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-05 11:33:45 +05:30
Sanket SudakeandGitHub 2223081c80 Test for httptrigger and functions container/newdeploy (#2861)
* Test for httptrigger and functions
* Fixes with multierror
* review changes

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-27 15:05:20 +05:30
Vardhaman SuranaandGitHub 2eb2eba88c added function tests for fission cli (#2859)
* added function tests for fission cli

* code refactor
2023-10-26 14:40:38 +05:30
8a17d391c5 Envtest based integration tests for Fission (#2858)
* skeleton for envtest fission
* Refactor code and add CLI test
* hack
* Update server test
* remove skip-ci for lint tests
* Pass client go storagesvc
* Add clientGen interface across code
* Fix storagesvc test
* Fix cmd client
* add retry in server test
* Fix concurrenct access to pool deployment
* Remove old executor test
* get rid of ginkgo/gomega
* disable flaky test
* flaky test
* revert ci change
* handle err from ParseBool

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
2023-10-26 12:09:11 +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
guangwuandGitHub 3d77077bc5 fix: Environment typo (#2829)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-30 07:50:09 +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
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
612206b033 test job with old namespace support to ensure backward compatibility of fission (#2654)
* trigger test job to ensure backward compatibility
* update builder and function namespace in the CI test
* resolve namespace to show logs for fission-CLI
* export function-namespace variable
* Use a common script for an old and new test run
* Revert empty namespace values in the chart

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-12-08 12:15:23 +05:30
neha_guptaandGitHub 1e0641d5f9 Removed call to InfluxDB via controller proxy (#2638)
* handle error condition in fission fn log command
* use the single stream for log exclude fetcher logs
* add all pods in the fn logs command
* update the previous stable version
* remove proxy to the controller for influxdb call
* stop running controller if influxdb flag turned true
* port-forward for influx DB
* remove controller dependency from test case
* port forward to influx DB if URL not provided by the user
* archive pruner test
2022-11-25 21:11:25 +05:30
neha_guptaandGitHub 31639774b0 Handle logs from all pods in function and error condition in fission fn log command (#2634)
* handle error condition in fission fn log command
* use single stream for log exclude fetcher logs
* add all-pods in fn logs command
* update previous stable version
2022-11-24 11:21:00 +05:30
Shubham BansalandGitHub 6d117ad43a Allow empty namespace for fission function and builder (#2621)
Currently, we create Fission resources in the default namespace, function-related resources are created in the fission-function namespace, whereas builder resources are created in the fission-builder namespace. This causes confusion for a lot of users.
In this fix, we allow the user to set the function and builder namespace empty so that function and builder resources are created in the same namespace as the function resource always.

If the user desires older behaviour they can functionNamespace and builderNamespace the same previous before the upgrade.

* use default namespace for fission  function and builder
* support for existing fission namespaces
* Replace builder and function namespace with template
* Fix namespace creation template

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-11-16 22:16:05 +05:30
57d3a80fc6 Allow different namespaces in CI for fission-function and fission-builder (#2609)
* Add variables for function/builder namespace in the test
* Allow different namespaces in integration tests

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-11-11 18:56:20 +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 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
Shubham BansalandGitHub 904413db6d Capture previous command exit code in integration tests cleanup (#2503)
* show previous response code

* log previous response code of shell script command
2022-08-04 10:16:05 +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
Sanket SudakeandGitHub 39dd65b224 Add support for custom metrics for HPA (#2423)
* Add support for custom metrics for HPA
* Cleanup TargetCPUPercent references from possible places
* HPA v2beta has 80% default  cpu limit if not set

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-05-09 17:16:34 +05:30
Sanket SudakeandGitHub f4892d7f10 Use latest goreleaser with GOAMD64 support (#2419)
* Use latest goreleaser with GOAMD64 support
* Update Go version to 1.18.1
* Hardcode GOAMD64 in cli install

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-04-25 18:20:58 +05:30
90c479b23c Restructured authmiddleware fn and added tests (#2410)
* Created separate file for authmiddleware fn
* Optimize auth login and middleware
* Added unittests for authmiddleware
* Fixed authURL
* Removed featureConfig as global variable
* Fix integration test according to examples repo changes
* Fix integration test path for go module-example

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2022-04-22 14:21:58 +05:30
Atulpriya SharmaandGitHub b98538ba24 Fixed broken links (#2417) 2022-04-21 20:18:03 +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
Sanket SudakeandGitHub 327275d1a4 Spell fixes across code (#2288)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-12-28 18:40:07 +05:30
Sanket SudakeandGitHub 8fb311b739 Disable nats test as we deprecate Fission Nats Integration (#2241)
We would like to deprecate Fission Nats Integration and recommend
user to use Fission Keda Nats connector to handle Keda events.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-10-29 09:48:47 +05:30
Sanket SudakeandGitHub 02e16666ed chore: Update node and Go environment images in CI (#2240)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-10-27 15:30:31 +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 9b26befcba Allow disabling preupgrade checks flag (#2229)
Added options to allow disabling of pre-upgrade checks,
also providing options to mention image and image tag
for pre-upgrade.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-10-21 09:27:12 +05:30
Sanket SudakeandGitHub 1347d73b04 fix: Goreleaser for build and release (#2189)
* Add goreleaser for building binaries
* Update CONTRIBUTING.md
* Break release scripts for goreleaser

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-09-21 15:29:40 +05:30
Sanket SudakeandGitHub 0c8d7c26c5 Use latest env in spec-archive test (#2170)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-19 20:48:37 +05:30