Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f17d592
Create new Actor kind
sleipnir Sep 27, 2024
f21cc87
Add example using new topology section for ActorHost CRD
sleipnir Sep 28, 2024
4724e0d
Added new actor kind
sleipnir Sep 28, 2024
0b8d854
Added topology and node selector
sleipnir Sep 28, 2024
2187c1b
Add new test to validate SPAWN_PROXY_TASK_CONFIG env
sleipnir Sep 28, 2024
d016b4a
Invoke using flame
sleipnir Sep 30, 2024
ac2289a
Some debug message
sleipnir Sep 30, 2024
1012de9
Added comment about scheduler and remote invocations
sleipnir Sep 30, 2024
c6f6056
Refactor to use protocol
sleipnir Sep 30, 2024
ee2b630
rename and adjust invocation handle_call from state instead of invoca…
eliasdarruda Sep 30, 2024
7b9072f
rename one_shoot to single_use
eliasdarruda Sep 30, 2024
b5923a8
one off instead of oneshoot
eliasdarruda Sep 30, 2024
bcaae69
Create sa
sleipnir Sep 30, 2024
d3e6774
Merge branch 'feat/task-actors' of https://github.com/eigr/spawn into…
sleipnir Sep 30, 2024
62b0505
Fix pattern matching
sleipnir Sep 30, 2024
4c41ea2
Update tests
sleipnir Sep 30, 2024
e18ec20
build flame with right params
eliasdarruda Sep 30, 2024
6b1a9c1
Add new envs
sleipnir Sep 30, 2024
347e449
Merge branch 'feat/task-actors' of https://github.com/eigr/spawn into…
sleipnir Sep 30, 2024
228621f
Update provisioner_pool_supervisor.ex
eliasdarruda Oct 1, 2024
c35c275
Refactor and fixes
sleipnir Oct 1, 2024
5ec5b6b
Remove resourceVersion
sleipnir Oct 1, 2024
eb8d74d
use app name sidecar
eliasdarruda Oct 1, 2024
55b6b5d
Adjusts in flame to prevent node down
sleipnir Oct 2, 2024
6e21d3e
Merge branch 'feat/task-actors' of https://github.com/eigr/spawn into…
sleipnir Oct 2, 2024
3aac953
Added option to override init container image
sleipnir Oct 2, 2024
5a27395
Fix typo
sleipnir Oct 3, 2024
0b528c5
Fix runtime false for flame
sleipnir Oct 3, 2024
bf107f4
fix. roles permissions
sleipnir Oct 7, 2024
a1f2e3d
Update Flame terminator in prod.exs
sleipnir Oct 10, 2024
1913a16
Fix typo
sleipnir Oct 10, 2024
367534a
Some adjusts
sleipnir Oct 10, 2024
37711e1
Update flame terminator configuration
sleipnir Oct 10, 2024
70c9295
Fixes flame invocation and handle invocation results
sleipnir Oct 11, 2024
e51b2f0
Handle response on parent node for task actors
sleipnir Oct 11, 2024
576a63b
Add cast invoke
sleipnir Oct 15, 2024
c32a17d
Enabled async invocations using flame
sleipnir Oct 15, 2024
437e4a9
Add task actor in spawn elixir sdk
sleipnir Oct 15, 2024
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
2 changes: 1 addition & 1 deletion Dockerfile-activator-api
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV RELEASE_NAME="activator_api"
# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

RUN echo "-setcookie ${NODE_COOKIE}" >> ./rel/vm.args.eex
RUN echo "-setcookie ${RELEASE_COOKIE}" >> ./rel/vm.args.eex

RUN cd spawn_activators/activator_api \
&& mix deps.get \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-activator-kafka
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV RELEASE_NAME="activator_kafka"
# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

RUN echo "-setcookie ${NODE_COOKIE}" >> ./rel/vm.args.eex
RUN echo "-setcookie ${RELEASE_COOKIE}" >> ./rel/vm.args.eex

RUN cd spawn_activators/activator_kafka \
&& mix deps.get \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-activator-pubsub
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV RELEASE_NAME="activator_pubsub"
# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

RUN echo "-setcookie ${NODE_COOKIE}" >> ./rel/vm.args.eex
RUN echo "-setcookie ${RELEASE_COOKIE}" >> ./rel/vm.args.eex

