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

Control Plane Reaper not working with different namespaces #1471

Open
zehweh opened this issue Jan 7, 2025 · 0 comments
Open

Control Plane Reaper not working with different namespaces #1471

zehweh opened this issue Jan 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@zehweh
Copy link

zehweh commented Jan 7, 2025

What happened?

After creating a Control Plane Reaper in the operator namespace and setting

spec:
  reaper:
    reaperRef:
      name: reaper
      namespace: k8ssandra-operator

in the K8ssandraCluster (different namespace), I noticed that the reaper doesn't add the cluster to it's config.

Reaper logs show:

INFO   [2025-01-07 15:03:34,355] [dw-29467 - PUT /cluster/testcluster?seedHost=testcluster-seed-service] i.c.r.ClusterResource - PUT addOrUpdateCluster called with: cluster_name = testcluster, seedHost = testcluster-seed-service
INFO   [2025-01-07 15:03:34,671] [dw-29467 - PUT /cluster/testcluster?seedHost=testcluster-seed-service] i.c.m.h.HttpManagementConnectionFactory - Unreachable host: testcluster-seed-service
io.cassandrareaper.ReaperException: Error getting local endpoint

Operator logs show:

2025-01-07T16:00:44.420Z        ERROR   Failed to add cluster to external Reaper        {"controller": "k8ssandracluster",
"controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"testcluster","namespace":"clusternamespace"}, "namespace": "clusternamespace", "name": "testcluster", "reconcileID": "59b12091-8f4d-4137-b8db-4b3a9b4ec9a0", "K8ssandraCluster":
 {"name":"testcluster","namespace":"clusternamespace"}, "CassandraDatacenter": {"name":"dc-testcluster","namespace":"clusternamespace"}, "Reaper": {"name":"testcluster-dc-testcluster-reaper","namespace":"clusternamespace"}, "error": "failed to create cluster testcluster: no cluster testcluster with seed host testcluster-seed-service (HTTP status 400)"}

It can't connect to the service because it is running in a different namespace.

Did you expect to see something different?

I expect the operator to register the cluster with the right service, like: testcluster-seed-service.clusternamespace

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

Deploy the operator and add a reaperRef to a K8ssandraCluster running in a different namespace.

Environment

  • K8ssandra Operator version:

    1.20.3

  • Kubernetes version information:

Client Version: v1.28.3
Server Version: v1.28.3

┆Issue is synchronized with this Jira Story by Unito
┆Issue Number: K8OP-303

@zehweh zehweh added the bug Something isn't working label Jan 7, 2025
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
No open projects
Status: No status
Development

No branches or pull requests

1 participant