openshift/openshift-restclient-python

is the 'from openshift import watch' supported on OCP4.3?

BradleySmkWd opened this issue · 2 comments

I am trying to use the "k8s_scale" from Ansible Module to scale replicas on Openshift container platfrom 4.3,
And my ansible version is as below,

ansible 2.9.9 config file = /root/k8s/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.6/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.6.8 (default, Sep 26 2019, 11:57:09) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

I can connect to the OCP4.3 and interact with the container, however, i can't scale it up / down.
The problem is seems to be on 'from openshift import watch' in the scale.py in the Ansible Module "k8s_scale".

So i would like to ask , is the 'from openshift import watch' supported on OCP4.3?

It's nothing to do with OCP - it doesn't work for any kubernetes right now.

I've updated the k8s_scale module to remove the dependency on watch at ansible-collections/community.kubernetes#100

👍, this API was removed. To watch resources from the dynamic api client instead use the DynamicClient.watch method, or the watch package from the Kubernetes client library

https://github.com/openshift/openshift-restclient-python/blob/master/openshift/dynamic/client.py#L148