cass-operator
cass-operator copied to clipboard
Allow management-api in different port
What is missing? Currently management-api is considered to be always in the port 8080 by the cass-operator. We should allow PodHost to define a port as well to simplify testing and potentially allow deployments where the port is different.
┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: CASS-52
And/or we should also allow management api initialization to be captured and mocked so that we could inject httpclient there.
Hi @burmanm I have been using host networking for the multi-cluster k8ssandra deployment. Node local dns process is running on port 8080 on all the worker nodes. So, there was a port conflict with cass-management API. This feature would be of great value. May I know any updates and when this feature would be rolled out?
Part of the work is done in the envtesting PR. This allows the cass-operator to query the modified port, but it does not yet allow changing them from the CRD. That'll require another set of changes to expose the port settings.
What is the problem with CRD? Could you pls elaborate on it? And Good to know that work is going on this...thanks for your update @burmanm
What is the problem with CRD? Could you pls elaborate on it?
There's nothing in the CRD that would allow overriding ports. The ports are currently hardcoded in cass-operator. That said, I could enable changing them through the PodTemplateSpec in the containerPorts, but that would be somewhat hidden feature in that case. Maybe that would be fine.
Actually, there's no need to do any of that, we already supported it in the PodTemplateSpec. See the test in commit https://github.com/k8ssandra/cass-operator/commit/52a430d06a211db4579d6243a96d6d03d2c8fada
That would change the mgmt-api port that cass-operator calls. It does not however modify the port that management-api itself listens to. That's defined in the Dockerfile entrypoitn of mgmt-api:
https://github.com/k8ssandra/management-api-for-apache-cassandra/blob/ce77e239a69697926777866a8db7d7530b9d503a/scripts/docker-entrypoint.sh#L182
Which you will need to override for mgmt-api to listen to in a different port. That's the problem with running in hostnetwork for everything, we can't do do port forwards.
Relevant: https://github.com/k8ssandra/management-api-for-apache-cassandra/pull/418