diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2015-10-27 10:07:20 -0400 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2015-10-27 10:07:20 -0400 |
commit | fcbb48362afb6e9ed196d7833940877bbc0296ae (patch) | |
tree | d0bce8760facae32438342007cb568afcf27e3ad /roles | |
parent | 2f02c464904551e8018e0afc47bcde850ed8d0f1 (diff) | |
parent | 05458ecde01c9c1ade9d1a5216bc7621a92b9d6f (diff) | |
download | openshift-fcbb48362afb6e9ed196d7833940877bbc0296ae.tar.gz openshift-fcbb48362afb6e9ed196d7833940877bbc0296ae.tar.bz2 openshift-fcbb48362afb6e9ed196d7833940877bbc0296ae.tar.xz openshift-fcbb48362afb6e9ed196d7833940877bbc0296ae.zip |
Merge pull request #731 from abutcher/proxy-client-config
Add proxy client certs to master config
Diffstat (limited to 'roles')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 13 | ||||
-rw-r--r-- | roles/openshift_master/templates/master.yaml.v1.j2 | 3 | ||||
-rw-r--r-- | roles/openshift_master_ca/tasks/main.yml | 3 | ||||
-rw-r--r-- | roles/openshift_master_certificates/tasks/main.yml | 5 |
4 files changed, 18 insertions, 6 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 3afbbbbb3..67994d11d 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -21,6 +21,7 @@ import ConfigParser import copy import os from distutils.util import strtobool +from distutils.version import LooseVersion def hostname_valid(hostname): @@ -528,7 +529,15 @@ def set_deployment_facts_if_unset(facts): if deployment_type in ['enterprise', 'online']: data_dir = '/var/lib/openshift' facts['common']['data_dir'] = data_dir - facts['common']['version'] = get_openshift_version() + facts['common']['version'] = version = get_openshift_version() + if version is not None: + if deployment_type == 'origin': + version_gt_3_1_or_1_1 = LooseVersion(version) > LooseVersion('1.0.6') + else: + version_gt_3_1_or_1_1 = LooseVersion(version) > LooseVersion('3.0.2') + else: + version_gt_3_1_or_1_1 = True + facts['common']['version_greater_than_3_1_or_1_1'] = version_gt_3_1_or_1_1 for role in ('master', 'node'): if role in facts: @@ -659,7 +668,7 @@ def get_openshift_version(): Returns: version: the current openshift version """ - version = '' + version = None if os.path.isfile('/usr/bin/openshift'): _, output, _ = module.run_command(['/usr/bin/openshift', 'version']) diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2 index 90234bacc..3e4f78b17 100644 --- a/roles/openshift_master/templates/master.yaml.v1.j2 +++ b/roles/openshift_master/templates/master.yaml.v1.j2 @@ -74,6 +74,9 @@ kubernetesMasterConfig: masterCount: 1 masterIP: "" podEvictionTimeout: "" + proxyClientInfo: + certFile: master.proxy-client.crt + keyFile: master.proxy-client.key schedulerConfigFile: {{ openshift_master_scheduler_conf }} servicesNodePortRange: "" servicesSubnet: {{ openshift.master.portal_net }} diff --git a/roles/openshift_master_ca/tasks/main.yml b/roles/openshift_master_ca/tasks/main.yml index 5c9639ea5..cfd1ceabf 100644 --- a/roles/openshift_master_ca/tasks/main.yml +++ b/roles/openshift_master_ca/tasks/main.yml @@ -18,5 +18,4 @@ --master={{ openshift.master.api_url }} --public-master={{ openshift.master.public_api_url }} --cert-dir={{ openshift_master_config_dir }} --overwrite=false - args: - creates: "{{ openshift_master_config_dir }}/master.server.key" + when: master_certs_missing diff --git a/roles/openshift_master_certificates/tasks/main.yml b/roles/openshift_master_certificates/tasks/main.yml index 0d75a9eb3..e4602337e 100644 --- a/roles/openshift_master_certificates/tasks/main.yml +++ b/roles/openshift_master_certificates/tasks/main.yml @@ -20,6 +20,8 @@ - admin.kubeconfig - master.kubelet-client.crt - master.kubelet-client.key + - "{{ 'master.proxy-client.crt' if openshift.common.version_greater_than_3_1_or_1_1 else omit }}" + - "{{ 'master.proxy-client.key' if openshift.common.version_greater_than_3_1_or_1_1 else omit }}" - openshift-master.crt - openshift-master.key - openshift-master.kubeconfig @@ -41,6 +43,5 @@ --public-master={{ item.openshift.master.public_api_url }} --cert-dir={{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }} --overwrite=false - args: - creates: "{{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }}/master.server.crt" + when: master_certs_missing with_items: masters_needing_certs |