Merge pull request #7189 from wenottingham/aaargh

Hardcode --kubeconfig and therefore only support OpenShift 3.11+

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-05-29 23:44:16 +00:00 committed by GitHub
commit 9d42b8f0f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -1,12 +1,4 @@
---
- name: Determine version of oc
shell: oc version | sed -n 's/oc v//p'
register: oc_version
- name: Use correct cli option for kubeconfig
set_fact:
oc_kubeconfig_option: "{{ '--kubeconfig' if oc_version.stdout is version('3.11', '>=') else '--config' }}"
- include_vars: openshift.yml
- name: Set kubernetes_namespace

View File

@ -1,3 +1,3 @@
---
openshift_oc_config_file: "{{ kubernetes_base_path }}/.kube/config"
openshift_oc_bin: "oc {{ oc_kubeconfig_option }}={{ openshift_oc_config_file }}"
openshift_oc_bin: "oc --kubeconfig={{ openshift_oc_config_file }}"