ansible-collections/community.kubernetes

k8s module should not require 'openshift' python module to work.

Closed this issue · 1 comments

SUMMARY

k8s modules should not require 'openshift' python module.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.kubernetes.k8s

ANSIBLE VERSION

2.9+

OS / ENVIRONMENT

All

STEPS TO REPRODUCE

Creating a namespace or whatever object.

        - name: Create a k8s namespace
          community.kubernetes.k8s:
            name: sample
            api_version: v1
            kind: Namespace
            state: present
EXPECTED RESULTS

A namespace is created

ACTUAL RESULTS

Failure

"msg": "Failed to import the required Python library (openshift) on k8s-test-master-0.k8s.test's Python /usr/bin/python3. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"
tima commented

The openshift python library has always been a requirement of the k8s modules. This content used to handle kubernetes and openshift automation and that library handles both. That said, we began the gradual process of extracting all of the openshift functionality into its own collection and will be refactoring this content for just the official kubernetes library that the openshift library won't be necessary to use community.kubernetes.k8s. So by extension this is essentially a duplication of #187 that we will be addressing through that issue.