RUN cd spawn_activators/activator_pubsub \
&& mix deps.get \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-activator-rabbitmq
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV RELEASE_NAME="activator_rabbitmq"
# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

RUN echo "-setcookie ${NODE_COOKIE}" >> ./rel/vm.args.eex
RUN echo "-setcookie ${RELEASE_COOKIE}" >> ./rel/vm.args.eex

RUN cd spawn_activators/activator_rabbitmq \
&& mix deps.get \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-activator-sqs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV RELEASE_NAME="activator_sqs"
# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

RUN echo "-setcookie ${NODE_COOKIE}" >> ./rel/vm.args.eex
RUN echo "-setcookie ${RELEASE_COOKIE}" >> ./rel/vm.args.eex

RUN cd spawn_activators/activator_sqs \
&& mix deps.get \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-elixir-example
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN mix local.rebar --force \
&& mix release.init

RUN echo "-name spawn_sdk_elixir@${HOSTNAME}" >> ./rel/vm.args.eex \
&& echo "-setcookie ${NODE_COOKIE}" >> ./rel/vm.args.eex
&& echo "-setcookie ${RELEASE_COOKIE}" >> ./rel/vm.args.eex

RUN cd spawn_sdk/spawn_sdk_example \
&& mix deps.get \
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile-initializer
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ RUN mix local.rebar --force \
&& mix deps.get \
&& mix release.init

# Overriden at runtime
ENV POD_IP="127.0.0.1"

# This will be the basename of node
ENV RELEASE_NAME="spawn_initializer"

# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

# Disable Erlang Dist
ENV RELEASE_DISTRIBUTION=none

RUN mix deps.get \
&& mix release spawn_initializer
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-operator
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV RELEASE_NAME="spawn_operator"
# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

RUN echo "-setcookie ${NODE_COOKIE}" >> ./rel/vm.args.eex
RUN echo "-setcookie ${RELEASE_COOKIE}" >> ./rel/vm.args.eex

RUN cd spawn_operator/spawn_operator \
&& mix deps.get \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV RELEASE_NAME="proxy"
# This will be the full nodename
ENV RELEASE_NODE="${RELEASE_NAME}@${POD_IP}"

#RUN echo "-setcookie ${NODE_COOKIE}" >> ./priv/rel/vm.args.eex
#RUN echo "-setcookie ${RELEASE_COOKIE}" >> ./priv/rel/vm.args.eex

RUN cd spawn_proxy/proxy \
&& mix deps.get \
Expand Down
24 changes: 8 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version=1.4.3
#version=1.4.3
version=1.4.4-rc.38
registry=eigr

CLUSTER_NAME=spawn-k8s
Expand Down Expand Up @@ -65,37 +66,28 @@ build-all-images:
#docker build --no-cache -f Dockerfile-elixir-example -t ${spawn-sdk-example-image} .

test-spawn:
MIX_ENV=test PROXY_DATABASE_TYPE=mariadb PROXY_DATABASE_PORT=3307 PROXY_DATABASE_POOL_SIZE=15 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-statestores_mysql:
cd spawn_statestores/statestores_mysql && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test
MIX_ENV=test SPAWN_PROXY_LOGGER_LEVEL=info SPAWN_PROXY_TASK_CONFIG="PMRHIYLTNNAWG5DPOJZSEOS3PMRGCY3UN5ZE4YLNMURDUISKN5ZWKIRMEJ2G64DPNRXWO6JCHJ5SE3TPMRSVGZLMMVRXI33SEI5HWITHOB2SEORCMZQWY43FEJ6X27K5PU======" PROXY_DATABASE_TYPE=native PROXY_DATABASE_PORT=3307 PROXY_DATABASE_POOL_SIZE=15 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-statestores_mariadb:
cd spawn_statestores/statestores_mariadb && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_DATABASE_TYPE=mariadb PROXY_DATABASE_PORT=3307 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-statestores_postgres:
cd spawn_statestores/statestores_postgres && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 PROXY_DATABASE_USERNAME=postgres PROXY_DATABASE_SECRET=postgres SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-statestores_mssql:
cd spawn_statestores/statestores_mssql && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-statestores_sqlite:
cd spawn_statestores/statestores_sqlite && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-statestores_native:
cd spawn_statestores/statestores_native && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-spawn-sdk:
cd spawn_sdk/spawn_sdk && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_DATABASE_TYPE=mariadb PROXY_DATABASE_PORT=3307 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= PROXY_ACTOR_SYSTEM_NAME=spawn-system elixir --name [email protected] -S mix test
cd spawn_sdk/spawn_sdk && MIX_ENV=test mix deps.get && MIX_ENV=test SPAWN_PROXY_USE_DEFAULT_FLAME_POOL=true PROXY_DATABASE_TYPE=native PROXY_DATABASE_PORT=3307 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= PROXY_ACTOR_SYSTEM_NAME=spawn-system elixir --name [email protected] -S mix test

test-invoke-backpressure:
cd spawn_sdk/spawn_sdk && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_DATABASE_TYPE=mariadb PROXY_DATABASE_POOL_SIZE=50 PROXY_DATABASE_PORT=3307 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= PROXY_ACTOR_SYSTEM_NAME=spawn-system elixir --name [email protected] -S mix test ./test/actor/actor_test.exs --only parallel:true
cd spawn_sdk/spawn_sdk && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_DATABASE_TYPE=native PROXY_DATABASE_POOL_SIZE=50 PROXY_DATABASE_PORT=3307 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= PROXY_ACTOR_SYSTEM_NAME=spawn-system elixir --name [email protected] -S mix test ./test/actor/actor_test.exs --only parallel:true

test-operator:
cd spawn_operator/spawn_operator && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_DATABASE_TYPE=mysql PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test
cd spawn_operator/spawn_operator && MIX_ENV=test mix deps.get && MIX_ENV=test PROXY_DATABASE_TYPE=native PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

test-proxy:
cd spawn_proxy/proxy && MIX_ENV=test mix deps.get && MIX_ENV=test SPAWN_PROXY_LOGGER_LEVEL=debug PROXY_DATABASE_TYPE=mariadb PROXY_DATABASE_PORT=3307 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test
cd spawn_proxy/proxy && MIX_ENV=test mix deps.get && MIX_ENV=test SPAWN_PROXY_LOGGER_LEVEL=debug PROXY_DATABASE_TYPE=native PROXY_DATABASE_PORT=3307 PROXY_CLUSTER_STRATEGY=gossip PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test

run-benchmark:
cd spawn_sdk/spawn_sdk_example && mix deps.get && SPAWN_PROXY_LOGGER_LEVEL=info PROXY_CLUSTER_STRATEGY=gossip PROXY_DATABASE_TYPE=mariadb PROXY_DATABASE_PORT=3307 PROXY_DATABASE_POOL_SIZE=50 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= iex --name [email protected] -S mix run benchmark.exs
Expand Down Expand Up @@ -161,7 +153,7 @@ run-proxy-local2:
ERL_ZFLAGS='-proto_dist inet_tls -ssl_dist_optfile rel/overlays/local-mtls.ssl.conf' cd spawn_proxy/proxy && mix deps.get && PROXY_DATABASE_TYPE=$(database) PROXY_HTTP_PORT=9003 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= iex --name [email protected] -S mix

run-proxy-local-3:
cd spawn_proxy/proxy && mix deps.get && OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4317 OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc OTEL_EXPORTER_OTLP_TRACES_COMPRESSION=gzip SPAWN_PROXY_LOGGER_LEVEL=info PROXY_CLUSTER_STRATEGY=epmd SPAWN_USE_INTERNAL_NATS=false SPAWN_PUBSUB_ADAPTER=native PROXY_DATABASE_PORT=3307 PROXY_DATABASE_TYPE=native PROXY_DATABASE_POOL_SIZE=30 PROXY_HTTP_PORT=9001 USER_FUNCTION_PORT=8090 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= iex --name [email protected] -S mix
cd spawn_proxy/proxy && mix deps.get && OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4317 OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc OTEL_EXPORTER_OTLP_TRACES_COMPRESSION=gzip PROXY_CLUSTER_STRATEGY=epmd SPAWN_USE_INTERNAL_NATS=false SPAWN_PUBSUB_ADAPTER=native PROXY_DATABASE_PORT=3307 PROXY_DATABASE_TYPE=native PROXY_DATABASE_POOL_SIZE=30 PROXY_HTTP_PORT=9001 USER_FUNCTION_PORT=8090 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= iex --name [email protected] -S mix

