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

kubless trigger nats publish behavior is inconsistent with kafka publish behavior #924

Open
xydinesh opened this issue Oct 17, 2018 · 4 comments

Comments

@xydinesh
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:

I had some discussion in issue #708 related to this with @andresmgot . I'm creating new issues since this is a different issue.

What happened:

kubeless trigger nats publish --url nats://nats.nats-io.svc.cluster.local:4222 --topic test --message "Hello World"

FATA[0000] nats: no servers available for connection

What you expected to happen:

As with kafka, I can get response back. I'm expecting similar behavior from nats too.

kubeless topic publish --topic test-topic --data "Hello World"  
Hello World

Although kafka service available only as clusterIP.

kubectl get svc -n kubeless
NAME        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
broker      ClusterIP   None            <none>        9092/TCP            2d
kafka       ClusterIP   100.66.186.6    <none>        9092/TCP            2d
zoo         ClusterIP   None            <none>        9092/TCP,3888/TCP   2d
zookeeper   ClusterIP   100.68.51.249   <none>        2181/TCP            2d

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.2", GitCommit:"81753b10df112992bf51bbc2c2f85208aad78335", GitTreeState:"clean", BuildDate:"2018-04-27T09:22:21Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.8", GitCommit:"c138b85178156011dc934c2c9f4837476876fb07", GitTreeState:"clean", BuildDate:"2018-05-21T18:53:18Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
  • Kubeless version (use kubeless version):
Kubeless version: v1.0.0-alpha.8
  • Cloud provider or physical cluster:
Kubernetes cluster deployed on AWS via kops
@andresmgot
Copy link
Contributor

The main reason for that is that we control the installation of Kafka with one of our manifest but in the case of NATS we are just pointing users to the upstream manifest to install NATS. If we do some of the assumptions that we do with Kafka those won't be true in the future if they change the manifest.

Having said that, it's true that the command may be confusing. We are open to PRs to address that.

@gkarthiks
Copy link

@andresmgot since the function developers know where's the nats cluster is, why don't we add the nats cluster internal service URL to the nats-controller-trigger and when execute the kubeless trigger nats publish --topic test --message "Hello World" command, let the trigger-controller takes care of that?

@andresmgot
Copy link
Contributor

@gkarthiks we should not assume that the user has direct access to the controller. The controller may be protected by RBAC rules to guarantee restricted access. That's why the publish command is independent from the controller.

@gkarthiks
Copy link

@andresmgot makes perfect sense.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants