Commit Graph
442 Commits
Author SHA1 Message Date
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
c51c6b7f7e fix: Add pathType to create networking/v1 ingress (#2164)
* fix: Add pathType to create networking/v1 ingress

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

Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-20 08:49:55 +05:30
Gaurav GahlotandGitHub dfcf961f75 Change default function timeout to 60 seconds and pass context to executor from router (#2169)
Patch changes default function timeout to 60 seconds. Also, we are propagating context from router to executor in a proper way.
2021-08-19 19:13:33 +05:30
0cc3ecc2e9 Fission meets OpenTelemetry (#2157)
* add opentracing section and otelCollectorEndpoint
* initialize OTLP exporter
* pkg/controller: changes for context propagation
* pkg/executor: changes for context propagation
* pkg/fetcher: changes for context propagation
* pkg/router: changes for context propagation
* pkg/storagesvc: changes for context propagation
* set no default value for otel collector endpoint
* update readme and add notes to charts
* move common code to pkg/utils/otel
* adding fn and env as attributes
* don't use otelhttp transport for websocket
* URL ignore with common filter UrlsToIgnore

Note: The web socket example does not work when using OTEL HTTP. Here is an issue related to that on open-telemetry/opentelemetry-js-contrib.

Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-19 13:00:30 +05:30
Sanket SudakeandGitHub a24934f1a0 Organize pool manager code and few improvements (#2166)
The patch adds few improvements in pool manager and adds better
function composability by reorganizing code.
1. Added created status in get pool call
2. Improved logging in certain areas and having logger per component
3. Separated deployment-specific code in diff file for extensibility

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-18 13:21:54 +05:30
Sanket SudakeandGitHub 9d54f5daac Consider newdeploy functions only for env update in newdeploy manager (#2165)
Currently when we update env, even if we dont have newdeploy related
functions env is getting is getting triggered. Added filter in finding
related functions to avoid this behaviour.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-17 21:55:38 +05:30
Sanket SudakeandGitHub 672bdbba6f Fixed service name generation for function name < 17 chars (#2142)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-08-03 14:19:04 +05:30
Gaurav GahlotandGitHub 6a527d36a8 reading right flag key for rounds (#2135)
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
2021-07-29 19:13:06 +05:30
Sanket SudakeandGitHub 2292f472c9 Option to keep or remove prefix when router triggers prefix based function (#2133)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-29 18:50:26 +05:30
Sanket SudakeandGitHub 8bd1a71065 Change Ingress version from v1beta1 to v1 for K8s 1.22+ compatibility (#2124)
* Change Ingress version from v1beta1 to v1 for K8s 1.22+ compatibility

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

* Minor fix

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-26 09:50:42 +05:30
Sanket SudakeandGitHub eb72fdc717 Enable race detector for unit tests (#2085)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-23 13:24:10 +05:30
Sanket SudakeandGitHub a7f819a78e Optimize swagger doc generator for Fission CR types (#2123)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-22 19:05:37 +05:30
Sanket SudakeandGitHub d4d58e166b Avoid dumping request headers in router (#2122)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-22 16:19:39 +05:30
Sanket SudakeandGitHub 6ced9d03d3 Support to dump request/response in router when debug mode enabled (#2119)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-21 20:45:08 +05:30
Sanket SudakeandGitHub 19c7616a4b Newdeploy/container function service names should fit in 63 characters (#2117)
* Add error message on deployment provision failure

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

* Add 63 characters limit for objects created via newdeploy/container

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-19 15:43:10 +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
Sanket SudakeandGitHub f3e1f9df90 Add go pprof support across fission components (#2112)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-16 13:34:03 +05:30
Sanket SudakeandGitHub ece0475808 Labels and annotation support for functions and environments (#2113)
1. Support for adding labels and annotations to functions & environment via fission CLI through create & update command.
2. Change ensures labels and annotations assigned to the environment would reflect on pods created via executor type pool manager and new deploy.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-15 17:22:01 +05:30
Sanket SudakeandGitHub 2e0bb9304a Covert maps to sync maps in executor fscache to avoid dirty reads (#2105)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-08 10:40:17 +05:30
Sanket SudakeandGitHub 74c0142968 Replace controller with generated SharedIndexerInformers (#2103)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2021-07-06 13:56:10 +05:30