-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Hello! I am trying to use the Crate Operator on an OpenShift instance, similarly to #300, I had trouble with explicit permissions on finalizers. This was easiliy solved by updating the rbac. However, this still does not allow the operator to work. When creating a new instance through a custom resource, the operator logs the following message:
[2025-03-11 11:42:49,258] kopf.objects [INFO ] [krateo-system/finops-finops-cratedb-custom-resource] Trying to create system user ...
[2025-03-11 11:42:49,271] kopf.objects [ERROR ] [krateo-system/finops-finops-cratedb-custom-resource] ... failed. Status: 404 Message: Invalid response status
This seems to be caused by this call in the bootstrap:
crate-operator/crate/operator/bootstrap.py
Line 129 in ae24778
| result = await pod_exec(command_create_user) |
which in turn calls this Kubernetes library:
crate-operator/crate/operator/bootstrap.py
Line 113 in ae24778
| return await core_ws.connect_get_namespaced_pod_exec( |
In the readme of https://github.com/RedHatQE/openshift-python-wrapper/, it explicitly states:
The wrapper also provides additional capabilities, such as resource-specific functionality that otherwise needs to be implemented by users.
[...]
One example of simplified usage is interacting with a container.
Running a command inside a container requires using Kubernetes stream, handling errors, and more.
The wrapper handles it all and provides simple and intuitive functionality.
which makes me assume that this is the root cause of this issue: OpenShift uses a different API to manage some objects, requiring different handling.
I assume that a traditional deployment of CrateDB will work just fine on OpenShift (which is going to be what I will do now), however, this completely stops the operator from working in these types of clusters.