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

Make the detection of OpenShift / Kubernetes more robust #15

Closed
lbroudoux opened this issue Mar 23, 2020 · 1 comment
Closed

Make the detection of OpenShift / Kubernetes more robust #15

lbroudoux opened this issue Mar 23, 2020 · 1 comment
Labels
distrib/openshift kind/enhancement New feature or request stale State due to inactivity

Comments

@lbroudoux
Copy link
Member

lbroudoux commented Mar 23, 2020

We found on some OpenShift clusters that the API Groups Information is not always available making the Operator crash on the following command because of HTTP response 502:

api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}"

A more stable (but maybe more crappy ?) solution could be to look at the available annotations on namespace to try detecting some OpenShift specific ones like this:

- name: Retrieve and set watch namespace
  set_fact:
    watch_namespace: "{{ lookup('env','WATCH_NAMESPACE') }}"

- name: Get watched namespace infos
  set_fact:
    watched_namespace: "{{ lookup('k8s', kind='Namespace', resource_name=watch_namespace) }}"

- name: Determine is this is an OpenShift or Kubernetes namespace
  set_fact:
    is_openshift : "{{ watched_namespace.metadata.annotations['openshift.io/display-name'] is defined }}"
    is_kubernetes : "{{ watched_namespace.metadata.annotations['openshift.io/display-name'] is not defined }}"

Maybe we should consider this as a fallback in case of official API returning an error?

@lbroudoux lbroudoux added this to the 0.3.0 milestone Mar 23, 2020
@lbroudoux lbroudoux removed this from the 0.3.0 milestone Apr 10, 2020
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale State due to inactivity label Sep 21, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distrib/openshift kind/enhancement New feature or request stale State due to inactivity
Projects
None yet
Development

No branches or pull requests

1 participant