Commit Graph
311 Commits
Author SHA1 Message Date
Sanket SudakeandGitHub 21c76683ef [helm chart] Remove prometheus chart dependency from Fission (#2371)
* Removing Prometheus dependency from fission chart
* User should install their own Prometheus installation
* Install Prometheus chart in Github CI workflow
* Change Prometheus query logging to debug

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-03-02 10:58:56 +05:30
Sanket SudakeandGitHub ded13229c0 Refactoring prometheus metrics and labels (#2375)
This change mainly fixes few things around router and executor
exposed metrices.
1. We are trying to follow standard in metric names.
2. Lables such as namespace are colliding with kube-prometheus standards
so they are getting relabled to exported_namespace. Added function prefix
to resolve this.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-03-02 10:10:58 +05:30
Ankit ChawlaandGitHub 1d22b7596c Revert "Added function to sanitize strings by escaping quotes (#2360)" (#2367)
This reverts commit fe5e5f592b.
2022-02-21 15:34:38 +05:30
Ankit ChawlaandGitHub fe5e5f592b Added function to sanitize strings by escaping quotes (#2360) 2022-02-21 12:44:27 +05:30
Sanket SudakeandGitHub 8110f9ac13 Fix code/doc generators and deepgen code (#2353)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-02-12 12:04:08 +05:30
Shubham NazareandGitHub 667629d265 dump HTTP request/response for function test (#2348) 2022-02-11 14:35:21 +05:30
Ankit ChawlaandGitHub b06ff625e0 Fix validation for secret & configmap reference with function (#2349) 2022-02-11 09:00:47 +05:30
Ankit ChawlaandGitHub 8ee74161fc Added validation to keda types and updated help (#2346)
* Added validation to keda types and updated help

* Changed formatting of help

* Changed variable name
2022-02-09 19:55:14 +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 e8ff79e448 Prevent env deletion if any function exists (#2343)
* Added force deletion flag for env
2022-02-07 16:20:54 +05:30
Shubham NazareandGitHub 5cb3ebf262 CLI Check (#2341)
* added checks for kubernetes-version, fission-services and fission-version

* refactor kuberntes and fission version check
2022-02-07 11:01:20 +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 590eefaa52 feature: Basic auth support with fission router (#2292) 2022-02-01 19:40:40 +05:30
Shubham NazareandGitHub 260de05a63 make graceperiod configurable for container functions (#2337) 2022-01-28 10:18:20 +05:30
Shubham NazareandGitHub e06aa25245 show error while creating mqtrigger if given function is not present (#2306) 2022-01-25 10:41:09 +05:30
Sanket SudakeandGitHub 353453e9a7 Rbac resources per release for multiple installation on same cluster (#2302)
* Change RBAC resource names work for multiple Fission release
* Fetch secret configmap and package cluster role based on the release name
* Remove default namespace hardcoding from helm chart

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2022-01-18 09:18:53 +05:30
Ankit ChawlaandGitHub 89aeddaf3a Minor bug fixes (#2298) 2022-01-11 17:06:21 +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
Ankit ChawlaandGitHub b27043518f Added ignorenotfound flag for all resources' deletion (#2293)
Treat \"resource not found\" as a successful delete if ignorenotfound flag passed while deletion of Fission resource.
2022-01-06 17:30:05 +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 bf8c01cff0 MQT Kafka: Use Sarama Group Consumer instead of bsm/sarama-cluster library (#2286)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-12-22 18:00:25 +05:30
Dylan ArbourandGitHub 223892f121 Simplify if logic in container executor deployment creation (#2282)
Signed-off-by: Dylan Arbour <arbourd@users.noreply.github.com>
2021-12-20 10:43:12 +05:30
YachikaRalhanandGitHub 73784f39ac Allow user to use existing bucket with same name via fission storage service (#2275)
* If a bucket already exists with the same name, allow the user to use that one
* Abstracted create or get a storage container
* Check err when the con is empty and return container name with error
2021-12-10 15:59:08 +05:30
Sanket SudakeandGitHub 35a5397a05 Retry pod choose if we get terminated or deleted pod from ready pod controller (#2274)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-12-10 13:45:44 +05:30
Sanket SudakeandGitHub fe0c1e3683 Add support for generating CRD docs (#2273)
* Add support for generating CRD docs
* Correct typos in custom resource definitions

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-11-30 15:54:53 +05:30
Sanket SudakeandGitHub 59e876062f Capture os signals to gracefully shutdown fission components (#2261)
- Currently, fission components don't handle shutdown signals.
So we don't get any to do the required cleanup before the fission process
exits. Adding signal capture process with cancelling context so
that all dependent processes stop working when the process gets term
signal.
- Set log level to error in otel shutdown function

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-11-11 17:02:11 +05:30
Sanket SudakeandGitHub 81e247e1e8 Issue #2258 Reafctor ready pod conroller to use lister and cache sync checks (#2259)
Reactored ready pod controller code to user lister and cache sync checks,
so that we avoid querying lister if cache is not synced in choodPod function.
Also, as noticied in #2258 we were initializing workqueue in goroutine
which was causing nil pointer reference. We have moved it out of goroutine
and kept specific parts in goroutine.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-11-10 16:00:57 +05:30
Sanket SudakeandGitHub 65e842b1c8 Pass context to functionCache functions and debug messages in pool cache (#2244)
* Active requests count tracking with debug messages
* Pass required contexts to cache functions
* Fix duplicate imports

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-11-10 11:11:44 +05:30
Sanket SudakeandGitHub 6f6710ede9 Run all generators with upstream 1.22 code-generator (#2251)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-11-06 12:23:43 +05:30
Sanket SudakeandGitHub f09d399c17 Add command to generate Fission CLI docs (#2247)
* Add command to generate Fission CLI docs
* Minor fixes identified by LanguageTool

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-11-02 17:09:31 +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
Pradeep Lakshmi NarasimhaandGitHub 772941e02e Adding validations for env/fn before listing pods (#2231) 2021-10-22 13:27:28 +05:30
Pradeep Lakshmi NarasimhaandGitHub c9da527d37 feature: Added command to list pods managed by fission for environment/function (#2207) 2021-10-10 10:52:42 +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
Pradeep Lakshmi NarasimhaandGitHub 23f4643c6e refactor: Replaced context.TODO() with request.Context() in API files (#2214) 2021-10-04 12:52:50 +05:30
Sanket SudakeandGitHub 119d674207 enhancement: Add different samplers and propagators support with OpenTelemetry (#2201)
* Samplers: Check PR/helm values for supported types
* Propagators: Check PR/helm values for supported types
* Added tracing support via fission CLI
* Use parentbased_traceidratio as default sampler with 0.1 ratio

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-09-22 16:29:49 +05:30
Sanket SudakeandGitHub 4a0bd1aa21 fix: Use standard env variables for opentelemtry (#2194)
Opentelemetry defines standard variables which are supported by multiple observability platforms.

[1] https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md
[2] https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md

By defining support for standard env vars, Fission open telemetry support can be leveraged with different
platforms such as NewRelic, SigNoz, DataDog etc.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-09-16 17:48:26 +05:30
Sanket SudakeandGitHub 33473a4528 feature: Capture important events with span in fission and add trace id in logs (#2180)
* Capture important open telemetry events with span in fission
* Add context to missing HTTP calls
* Add Trace ID in logs
* capture trace id in the proxy handler function
* Always registry tracer to get traceID

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-09-15 16:41:59 +05:30
Sanket SudakeandGitHub 5e226433b5 Check package resource version from fetch request with fetched package (#2183)
When fetch request is received by fetcher, it fetches
package information. Checking if package resource version mentioned
in fetch req matches with one received. Adding warning for now,
in future we need to ensure we give error if resource version
are not matching.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-09-06 13:12:33 +05:30
Sanket SudakeandGitHub f4c56f81f3 Pass podinformer to poolpodcontroller instead of reference to pool manager (#2184)
In upgrade tests, sometimes in race condition pool manager podlister
takes time to sync in which case, poolpodcontrolller get nil reference
for gpm.podLister. Passing podInformer to poolpodcontroller so that
we wait for podInformer cache to sync.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-09-06 11:57:33 +05:30
Sanket SudakeandGitHub eb31381094 Functions with common prefix path handling with internal routes (#2182)
With addition of prefix based routes in 1.13.1, we have turned
all internal routes prefix based. This is causing wrong responses
in functions names with common prefixes such as `hello-world` and
`hello-world-consumer`. This patch fixes it where we add a fix route
for function name and prefix path for function name with `/`.
We improve overall prefix path handing with fix and prevent breakage
for existing flow.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-09-06 08:35:38 +05:30
Sanket SudakeandGitHub a1cbce810e Add kubernetes objects aware logger with zap (#2179)
Using controller-runtime zap integration which is aware of Kubernetesobjects and logs only name+namespace of the object when complete runtime.Object compatible type is given to logger.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-31 18:38:14 +05:30
nickmancariandGitHub f195975bda Added lables to flags '--url', '--prefix', '--method' to reflect their deprecation for the 'fn create' use case. (#2171) 2021-08-31 18:12:58 +05:30
Sanket SudakeandGitHub 3636bb35ff Fix pod name in port forwarding log (#2178)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-31 10:07:42 +05:30
Sanket SudakeandGitHub 1d5a09699b Use pool pod controller with env informer (#2161)
Signed-off-by: Sanket Sudake sanketsudake@gmail.com

- Use informers and listers in executors
- Passing context properly in pool manager executor
- Environment updates in the pool manager would not cause updates in the deployment
- Environment update minimizing downtime
- Use replicaset controller and environment delete triggers to cleanup specialized pods
2021-08-31 09:31:32 +05:30
Sanket SudakeandGitHub 1df59316e7 Add correct context required in executor (#2175)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-25 13:16:26 +05:30
Sanket SudakeandGitHub d6b47c1a4e Add typed informers instead of generic SharedIndexInformers (#2174)
Generally using typed informers is more standard practise
than using SharedIndexInformer(SII) implicity. SII also lack
listers provided by informer factory and few other high level
abstractions.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-23 17:41:55 +05:30
Gaurav GahlotandGitHub 5f17b4f3c5 Add context for traces in executor (#2172)
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
2021-08-20 14:53:06 +05:30
Sanket SudakeandGitHub 1b9d21b5e3 Change default informer resync period to 30 minutes (#2167)
Currently most of informers used in Fission are using resync
period of 30sec which is quite low and causes lot of disturbances
in overall system. Since informers already have watchers which would
be delivering events to the handlers. If any handlers require lower
sync period they should register handler with `AddEventHandlersWithResyncPeriod`
instead of we generaling informer.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-20 09:03:09 +05:30