Commit Graph
10 Commits
Author SHA1 Message Date
Sanket SudakeandGitHub 2b13af0a5e Add staticcheck fixes (#3221)
* Add staticcheck fixes

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

* update golangci-lint version

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

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2025-05-18 22:27:45 +05:30
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
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
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
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
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 bfbb80efcf Add controller API client interface (#1467)
This PR adds an interface for controller API client, it allows us to
implement mock API client for unit testing with ease and we are
able to generate spec file without accessing the real Fission server.
2019-12-16 23:14:14 +08:00
Ta-Ching ChenandGitHub d3d8ff6c1b Replace flag text with const (#1391) 2019-11-09 22:13:35 +08:00
Ta-Ching ChenandGitHub 93d4b88d84 Make CLI functions return error instead of fatal out (#1379)
Before this PR, CLI functions fatal out when encountering error
instead of returning it. Such behavior makes it hard to reuse 
the functions nor writing unit tests. This PR aims to make functions 
return errors instead of error out.
2019-11-05 16:50:13 +08:00
Ta-Ching ChenandGitHub f288f0f258 Refactor time trigger command (#1376) 2019-11-04 18:26:21 +08:00