Hide Forgot
Description of problem: The new mechanism for oc plugin of git-style does not work Version-Release number of selected component (if applicable): oc v4.0.0-0.149.0 kubernetes v1.12.4+50c2f2340a How reproducible: Always Steps to Reproduce: 1. Install the latest OC and kubectl client; 2. Create the plugin : `echo -e '#!/bin/bash\n echo "Plugin oc-foo_bar is executed"' > ./oc-foo_bar` `chmod +x oc-foo_bar` `mv oc-foo_bar /usr/local/bin/` 3. Use `oc plugin list` command to list the plugin 4. Change the plugin name to 'kubectl-foo_bar' , use the 'oc plugin list' command 5. Use `oc plugin -h` command to check the help info. Actual results: 3. Could not find the oc plugin: [root@dhcp-140-138 ~]# oc plugin list error: unable to find any kubectl plugins in your PATH 4. Show the kubectl-compatible plugins are available, but could not use the plugin 5. The help info was not clear Expected results: 3. Should find the oc plugin; 4. Only the kubectl could use the plugin , the oc client could not use the kubectl-compatible plugin. 5. Should give clear documentation and examples for how to write the plugin. Additional info:
Thanks for catching this. Origin PR: https://github.com/openshift/origin/pull/21909 Will open upstream PR once we decide if we want to carry a patch for any of the upstream changes.
Upstream [1] and Origin [2] PRs have merged. 1. https://github.com/kubernetes/kubernetes/pull/73642 2. https://github.com/openshift/origin/pull/21909
The new mechanism works fine now: [root@dhcp-140-138 ~]# oc plugin list The following compatible plugins are available: /root/bin/oc-foo /usr/bin/oc-fao_bar /usr/local/sbin/oc-foo_bar /usr/local/sbin/oc-foo_bar_baz [root@dhcp-140-138 ~]# oc foo I am a plugin named foo [root@dhcp-140-138 ~]# oc foo-bar Plugin oc-foo-bar is executed [root@dhcp-140-138 ~]# oc version oc v4.0.0-0.170.0 kubernetes v1.12.4+45dbe929fa features: Basic-Auth GSSAPI Kerberos SPNEGO
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758