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

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

Closed
BradleySmkWd opened this issue May 15, 2020 · 2 comments
Closed

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

BradleySmkWd opened this issue May 15, 2020 · 2 comments

Comments

@BradleySmkWd
Copy link

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?

@willthames
Copy link
Contributor

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

@fabianvf
Copy link
Member

fabianvf commented May 29, 2020

👍, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants