Skip to content

CrateDB Operator on OpenShift #722

@FrancescoL96

Description

@FrancescoL96

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:

result = await pod_exec(command_create_user)

which in turn calls this Kubernetes library:
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions