ServiceWeaver / weaver-kube

Run Service Weaver applications on vanilla Kubernetes.
Apache License 2.0
61 stars 19 forks source link

Doesn't work out of box, no health check #94

Closed rverma-dev closed 7 months ago

rverma-dev commented 7 months ago

Tried using kube deployer along with the onlineboutique example which is available here https://github.com/ServiceWeaver/onlineboutique

However there are no logs for any of the pods, all the pods are in running state but there is no traffic served either. The listeners mapping is not clear, it seems the service is expected that listeners should be available at port 20000, but its not clear how that is speficied in weaver.toml.

Tried

  1. Passing kube block https://github.com/rverma-dev/onlineboutique/blob/main/weaver.toml#L15
  2. Modifying generated config.textpb https://github.com/rverma-dev/onlineboutique/blob/main/config.textpb to have port 12345

No luck with either of approach.

Also the generated manifests doesn't do any healthcheck validation. We should definitely have that built in.

rgrandl commented 7 months ago

@rverma-dev did you see the instructions on how to run an app with kube? https://serviceweaver.dev/docs.html#kube

Unfortunately the kube deployer has a slightly different way of deploying apps, because we wanted to let the user configure more k8s knobs and didn't want to pollute weaver.toml. At some point we might unify the two configs, or keep weaver.toml just for app related config, and have a different config for the deployment.

1) So you will need to create a new config, kube_deploy.yaml like: ` appConfig: weaver.toml repo: docker.io/your_docker_hub_id/ listeners:

2) run weaver kube deploy kube_deploy.yaml // it will generate the kubernetes manifest file in /tmp/kube_foo.yaml

3) run `kubectl apply -f /tmp/kube_foo.yaml'

4) To see the logs run kubectl logs -l serviceweaver/app=onlineboutique --all-containers=true

For health checks, you can specify them in the kube_deploy.yaml. More details https://serviceweaver.dev/docs.html#kube-config

Check https://github.com/ServiceWeaver/weaver/blob/main/examples/collatz/kube_deploy.yaml for more details on how to config your app.

Let us know if you have any issues running it.