Skip to content

[GENERAL QUESTION] Is there a clusterversion equivalent for MicroShift? #731

@piyat

Description

@piyat

I'm using MicroShift to test an Operator (in CI) which usually runs in OpenShift. I want to determine whether I'm running in MicroShift or OpenShift and skip some code if I'm in MicroShift. I don't think MicroShift has the config.openshift.io API.

Is there an equivalent to oc get clusterversion available to me in MicroShift, or any API I can use to tell my operator "you are in MicroShift".

Ideally I want this to be possible in-cluster (i.e. without the microshift cli).

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

Attempt #1:

Run oc get clusterversion in an OpenShift cluster:
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
version 4.9.29 True False 25d Cluster version is 4.9.29

Run oc get clusterversion in MicroShift cluster:
error: the server doesn't have a resource type "clusterversion"

Attempt #2:

Run oc cluster-info

Attempt #3:

Run oc status

Attempt #4:

Run oc get consoles

Environment:

  • Microshift version (use microshift version):
    MicroShift Version: 4.8.0-0.microshift-2022-04-20-141053
    Base OKD Version: 4.8.0-0.okd-2021-10-10-030117

  • Hardware configuration:
    Running in Docker 1.13.1 on RHEL 7.9

  • OS (e.g: cat /etc/os-release):

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)

  • Kernel (e.g. uname -a):
    Linux ip-10-64-58-162.eu-west-1.compute.internal 3.10.0-1160.24.1.el7.x86_64 Init #1 SMP Thu Mar 25 21:21:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions