Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NATS JetStream scaler assume the cluster runs on kubernetes #4101

Closed
mfadhlika opened this issue Jan 13, 2023 · 4 comments · Fixed by #4102
Closed

NATS JetStream scaler assume the cluster runs on kubernetes #4101

mfadhlika opened this issue Jan 13, 2023 · 4 comments · Fixed by #4102
Labels
bug Something isn't working

Comments

@mfadhlika
Copy link
Contributor

Report

Jetstream scaler assume the cluster run on the kubertenes cluster, which makes the scaler failed to find consumer leader monitoring url if that's not the case.

Expected Behavior

The scaler get correct leader monitoring node url even if NATS Jetstream cluster is not on kubernetes

Actual Behavior

The scaler assume first item when node url split by . is the node name and always have <node>.<monitoringURL> as URL which may not be case when NATS Jetstream run on multiple VMs.

Steps to Reproduce the Problem

  1. Create NATS Jetstream cluster using VMs with load balancer
  2. Use Jetstream scaler as documented
  3. Get cluster information
❯ curl -s "http://load-balancer-ip:8222/varz" | jq .cluster
{
  "name": "nats",
  "addr": "172.0.0.2",
  "cluster_port": 4221,
  "auth_timeout": 2,
  "urls": [
    "172.0.0.3:4221", <-- currently 172 considered as node name
    "172.0.0.4:4221"
  ],
  "tls_timeout": 2
}

Logs from KEDA operator

Get "http://172.nats.company.internal:8222/jsz?acc=$G&consumers=true&config=true": dial tcp: lookup 172.nats.company.internal on 10.200.0.10:53: no such host

KEDA Version

2.9.1

Kubernetes Version

1.24

Platform

Google Cloud

Scaler Details

NATS Jetstream

Anything else?

No response

@mfadhlika mfadhlika added the bug Something isn't working label Jan 13, 2023
@JorTurFer
Copy link
Member

Interesting.
Are you willing to contribute with the fix?
Isn't the machine FQDNs enough?

@zroubalik
Copy link
Member

There's open PR for this already.

@mfadhlika
Copy link
Contributor Author

mfadhlika commented Jan 17, 2023

@JorTurFer @zroubalik I opened the PR regarding this #4102

@JorTurFer
Copy link
Member

f**k, sorry, I didn't see it, my fault :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants