Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

docs: fix typo && maximum size of etcd record #937

Merged
merged 1 commit into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/runtime/jvm/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Pass this jar file to kubeless and define the handler method. The package path m
`kubeless function deploy test --runtime jvm1.8 --from-file build/libs/jvm-test-0.1-all.jar --handler io_ino_Handler.sayHello`

Known issues
The jar must not be larger than 1MB, since the file is stored in etcd. This can be solved by passing a URL to the JAR file:
`kubeless function deploy test --runtime jvm1.8 --from-file https://example.com/build/libs/jvm-test-0.1-all.jar --handler io_ino_Handler.sayHello`
The jar must not be larger than 1.5MiB, since the file is stored in etcd. This can be solved by passing a URL to the JAR file:
`kubeless function deploy test --runtime jvm1.8 --from-file https://example.com/build/libs/jvm-test-0.1-all.jar --handler io_ino_Handler.sayHello`
2 changes: 1 addition & 1 deletion docs/advanced-function-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Apart from the basic parameters, it is possible to add the specification of a `D

## Deploying large functions

As any Kubernetes object, function objects have a maximum size of 1MB (due to the maximum size of an etcd entry). Because of that, it's not possible to specify in the `function` field of the YAML content that surpasses that size. To workaround this issue it's possible to specify an URL in the `function` field. This file will be downloaded at build time (extracted if necessary) and the checksum will be checked. Doing this we avoid any limitation regarding the file size. It's also possible to include the function dependencies in this file and skip the dependency installation step. Note that since the file will be downloaded in a pod the URL should be accessible from within the cluster:
As any Kubernetes object, function objects have a maximum size of 1.5MiB (due to the [maximum size](https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/limit.md#request-size-limit) of an etcd entry). Because of that, it's not possible to specify in the `function` field of the YAML content that surpasses that size. To workaround this issue it's possible to specify an URL in the `function` field. This file will be downloaded at build time (extracted if necessary) and the checksum will be checked. Doing this we avoid any limitation regarding the file size. It's also possible to include the function dependencies in this file and skip the dependency installation step. Note that since the file will be downloaded in a pod the URL should be accessible from within the cluster:

```yaml
checksum: sha256:d1f84e9f0a8ce27e7d9ce6f457126a8f92e957e5109312e7996373f658015547
Expand Down
6 changes: 3 additions & 3 deletions docs/implementing-new-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Apart from the requirements above, the runtime should satisfy:
- Errors per HTTP method
- Histogram with the execution time per HTTP method

In any case, it is not necessary that the native runtime fulfill the above. Those features can be obtained adding a Go proxy that already implente those features and redirect the request to the new runtime. For adding it is only necessary to add the proxy binary to the image and run it as the `CMD`. See the [ruby example](https://github.com/kubeless/kubeless/blob/master/docker/runtime/ruby/).
In any case, it is not necessary that the native runtime fulfill the above. Those features can be obtained adding a Go proxy that already implements those features and redirect the request to the new runtime. For adding it is only necessary to add the proxy binary to the image and run it as the `CMD`. See the [ruby example](https://github.com/kubeless/kubeless/blob/master/docker/runtime/ruby/).

## 3. Update the kubeless-config configmap

Expand Down Expand Up @@ -125,7 +125,7 @@ func UpdateDeployment(dpm *v1beta1.Deployment, depsPath, runtime string) {

This function is called if there are requirements to be injected in your runtime or if it is a custom runtime.

## 6. Add examples
## 7. Add examples

In order to demonstrate the usage of the new runtime it will be necessary to add at least three different examples:

Expand All @@ -135,7 +135,7 @@ In order to demonstrate the usage of the new runtime it will be necessary to add

The examples should be added to the folder `examples/<language_id>/` and should be added as well to the Makefile present in `examples/Makefile`. Note that the target should be `get-<language_id>`, `post-<language_id>` and `get-<language_id>-deps` for three examples above.

## 7. Add tests
## 8. Add tests

For each new runtime, there should be integration tests that deploys the three examples above and check that the function is successfully deployed and that the output of the function is the expected one. For doing so add the counterpart `get-<language_id>-verify`, `post-<language_id>-verify` and `get-<language_id>-deps-verify` in the `examples/Makefile` and enable the execution of these tests in the script `test/integration-tests.bats`:

Expand Down
4 changes: 2 additions & 2 deletions docs/streaming-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Kubeless lets you trigger any Kubeless function in response to ingested records

## AWS Kinesis

To trigger Kubeless functions in response to ingested records into the AWS kinesis stream you need to deploy Kubeless AWS Kinesis trigger controlle. Please use this manifest to deploy Kubeless AWS Kinesis trigger controller.
To trigger Kubeless functions in response to ingested records into the AWS kinesis stream you need to deploy Kubeless AWS Kinesis trigger controller. Please use this manifest to deploy Kubeless AWS Kinesis trigger controller.

```console
kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kinesis-$RELEASE.yaml
Expand Down Expand Up @@ -145,4 +145,4 @@ Hit Ctrl-C to quit.
{'event-time': '2018-05-18 05:40:44.891994208 +0000 UTC', 'extensions': {'request': <LocalRequest: POST http://post-python.default.svc.cluster.local:8080/>}, 'event-type': 'application/x-www-form-urlencoded', 'event-namespace': 'kinesistriggers.kubeless.io', 'data': 'testdata22', 'event-id': 'uHdiWN-lzeKYQyQ'}
172.17.0.7 - - [18/May/2018:05:40:44 +0000] "POST / HTTP/1.1" 200 10 "" "Go-http-client/1.1" 0/8983
{'event-time': '2018-05-18 05:40:45.878361324 +0000 UTC', 'extensions': {'request': <LocalRequest: POST http://post-python.default.svc.cluster.local:8080/>}, 'event-type': 'application/x-www-form-urlencoded', 'event-namespace': 'kinesistriggers.kubeless.io', 'data': 'testdata32', 'event-id': 'sRRjSasGVApy8tA'}
```
```