You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The execution environment where the AWS Lambda function runs is a clone of the A
6
6
7
7
With these templates, you can run your AWS Lambda functions **as is** in a Knative powered Kubernetes cluster.
8
8
9
-
The examples below use the [tm](https://github.com/triggermesh/tm/releases/tag/v0.0.7) CLI to interact with Knative but one could also use `kubectl`:
9
+
The examples below use the [tm](https://github.com/triggermesh/tm/releases/latest) CLI to interact with Knative but one could also use `kubectl`:
10
10
11
11
### Docker registry for builds
12
12
@@ -16,9 +16,25 @@ builds must be pushed to a Docker registry in order for Kubernetes to be able to
16
16
By default `tm` uses [Knative Local Registry](https://github.com/triggermesh/knative-local-registry),
17
17
equivalent to adding `--registry-host knative.registry.svc.cluster.local` to the commands below,
18
18
so that builds can run without registry authentication.
19
-
To override, set `--registry-host` and secrets according to [tm docs](https://github.com/triggermesh/tm#docker-registry).
19
+
To override, set `--registry-secret` according to [tm docs](https://github.com/triggermesh/tm#docker-registry).
20
20
21
-
### Python
21
+
### Concurrency
22
+
23
+
Concurrency in KLR represented by two components: parallel running [bootstrap](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html) processes per container and Knative [container concurrency](https://github.com/knative/serving/blob/master/docs/spec/spec.md#revision) model. By default [AWS runtime interface](https://github.com/triggermesh/aws-custom-runtime) fires up 8 bootstrap processes (functions, in other words) and allows multiple concurrent requests (`containerConcurrency: 0`) to be handled by each container. Default concurrency configuration can be changed on function deployment or update using `tm deploy service` command parameters:
24
+
25
+
`--concurrency <N>` - sets Knative service `containerConcurrency` value to 5
26
+
27
+
`--build-argument INVOKER_COUNT=<N>` - passes number of parallel running functions to AWS lambda runtime
28
+
29
+
Values for these two parameters should be calculated individually for each function and depends on operation characteristics. Knative [autoscaling](https://github.com/knative/docs/blob/master/docs/serving/samples/autoscale-go/README.md) is another important factor that affects service performance, but right now KLR uses default autoscaling configuration.
30
+
31
+
32
+
### Examples
33
+
34
+
NOTE: all examples below work with [Local Registry](https://github.com/triggermesh/knative-local-registry). If you don't have local registry in knative cluster, you can use external registry as discribed in CLI [documentation](https://github.com/triggermesh/tm#docker-registry)
To have more control over the go project dependecies, KLR runtime will read and "ensure" `Gopkg.toml` file if it's available in the project's root. Without toml file, only `go get` will be executed before build.
178
194
If the project has dependencies stored in a private repository, you can create k8s secret with SSH key that will be used for `git clone` operation:
@@ -182,7 +198,7 @@ cat ~/.ssh/id_rsa | tm set git-auth
182
198
```
183
199
where `~/.ssh/id_rsa` is a path to SSH private key associated with your git account
0 commit comments