run-proxy-local-nodejs-test:
ERL_ZFLAGS='-proto_dist inet_tls -ssl_dist_optfile rel/overlays/local-mtls.ssl.conf' cd spawn_proxy/proxy && mix deps.get && PROXY_DATABASE_TYPE=$(database) PROXY_HTTP_PORT=9001 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= PROXY_ACTOR_SYSTEM_NAME=SpawnSysTest SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=crdt iex --name [email protected] -S mix
Expand Down
4 changes: 2 additions & 2 deletions compile-pb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o nounset
set -o errexit
set -o pipefail

protoc --elixir_out=gen_descriptors=true,plugins=grpc:./lib/spawn/grpc --proto_path=priv/protos/grpc/ priv/protos/grpc/reflection/v1alpha/reflection.proto
#protoc --elixir_out=gen_descriptors=true,plugins=grpc:./lib/spawn/grpc --proto_path=priv/protos/grpc/ priv/protos/grpc/reflection/v1alpha/reflection.proto

# protoc --elixir_out=gen_descriptors=true:./lib/spawn/google/protobuf --proto_path=priv/protos/google/protobuf priv/protos/google/protobuf/any.proto
# protoc --elixir_out=gen_descriptors=true:./lib/spawn/google/protobuf --proto_path=priv/protos/google/protobuf priv/protos/google/protobuf/empty.proto
Expand Down Expand Up @@ -48,7 +48,7 @@ for file in $PROTOS; do
--include-path=$BASE_PATH/priv/protos/ \
--include-path=./priv/protos/google/protobuf \
--include-path=./priv/protos/google/api \
--plugins=ProtobufGenerate.Plugins.GRPCWithOptions \
--plugin=ProtobufGenerate.Plugins.GRPCWithOptions \
--one-file-per-module \
$BASE_PATH/$file
done
5 changes: 5 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ config :do_it, DoIt.Commfig,
dirname: System.tmp_dir(),
filename: "spawn_cli.json"

config :flame, :terminator,
shutdown_timeout: :timer.minutes(3),
failsafe_timeout: :timer.minutes(1),
log: :debug

# config :spawn_statestores, Statestores.Vault,
# json_library: Jason,
# ciphers: [
Expand Down
22 changes: 22 additions & 0 deletions examples/helloworld-ts/host.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: spawn-eigr.io/v1
kind: ActorHost
metadata:
name: flame
namespace: default
annotations:
spawn-eigr.io/actor-system: spawn-system
spawn-eigr.io/sidecar-logger-level: debug
spawn-eigr.io/sidecar-image-tag: "docker.io/eigr/spawn-proxy:1.4.4-rc.38"
spawn-eigr.io/sidecar-init-container-image-tag: "docker.io/eigr/spawn-initializer:1.4.4-rc.38"
spec:
replicas: 2
host:
image: eigr/helloworld:2
taskActors:
- actorName: TaskActor
workerPool:
min: 0
ports:
- name: http
containerPort: 8091
10 changes: 10 additions & 0 deletions examples/helloworld-ts/system.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: spawn-eigr.io/v1
kind: ActorSystem
metadata:
name: spawn-system
namespace: default
spec:
statestore:
type: Native
credentialsSecretRef: mariadb-connection-secret
2 changes: 1 addition & 1 deletion examples/security/acl/host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spawn-eigr.io/sidecar-http-port: "9001"
spawn-eigr.io/sidecar-pubsub-adapter: "nats"
spawn-eigr.io/sidecar-pubsub-nats-hosts: "nats://spawn-nats:4222"
spawn-eigr.io/sidecar-image-tag: "docker.io/eigr/spawn-proxy:1.4.3"
spawn-eigr.io/sidecar-image-tag: "ghcr.io/eigr/spawn-proxy:1.4.3"
spec:
autoscaler:
max: 3
Expand Down
2 changes: 1 addition & 1 deletion examples/security/authentication/basic/host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ metadata:
spawn-eigr.io/sidecar-http-port: "9001"
spawn-eigr.io/sidecar-pubsub-adapter: "nats"
spawn-eigr.io/sidecar-pubsub-nats-hosts: "nats://spawn-nats:4222"
spawn-eigr.io/sidecar-image-tag: "docker.io/eigr/spawn-proxy:1.4.3"
spawn-eigr.io/sidecar-image-tag: "ghcr.io/eigr/spawn-proxy:1.4.3"
spec:
autoscaler:
max: 3
Expand Down
2 changes: 1 addition & 1 deletion examples/security/authentication/jwt/host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
spawn-eigr.io/sidecar-http-port: "9001"
spawn-eigr.io/sidecar-pubsub-adapter: "nats"
spawn-eigr.io/sidecar-pubsub-nats-hosts: "nats://spawn-nats:4222"
spawn-eigr.io/sidecar-image-tag: "docker.io/eigr/spawn-proxy:1.4.3"
spawn-eigr.io/sidecar-image-tag: "ghcr.io/eigr/spawn-proxy:1.4.3"
spec:
autoscaler:
max: 3
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/host-simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
# Optional. Here I`m using Nats Broker without authentication
spawn-eigr.io/sidecar-pubsub-adapter: "nats"
spawn-eigr.io/sidecar-pubsub-nats-hosts: "nats://spawn-nats:4222"
spawn-eigr.io/sidecar-image-tag: "docker.io/eigr/spawn-proxy:1.4.3"
spawn-eigr.io/sidecar-image-tag: "ghcr.io/eigr/spawn-proxy:1.4.3"
spec:
host:
image: eigr/spawn-springboot-examples:0.5.3 # Mandatory
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metadata:
spawn-eigr.io/sidecar-mode: "sidecar"

