From d6f24fbb9fa780a949decab7f1df4f8525171763 Mon Sep 17 00:00:00 2001 From: uckingleaf <41126408+uckingleaf@users.noreply.github.com> Date: Wed, 3 Apr 2019 23:56:34 +0200 Subject: [PATCH] Create deploy_function_kafka.sh --- functions/deploy_function_kafka.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 functions/deploy_function_kafka.sh diff --git a/functions/deploy_function_kafka.sh b/functions/deploy_function_kafka.sh new file mode 100644 index 0000000..84a50ee --- /dev/null +++ b/functions/deploy_function_kafka.sh @@ -0,0 +1,11 @@ +#!/bin/bash +#$1=runtime +#$2=filename +#$3=function name +#$4=handler + +kubeless function deploy $3 --runtime $1 --from-file $2 --handler $4 +kubeless trigger kafka create $3 --function-selector created-by=kubeless,function=$3 --trigger-topic "$3-topic" + +#Test from within cluster +#kubeless topic publish --topic "$3-topic" --data "Hello World!"