203 Commits
Author SHA1 Message Date
soharab-icandGitHub c6c811ea76 Show warning that --yolo, --concurrency and --rpp fields are valid for executortype poolmgr only (#2971)
* yolo, concurrency and rpp are specifically introduced for executortype poolmgr
```
Show warning if these fields are used with other executortype.
Update CLI with this information.
```

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

* Add warning for fn update too

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

* Show warning while updating `--yolo`, `--con` and `--rpp` to an already created newdeploy function.

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

* Fixed a minor bug

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

* Optmize and increase code readability

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

* Rename function to checkExecutorPoolManager

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

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-07-08 12:04:43 +05:30
soharab-icandGitHub 4c4b574d07 Fix fission-cli cmd pkg getdeploy (#2960)
```
If deployment archive is empty then command will return source archive.
Deployment can be empty if pkg build failed or in running state.
```

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-06-20 18:36:35 +05:30
waitstoryandGitHub 9b978cf2fd Fixed an error when using the command to download src (#2940)
* Fixed an error when using the command to download src

issue: #2938

Signed-off-by: waitstory <waitstory@163.com>

* Fixed an error when using the command to download src

issue: #2938

Signed-off-by: waitstory <waitstory@163.com>

---------

Signed-off-by: waitstory <waitstory@163.com>
2024-06-10 10:00:31 +05:30
soharab-icandGitHub 156c1ac2e6 Pin goreleaser version to v1 in github actions (#2956)
```
Latest goreleaser version v2 has some breaking changes.
Due to this CI tests failed.
Therefore, setting goreleaser version to v1.
```

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-06-06 19:49:04 +05:30
soharab-icandGitHub c126298db4 Revert "Remove deprecated mqtrigger with kind fission (#2875)" (#2946)
* Revert "Remove deprecated mqtrigger with kind fission (#2875)"

This reverts commit f44174debc.

* Upgrade sarama version to v1.43.2

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

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-27 10:21: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
eveneastandGitHub 3e43c07e5a Fix code comments function names (#2927)
Signed-off-by: eveneast <qcqs@foxmail.com>
2024-05-20 19:22:22 +05:30
robbellMFandGitHub 932be4eb38 Fix fission spec apply --delete deleting environments (#2943) 2024-05-17 22:22:50 +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 9cea0d2b32 Upgrade kind version to v0.23.0 (#2937)
* Upgrade kind version to v0.23.0
```
Upgraded kind version to github workflow push_pr.yaml
Upgraded kind version to github workflow release.yaml
Upgraded kind version to github workflow upgrade_test.yaml
```
* Minor change to trigger CI
* Upgrade kind node image to v1.25.16

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-15 13:21:46 +05:30
guangwuandGitHub 08c662bc11 fix: close tmp file (#2931) 2024-05-07 12:51:43 +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 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 f44174debc Remove deprecated mqtrigger with kind fission (#2875)
* Remove deprecated mqtrigger with kind fission
* Remove unused deps

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-21 17:52:37 +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 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
Sanket SudakeandGitHub 267f7faf18 Add cause for all context timeouts (#2862) 2023-10-29 13:19:06 +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
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 c6329ee3db Switch to google/uuid from satori/go.uuid (#2852)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-17 12:19:17 +05:30
Sanket SudakeandGitHub 703d757c29 Remove controller component from Fission (#2850)
* Remove controller component from Fission
* Cleanup at few more places

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-17 09:29:13 +05:30
Guillaume MARTINEZandGitHub 3762ff80f2 Update the Kubernetes autoscaling API to v2 (#2722) (#2842)
* Update the Kubernetes autoscaling API to v2 (#2722)
  - k8s.io/api/autoscaling/v2
* generate all files
* fix missing v2beta ref

---------

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2023-10-11 11:04:45 +05:30
Sanket SudakeandGitHub b43b31884a Update kubernetes versions in CI verification (#2844)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-10 13:11:43 +05:30
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
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
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 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 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
Shubham NazareandGitHub 922cb34243 Change cron syntax to standard format (#2678)
* Change cron syntax to standard format
* Add standard cron example in showschedule command

Signed-off-by: Shubham Nazare <shubham4443@gmail.com>
2023-01-02 20:05:58 +05:30
Sanket SudakeandGitHub 5fae765323 Use client generator to generate all k8s clients and add respective client-go metrics (#2668)
* Define client generator to generate all k8s clients
* Increase QPS and burst values
* Capture client-go metrics
* Support for controller runtime metrics

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-12-13 14:19:36 +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
Sanket SudakeandGitHub 9612baecc0 Upgrade skaffold to v2 manifest (#2633)
* Upgrade skaffold to v2 manifest
* Update note in skaffold file

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


Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-12-05 09:23:31 +05:30
neha_guptaandGitHub e015d6d61f add version info in fission support (#2645) 2022-11-30 13:51:24 +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
neha_guptaandGitHub 4cbe6a7061 Get logs from Pods using Kubernetes API for function log command (#2623)
* add controller enablement flag
* throw an error if service not found
* add logs from Kubernetes in function log command
* pass context in function param
* add pod-namespace in function log command
* pass context in function param
* search for the pod in fn ns in the test
2022-11-17 13:13:33 +05:30
neha_guptaandGitHub 70a0afd624 use namespace flag from global options for watch command (#2622) 2022-11-15 21:10:05 +05:30
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
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 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
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
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
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
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
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
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