# Optional
spawn-eigr.io/sidecar-image-tag: "docker.io/eigr/spawn-proxy:1.4.3"
spawn-eigr.io/sidecar-image-tag: "ghcr.io/eigr/spawn-proxy:1.4.3"

# Optional. Default 9001
spawn-eigr.io/sidecar-http-port: "9001"
Expand Down
66 changes: 66 additions & 0 deletions examples/topology/host.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
apiVersion: spawn-eigr.io/v1
kind: ActorHost
metadata:
name: topology-example # Mandatory. Name of the Node containing Actor Host Functions
namespace: default # Optional. Default namespace is "default"
annotations:
# Mandatory. Name of the ActorSystem declared in ActorSystem CRD
spawn-eigr.io/actor-system: spawn-system
spec:
topology:
# affinity:
# podAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 50
# podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: actor-system
# operator: In
# values:
# - system
# topologyKey: kubernetes.io/hostname

# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - app_name
# topologyKey: kubernetes.io/hostname
nodeSelector:
gpu: "false"
tolerations:
- key: "cpu-machines"
operator: "Exists"
effect: "NoExecute"
host:
image: eigr/spawn-springboot-examples:0.5.5 # Mandatory
# this configure podTemplate for Task Actors
taskActors:
- actorName: Jose
workerPool:
min: 0
max: 10
maxConcurrency: 100
bootTimeout: 30000
callTimeout: 30000
oneOff: "false"
idleShutdownAfter: 30000
topology:
nodeSelector:
gpu: "true"
tolerations:
- key: "gpu-machines"
operator: "Exists"
effect: "NoExecute"
resources:
- actorName: Franchesco
topology:
nodeSelector:
beam: "true"
15 changes: 15 additions & 0 deletions examples/topology/system.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
apiVersion: spawn-eigr.io/v1
kind: ActorSystem
metadata:
name: spawn-system # Mandatory. Name of the state store
namespace: default # Optional. Default namespace is "default"
spec:
externalInvocation:
enabled: "true"
externalConnectorRef: invocation-connection-ref-secret
statestore:
type: MySql
credentialsSecretRef: mysql-connection-secret # The secret containing connection params
pool: # Optional
size: "10"
2 changes: 1 addition & 1 deletion lib/actors/actor/caller_consumer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ defmodule Actors.Actor.CallerConsumer do
# Instead of using Map.get/3, which performs a lookup twice, we use pattern matching
timeout =
case metadata["request-timeout"] do
nil -> 10_000
nil -> 60_000
value -> value
end

Expand Down
Loading