Commit Graph
57 Commits
Author SHA1 Message Date
703613a475 fix: custom runtime container name is invalid (#3065)
* fix: custom runtime container name is invalid

* lint: pkg/executor/executortype/newdeploy/newdeploy.go

* Custom name for runtime container

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

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
Co-authored-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2025-01-20 16:41:18 +05:30
Sanket SudakeandGitHub 4bce904c96 Use mholt/archives instead of mholt/archiver (#3128)
* Use mholt/archives instead of mholt/archiver
* Fix validations
* Fix iszip function
* Fix directory
* Add better path sanitization
* ensure safe dir is passed
* Fix file permissions
* Fix config path
* Sanitize builder source path

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2025-01-08 11:00:54 +05:30
robbellMFandGitHub 932be4eb38 Fix fission spec apply --delete deleting environments (#2943) 2024-05-17 22:22:50 +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 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
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
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
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
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 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
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 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
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
Ankit ChawlaandGitHub 2f8fde0af0 Upgraded archiver dependency to v3.5.1 (#2378) 2022-03-14 10:29:28 +05:30
Ankit ChawlaandGitHub e1fb5a7411 Changed deletion order in spec destroy according to dependency (#2344) 2022-02-08 13:54:28 +05:30
Ankit ChawlaandGitHub 3ac188124e [Feature] Force spec apply even if conflicting resources exist with different deployment ID (#2338)
* Added allowconflicts flag to specs
* Made changes for all resources
* Added help for allowconflicts flag
* Changed function isObjectMetaEqual
2022-02-02 12:28:41 +05:30
Pradeep Lakshmi NarasimhaandGitHub 89f80c6f25 Apply commit label on resources created/updated when '--commitlabel' flag is passed (#2279) 2022-01-11 12:31:59 +05:30
Pradeep Lakshmi NarasimhaandGitHub a5fb5b9901 feature: Added '--specignore' option to pass file containing specs to be ignored for fission spec commands (#2239)
- New flag `--specignore` has been added for command fission spec [list | validate | apply | destroy]
- This flag is optional.
- The default spec ignore file name is `.specignore`, if the flag is not used
- The spec ignore file existence will be checked in the `--specdir` path
- If spec ignore file is passed to the flag, with a name other than .specignore and if it does not exist in the `--specdir` path then an error will be returned.
- `--specdir` will be the root path against which the patterns will be evaluated
- The behaviour of the spec ignore file will be similar to .gitignore (only for yml and yaml files). For reference: http://git-scm.com/docs/gitignore
2021-10-29 13:26:42 +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 e4d5565f8e security: Update go-uuid and mholt/archiver to recommended version (#2216)
* security: Update go-uuid to recommended version
* security: Update mholt/archiver dep to recommended version

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-10-06 13:24:54 +05:30
a82281ad1c containers as functions (#1681)
PR adds a new executortype which supports running containers as functions. New CLI under functions is added to create container as functions.

Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-16 18:08:41 +05:30
673ca25cf2 Support for multiple HTTP verbs in routes/HTTPTrigger (#2064)
* Support for multiple HTTP verbs in routes/HTTPTrigger

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

* Update pkg/apis/core/v1/types.go

Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>

* Fix fallbackurl for ingress

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

Co-authored-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-14 14:48:27 +05:30
aa45703a99 Enable prefix based routing (#2047)
* Enable prefix based routing

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

* Optimize checking condition

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

* Disable few tests

* disable router modification for now

* run code generator

* Collect fission dump in CI

* Enable all tests back

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

* Remove unwanted code

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

* Add prefix support at more places and couple of todo's

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

* Few more changes

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

* Improve function trim support

* Support for prefix based urls in fission function test

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

* multi route for fission function test

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

* Improve validations in trigger creations

* Adjust leading / in url from fission

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

* Change suburl to subpath for function test

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

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-06-10 13:54:49 +05:30
a9c56e5bb2 Add a warning if spec is applied on a dirty worktree (#1966)
* Add a warning if spec is applied on a dirty worktree

* Update go dependencies after rebase

* Use the console package for showing the warning

* Fix merge conflicts

* Handle errors and use better messages

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-05-24 21:36:14 +05:30
6f9bad3d05 Spec validation option (#1865)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
2021-02-08 11:14:38 +05:30
045a365a1b Exit with status code 1 on failed package builds (#1926)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com>
2021-02-04 21:57:38 +05:30
Gaurav GahlotandGitHub 695b0759e4 Fixed golangci-lint issues: /fission/pkg (#1902) 2021-01-19 23:29:20 +05:30
Ta-Ching ChenandGitHub 5c09099084 Avoid exposing sensitive data to client (#1543)
This PR changes the behavior of controller API which
wrongly exposes sensitive data to the client. Now, the
API only returns success if secret/configmap exists;
otherwise, an error will be returned.
2020-02-24 20:02:33 +08:00
1e8148c051 Add resource exists error on spec validate (#1506)
Co-authored-by: Anubhav <50611570+anubhav6663@users.noreply.github.com>
2020-01-27 19:09:35 +08:00
Ta-Ching ChenandGitHub 520cc0e130 Add --dry option to view the generated spec without saving (#1504) 2020-01-24 20:43:42 +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
AnubhavandTa-Ching Chen 5eaf11b8aa Add failed/success output to spec validate (#1471) 2019-12-20 12:00:47 +08:00
AnubhavandTa-Ching Chen 7b3cc8fdf0 Add spec list feature (#1468)
Adding fission spec list functionality. It lists Functions, Environment, Packages, HTTPTrigger, MessageQueueTriggers, Canary Config, TimeTrigger, KubeWatch created by an application specification.
2019-12-19 19:41:59 +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 4b3f48b537 Fix spec shows source archive is not used (#1448) 2019-12-01 16:51:13 +08:00
Ta-Ching ChenandGitHub 6301a78814 Ignore hidden file when creating archive file (#1450) 2019-12-01 09:58:16 +08:00
Ta-Ching ChenandGitHub 506b427124 Fix spec init overrides existing deploymentconfig (#1449) 2019-11-29 23:59:10 +08:00
Ta-Ching ChenandGitHub 3aca0edfcc Show warning when referencing nonexistent resources in spec (#1415) 2019-11-18 13:46:28 +08:00
Ta-Ching ChenandGitHub 81ece23bfe Add resource info to output message when saving spec file (#1414) 2019-11-18 12:35:14 +08:00
Ta-Ching ChenandGitHub 66b9dfa8e9 Add --spec to package command (#1411) 2019-11-18 11:15:48 +08:00
Ta-Ching ChenandGitHub b97a3c4b0a Fix wrong command and flag usage description (#1412) 2019-11-17 02:39:31 +08:00
Ta-Ching ChenandGitHub cf2d35291e Drop unreleased features (record & replay) (#1406)
1. The records are stored in redis which is not migratable to another cluster for the testing purposes.
2. Some of the requests fields are not recorded.
3. People should consider using https://github.com/buger/goreplay which is an existing mature and well-tested solution for testing purposes.
2019-11-13 15:10:32 +08:00
Ta-Ching ChenandGitHub 1cda7e051b Build error formatting on fission spec apply --wait (#1403)
The character `\n` in buildlog stores in package status
are escaped and so when we have to replace them with
actual line breaker.
2019-11-12 21:00:55 +08:00
Ta-Ching ChenandGitHub 7640f1199d Prettify console output message (#1396) 2019-11-10 16:42:34 +08:00
Ta-Ching ChenandGitHub 7b6e4318d4 Reorder command flag and add missing flags (#1394) 2019-11-10 14:58:29 +08:00
Ta-Ching ChenandGitHub d3d8ff6c1b Replace flag text with const (#1391) 2019-11-09 22:13:35 +08:00
Ta-Ching ChenandGitHub 1888cd2ac7 Migrate from urfave/cli to cobra (#1385) 2019-11-08 21:22:00 +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