summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-11-15 14:06:31 -0500
committerGitHub <noreply@github.com>2017-11-15 14:06:31 -0500
commitbedbf78b8d2a71bd11301b555aa7a3c34c7bac5c (patch)
treebe25d717c47f8e5b2ef495f15d9cedc32c8b15d2
parent719e608f81fbf539da0dca16234ef271b9cbe3d3 (diff)
parent346ce4fc595ed618e589666a87b441b40e392e73 (diff)
downloadopenshift-bedbf78b8d2a71bd11301b555aa7a3c34c7bac5c.tar.gz
openshift-bedbf78b8d2a71bd11301b555aa7a3c34c7bac5c.tar.bz2
openshift-bedbf78b8d2a71bd11301b555aa7a3c34c7bac5c.tar.xz
openshift-bedbf78b8d2a71bd11301b555aa7a3c34c7bac5c.zip
Merge pull request #5968 from mgugino-upstream-stage/version-scrub
Removed old version code
-rw-r--r--filter_plugins/openshift_version.py58
-rw-r--r--playbooks/common/openshift-cluster/cockpit-ui.yml4
-rw-r--r--playbooks/common/openshift-cluster/enable_dnsmasq.yml3
-rw-r--r--playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml7
-rw-r--r--playbooks/common/openshift-cluster/redeploy-certificates/registry.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/post_control_plane.yml1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml1
-rw-r--r--playbooks/common/openshift-master/scaleup.yml4
-rw-r--r--playbooks/common/openshift-master/tasks/wire_aggregator.yml4
-rw-r--r--roles/openshift_ca/tasks/main.yml4
-rw-r--r--roles/openshift_cloud_provider/tasks/openstack.yml4
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py50
-rw-r--r--roles/openshift_hosted/tasks/secure.yml2
-rw-r--r--roles/openshift_hosted_metrics/handlers/main.yml4
-rw-r--r--roles/openshift_logging/handlers/main.yml4
-rw-r--r--roles/openshift_manage_node/tasks/main.yml4
-rw-r--r--roles/openshift_master/handlers/main.yml4
-rw-r--r--roles/openshift_master/tasks/main.yml8
-rw-r--r--roles/openshift_master/templates/master.yaml.v1.j240
-rw-r--r--roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.service.j24
-rw-r--r--roles/openshift_master_certificates/tasks/main.yml6
-rw-r--r--roles/openshift_master_cluster/tasks/main.yml4
-rw-r--r--roles/openshift_master_facts/filter_plugins/openshift_master.py23
-rw-r--r--roles/openshift_metrics/handlers/main.yml4
-rw-r--r--roles/openshift_node/templates/node.yaml.v1.j22
-rw-r--r--roles/openshift_node_certificates/tasks/main.yml4
-rw-r--r--roles/openshift_node_upgrade/tasks/main.yml2
-rw-r--r--test/openshift_version_tests.py44
28 files changed, 16 insertions, 285 deletions
diff --git a/filter_plugins/openshift_version.py b/filter_plugins/openshift_version.py
index c515f1a71..7a70b158b 100644
--- a/filter_plugins/openshift_version.py
+++ b/filter_plugins/openshift_version.py
@@ -10,40 +10,6 @@ Custom version comparison filters for use in openshift-ansible
from distutils.version import LooseVersion
-def legacy_gte_function_builder(name, versions):
- """
- Build and return a version comparison function.
-
- Ex: name = 'oo_version_gte_3_1_or_1_1'
- versions = {'enterprise': '3.1', 'origin': '1.1'}
-
- returns oo_version_gte_3_1_or_1_1, a function which based on the
- version and deployment type will return true if the provided
- version is greater than or equal to the function's version
- """
- enterprise_version = versions['enterprise']
- origin_version = versions['origin']
-
- def _gte_function(version, deployment_type):
- """
- Dynamic function created by gte_function_builder.
-
- Ex: version = '3.1'
- deployment_type = 'openshift-enterprise'
- returns True/False
- """
- version_gte = False
- if deployment_type == 'openshift-enterprise':
- if str(version) >= LooseVersion(enterprise_version):
- version_gte = True
- else:
- if str(version) >= LooseVersion(origin_version):
- version_gte = True
- return version_gte
- _gte_function.__name__ = name
- return _gte_function
-
-
def gte_function_builder(name, gte_version):
"""
Build and return a version comparison function.
@@ -96,30 +62,6 @@ class FilterModule(object):
# Add the function to the mapping
self._filters[func_name] = func
- # Create filters with special versioning requirements.
- # Treat all Origin 1.x as special case.
- legacy_filters = [{'name': 'oo_version_gte_3_1_or_1_1',
- 'versions': {'enterprise': '3.0.2.905',
- 'origin': '1.1.0'}},
- {'name': 'oo_version_gte_3_1_1_or_1_1_1',
- 'versions': {'enterprise': '3.1.1',
- 'origin': '1.1.1'}},
- {'name': 'oo_version_gte_3_2_or_1_2',
- 'versions': {'enterprise': '3.1.1.901',
- 'origin': '1.2.0'}},
- {'name': 'oo_version_gte_3_3_or_1_3',
- 'versions': {'enterprise': '3.3.0',
- 'origin': '1.3.0'}},
- {'name': 'oo_version_gte_3_4_or_1_4',
- 'versions': {'enterprise': '3.4.0',
- 'origin': '1.4.0'}},
- {'name': 'oo_version_gte_3_5_or_1_5',
- 'versions': {'enterprise': '3.5.0',
- 'origin': '1.5.0'}}]
- for legacy_filter in legacy_filters:
- self._filters[legacy_filter['name']] = legacy_gte_function_builder(legacy_filter['name'],
- legacy_filter['versions'])
-
def filters(self):
"""
Return the filters mapping.
diff --git a/playbooks/common/openshift-cluster/cockpit-ui.yml b/playbooks/common/openshift-cluster/cockpit-ui.yml
index 5ddafdb07..359132dd0 100644
--- a/playbooks/common/openshift-cluster/cockpit-ui.yml
+++ b/playbooks/common/openshift-cluster/cockpit-ui.yml
@@ -3,4 +3,6 @@
hosts: oo_first_master
roles:
- role: cockpit-ui
- when: ( openshift.common.version_gte_3_3_or_1_3 | bool ) and ( openshift_hosted_manage_registry | default(true) | bool ) and not (openshift.docker.hosted_registry_insecure | default(false) | bool)
+ when:
+ - openshift_hosted_manage_registry | default(true) | bool
+ - not openshift.docker.hosted_registry_insecure | default(false) | bool
diff --git a/playbooks/common/openshift-cluster/enable_dnsmasq.yml b/playbooks/common/openshift-cluster/enable_dnsmasq.yml
index be14b06f0..fe765aa5d 100644
--- a/playbooks/common/openshift-cluster/enable_dnsmasq.yml
+++ b/playbooks/common/openshift-cluster/enable_dnsmasq.yml
@@ -5,9 +5,6 @@
hosts: oo_masters_to_config:oo_nodes_to_config
roles:
- openshift_facts
- post_tasks:
- - fail: msg="This playbook requires a master version of at least Origin 1.1 or OSE 3.1"
- when: not openshift.common.version_gte_3_1_1_or_1_1_1 | bool
- name: Reconfigure masters to listen on our new dns_port
hosts: oo_masters_to_config
diff --git a/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml b/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
index e22c8cbdb..eb225dfb5 100644
--- a/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
+++ b/playbooks/common/openshift-cluster/redeploy-certificates/openshift-ca.yml
@@ -1,11 +1,4 @@
---
-- name: Verify OpenShift version is greater than or equal to 1.2 or 3.2
- hosts: oo_first_master
- tasks:
- - fail:
- msg: "The current OpenShift version is less than 1.2/3.2 and does not support CA bundles."
- when: not openshift.common.version_gte_3_2_or_1_2 | bool
-
- name: Check cert expirys
hosts: oo_nodes_to_config:oo_masters_to_config:oo_etcd_to_config
vars:
diff --git a/playbooks/common/openshift-cluster/redeploy-certificates/registry.yml b/playbooks/common/openshift-cluster/redeploy-certificates/registry.yml
index afd5463b2..7e9363c5f 100644
--- a/playbooks/common/openshift-cluster/redeploy-certificates/registry.yml
+++ b/playbooks/common/openshift-cluster/redeploy-certificates/registry.yml
@@ -70,9 +70,7 @@
--hostnames="{{ docker_registry_service_ip.results.clusterip }},docker-registry.default.svc,docker-registry.default.svc.cluster.local,{{ docker_registry_route_hostname }}"
--cert={{ openshift.common.config_base }}/master/registry.crt
--key={{ openshift.common.config_base }}/master/registry.key
- {% if openshift_version | oo_version_gte_3_5_or_1_5(openshift.common.deployment_type) | bool %}
--expire-days={{ openshift_hosted_registry_cert_expire_days | default(730) }}
- {% endif %}
- name: Update registry certificates secret
oc_secret:
diff --git a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
index 122066955..9f93777b4 100644
--- a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
@@ -117,7 +117,6 @@
- name: grep pluginOrderOverride
command: grep pluginOrderOverride {{ openshift.common.config_base }}/master/master-config.yaml
register: grep_plugin_order_override
- when: openshift.common.version_gte_3_3_or_1_3 | bool
changed_when: false
failed_when: false
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
index 8783ade99..ed97d9993 100644
--- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
@@ -236,7 +236,6 @@
- reconcile_jenkins_role_binding_result.rc == 0
when:
- openshift_version | version_compare('3.7','<')
- - openshift_version | version_compare('3.4','>=')
- when: openshift_upgrade_target | version_compare('3.7','<')
block:
diff --git a/playbooks/common/openshift-master/scaleup.yml b/playbooks/common/openshift-master/scaleup.yml
index 05b37d59f..4c415ebce 100644
--- a/playbooks/common/openshift-master/scaleup.yml
+++ b/playbooks/common/openshift-master/scaleup.yml
@@ -32,11 +32,7 @@
- name: verify api server
command: >
curl --silent --tlsv1.2
- {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
--cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
- {% else %}
- --cacert {{ openshift.common.config_base }}/master/ca.crt
- {% endif %}
{{ openshift.master.api_url }}/healthz/ready
args:
# Disables the following warning:
diff --git a/playbooks/common/openshift-master/tasks/wire_aggregator.yml b/playbooks/common/openshift-master/tasks/wire_aggregator.yml
index 0d23e9d61..97acc5d5d 100644
--- a/playbooks/common/openshift-master/tasks/wire_aggregator.yml
+++ b/playbooks/common/openshift-master/tasks/wire_aggregator.yml
@@ -201,11 +201,7 @@
# wait_for port doesn't provide health information.
command: >
curl --silent --tlsv1.2
- {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
--cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
- {% else %}
- --cacert {{ openshift.common.config_base }}/master/ca.crt
- {% endif %}
{{ openshift.master.api_url }}/healthz/ready
args:
# Disables the following warning:
diff --git a/roles/openshift_ca/tasks/main.yml b/roles/openshift_ca/tasks/main.yml
index 587526d07..31f0f8e7a 100644
--- a/roles/openshift_ca/tasks/main.yml
+++ b/roles/openshift_ca/tasks/main.yml
@@ -97,10 +97,8 @@
--master={{ openshift.master.api_url }}
--public-master={{ openshift.master.public_api_url }}
--cert-dir={{ openshift_ca_config_dir }}
- {% if openshift_version | oo_version_gte_3_5_or_1_5(openshift.common.deployment_type) | bool %}
--expire-days={{ openshift_master_cert_expire_days }}
--signer-expire-days={{ openshift_ca_cert_expire_days }}
- {% endif %}
--overwrite=false
when: master_ca_missing | bool or openshift_certificates_redeploy | default(false) | bool
delegate_to: "{{ openshift_ca_host }}"
@@ -169,9 +167,7 @@
--signer-serial={{ openshift_ca_serial }}
--user=system:openshift-master
--basename=openshift-master
- {% if openshift_version | oo_version_gte_3_5_or_1_5(openshift.common.deployment_type) | bool %}
--expire-days={{ openshift_master_cert_expire_days }}
- {% endif %}
- name: Copy generated loopback master client config to master config dir
copy:
src: "{{ openshift_ca_loopback_tmpdir.stdout }}/{{ item }}"
diff --git a/roles/openshift_cloud_provider/tasks/openstack.yml b/roles/openshift_cloud_provider/tasks/openstack.yml
index 5788e6d74..324630491 100644
--- a/roles/openshift_cloud_provider/tasks/openstack.yml
+++ b/roles/openshift_cloud_provider/tasks/openstack.yml
@@ -1,8 +1,4 @@
---
-- fail:
- msg: "The Openstack integration requires OpenShift Enterprise 3.2 or Origin 1.2."
- when: not openshift.common.version_gte_3_2_or_1_2 | bool
-
- name: Create cloud config
template:
dest: "{{ openshift.common.config_base }}/cloudprovider/openstack.conf"
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 699dc300f..a61926eb3 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -806,7 +806,7 @@ def set_deployment_facts_if_unset(facts):
# pylint: disable=too-many-statements
def set_version_facts_if_unset(facts):
""" Set version facts. This currently includes common.version and
- common.version_gte_3_1_or_1_1.
+ common.version_gte_3_x
Args:
facts (dict): existing facts
@@ -814,49 +814,19 @@ def set_version_facts_if_unset(facts):
dict: the facts dict updated with version facts.
"""
if 'common' in facts:
- deployment_type = facts['common']['deployment_type']
openshift_version = get_openshift_version(facts)
if openshift_version and openshift_version != "latest":
version = LooseVersion(openshift_version)
facts['common']['version'] = openshift_version
facts['common']['short_version'] = '.'.join([str(x) for x in version.version[0:2]])
- if deployment_type == 'origin':
- version_gte_3_1_or_1_1 = version >= LooseVersion('1.1.0')
- version_gte_3_1_1_or_1_1_1 = version >= LooseVersion('1.1.1')
- version_gte_3_2_or_1_2 = version >= LooseVersion('1.2.0')
- version_gte_3_3_or_1_3 = version >= LooseVersion('1.3.0')
- version_gte_3_4_or_1_4 = version >= LooseVersion('1.4')
- version_gte_3_5_or_1_5 = version >= LooseVersion('1.5')
- version_gte_3_6 = version >= LooseVersion('3.6')
- version_gte_3_7 = version >= LooseVersion('3.7')
- version_gte_3_8 = version >= LooseVersion('3.8')
- else:
- version_gte_3_1_or_1_1 = version >= LooseVersion('3.0.2.905')
- version_gte_3_1_1_or_1_1_1 = version >= LooseVersion('3.1.1')
- version_gte_3_2_or_1_2 = version >= LooseVersion('3.1.1.901')
- version_gte_3_3_or_1_3 = version >= LooseVersion('3.3.0')
- version_gte_3_4_or_1_4 = version >= LooseVersion('3.4')
- version_gte_3_5_or_1_5 = version >= LooseVersion('3.5')
- version_gte_3_6 = version >= LooseVersion('3.6')
- version_gte_3_7 = version >= LooseVersion('3.7')
- version_gte_3_8 = version >= LooseVersion('3.8')
+ version_gte_3_6 = version >= LooseVersion('3.6')
+ version_gte_3_7 = version >= LooseVersion('3.7')
+ version_gte_3_8 = version >= LooseVersion('3.8')
else:
# 'Latest' version is set to True, 'Next' versions set to False
- version_gte_3_1_or_1_1 = True
- version_gte_3_1_1_or_1_1_1 = True
- version_gte_3_2_or_1_2 = True
- version_gte_3_3_or_1_3 = True
- version_gte_3_4_or_1_4 = True
- version_gte_3_5_or_1_5 = True
version_gte_3_6 = True
version_gte_3_7 = True
version_gte_3_8 = False
- facts['common']['version_gte_3_1_or_1_1'] = version_gte_3_1_or_1_1
- facts['common']['version_gte_3_1_1_or_1_1_1'] = version_gte_3_1_1_or_1_1_1
- facts['common']['version_gte_3_2_or_1_2'] = version_gte_3_2_or_1_2
- facts['common']['version_gte_3_3_or_1_3'] = version_gte_3_3_or_1_3
- facts['common']['version_gte_3_4_or_1_4'] = version_gte_3_4_or_1_4
- facts['common']['version_gte_3_5_or_1_5'] = version_gte_3_5_or_1_5
facts['common']['version_gte_3_6'] = version_gte_3_6
facts['common']['version_gte_3_7'] = version_gte_3_7
facts['common']['version_gte_3_8'] = version_gte_3_8
@@ -867,18 +837,8 @@ def set_version_facts_if_unset(facts):
examples_content_version = 'v3.7'
elif version_gte_3_6:
examples_content_version = 'v3.6'
- elif version_gte_3_5_or_1_5:
- examples_content_version = 'v1.5'
- elif version_gte_3_4_or_1_4:
- examples_content_version = 'v1.4'
- elif version_gte_3_3_or_1_3:
- examples_content_version = 'v1.3'
- elif version_gte_3_2_or_1_2:
- examples_content_version = 'v1.2'
- elif version_gte_3_1_or_1_1:
- examples_content_version = 'v1.1'
else:
- examples_content_version = 'v1.0'
+ examples_content_version = 'v1.5'
facts['common']['examples_content_version'] = examples_content_version
diff --git a/roles/openshift_hosted/tasks/secure.yml b/roles/openshift_hosted/tasks/secure.yml
index 0da8ac8a7..174bc39a4 100644
--- a/roles/openshift_hosted/tasks/secure.yml
+++ b/roles/openshift_hosted/tasks/secure.yml
@@ -42,7 +42,7 @@
- "{{ openshift_hosted_registry_routehost }}"
cert: "{{ docker_registry_cert_path }}"
key: "{{ docker_registry_key_path }}"
- expire_days: "{{ openshift_hosted_registry_cert_expire_days if openshift_version | oo_version_gte_3_5_or_1_5(openshift_deployment_type) | bool else omit }}"
+ expire_days: "{{ openshift_hosted_registry_cert_expire_days }}"
register: registry_self_cert
when: docker_registry_self_signed
diff --git a/roles/openshift_hosted_metrics/handlers/main.yml b/roles/openshift_hosted_metrics/handlers/main.yml
index 88b893448..074b72942 100644
--- a/roles/openshift_hosted_metrics/handlers/main.yml
+++ b/roles/openshift_hosted_metrics/handlers/main.yml
@@ -18,11 +18,7 @@
# wait_for port doesn't provide health information.
command: >
curl --silent --tlsv1.2
- {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
--cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
- {% else %}
- --cacert {{ openshift.common.config_base }}/master/ca.crt
- {% endif %}
{{ openshift.master.api_url }}/healthz/ready
args:
# Disables the following warning:
diff --git a/roles/openshift_logging/handlers/main.yml b/roles/openshift_logging/handlers/main.yml
index 88b893448..074b72942 100644
--- a/roles/openshift_logging/handlers/main.yml
+++ b/roles/openshift_logging/handlers/main.yml
@@ -18,11 +18,7 @@
# wait_for port doesn't provide health information.
command: >
curl --silent --tlsv1.2
- {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
--cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
- {% else %}
- --cacert {{ openshift.common.config_base }}/master/ca.crt
- {% endif %}
{{ openshift.master.api_url }}/healthz/ready
args:
# Disables the following warning:
diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml
index f67aee88b..fbbac1176 100644
--- a/roles/openshift_manage_node/tasks/main.yml
+++ b/roles/openshift_manage_node/tasks/main.yml
@@ -7,11 +7,7 @@
# wait_for port doesn't provide health information.
command: >
curl --silent --tlsv1.2
- {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
--cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
- {% else %}
- --cacert {{ openshift.common.config_base }}/master/ca.crt
- {% endif %}
{{ openshift_node_master_api_url }}/healthz/ready
args:
# Disables the following warning:
diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml
index f88c4a7dc..359536202 100644
--- a/roles/openshift_master/handlers/main.yml
+++ b/roles/openshift_master/handlers/main.yml
@@ -25,11 +25,7 @@
# wait_for port doesn't provide health information.
command: >
curl --silent --tlsv1.2
- {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
--cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
- {% else %}
- --cacert {{ openshift.common.config_base }}/master/ca.crt
- {% endif %}
{{ openshift.master.api_url }}/healthz/ready
args:
# Disables the following warning:
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index c7c02d49b..b6d3539b1 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -18,12 +18,6 @@
- openshift.master.ha | bool
- (openshift.master.cluster_method is not defined) or (openshift.master.cluster_method is defined and openshift.master.cluster_method not in ["native", "pacemaker"])
- fail:
- msg: "'native' high availability is not supported for the requested OpenShift version"
- when:
- - openshift.master.ha | bool
- - openshift.master.cluster_method == "native"
- - not openshift.common.version_gte_3_1_or_1_1 | bool
-- fail:
msg: "openshift_master_cluster_password must be set for multi-master installations"
when:
- openshift.master.ha | bool
@@ -222,8 +216,6 @@
when: openshift_master_bootstrap_enabled | default(False)
- include: set_loopback_context.yml
- when:
- - openshift.common.version_gte_3_2_or_1_2
- name: Start and enable master api on first master
systemd:
diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2
index 5bc135601..629fe3286 100644
--- a/roles/openshift_master/templates/master.yaml.v1.j2
+++ b/roles/openshift_master/templates/master.yaml.v1.j2
@@ -3,9 +3,6 @@ admissionConfig:
pluginConfig:{{ openshift.master.admission_plugin_config | to_padded_yaml(level=2) }}
{% endif %}
apiLevels:
-{% if not openshift.common.version_gte_3_1_or_1_1 | bool %}
-- v1beta3
-{% endif %}
- v1
apiVersion: v1
assetConfig:
@@ -44,10 +41,9 @@ assetConfig:
- {{ cipher_suite }}
{% endfor %}
{% endif %}
-{% if openshift.master.audit_config | default(none) is not none and openshift.common.version_gte_3_2_or_1_2 | bool %}
+{% if openshift.master.audit_config | default(none) is not none %}
auditConfig:{{ openshift.master.audit_config | to_padded_yaml(level=1) }}
{% endif %}
-{% if openshift.common.version_gte_3_3_or_1_3 | bool %}
controllerConfig:
election:
lockName: openshift-master-controllers
@@ -55,7 +51,6 @@ controllerConfig:
signer:
certFile: service-signer.crt
keyFile: service-signer.key
-{% endif %}
controllers: '*'
corsAllowedOrigins:
# anchor with start (\A) and end (\z) of the string, make the check case insensitive ((?i)) and escape hostname
@@ -74,11 +69,7 @@ dnsConfig:
bindNetwork: tcp4
{% endif %}
etcdClientInfo:
-{% if openshift.common.version_gte_3_2_or_1_2 | bool %}
ca: {{ "ca-bundle.crt" if (openshift.master.embedded_etcd | bool) else "master.etcd-ca.crt" }}
-{% else %}
- ca: {{ "ca.crt" if (openshift.master.embedded_etcd | bool) else "master.etcd-ca.crt" }}
-{% endif %}
certFile: master.etcd-client.crt
keyFile: master.etcd-client.key
urls:
@@ -92,20 +83,12 @@ etcdConfig:
peerServingInfo:
bindAddress: {{ openshift.master.bind_addr }}:7001
certFile: etcd.server.crt
-{% if openshift.common.version_gte_3_2_or_1_2 | bool %}
clientCA: ca-bundle.crt
-{% else %}
- clientCA: ca.crt
-{% endif %}
keyFile: etcd.server.key
servingInfo:
bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.etcd_port }}
certFile: etcd.server.crt
-{% if openshift.common.version_gte_3_2_or_1_2 | bool %}
clientCA: ca-bundle.crt
-{% else %}
- clientCA: ca.crt
-{% endif %}
keyFile: etcd.server.key
storageDirectory: {{ r_openshift_master_data_dir }}/openshift.local.etcd
{% endif %}
@@ -123,21 +106,12 @@ imagePolicyConfig:{{ openshift.master.image_policy_config | to_padded_yaml(level
kind: MasterConfig
kubeletClientInfo:
{# TODO: allow user specified kubelet port #}
-{% if openshift.common.version_gte_3_2_or_1_2 | bool %}
ca: ca-bundle.crt
-{% else %}
- ca: ca.crt
-{% endif %}
certFile: master.kubelet-client.crt
keyFile: master.kubelet-client.key
port: 10250
{% if openshift.master.embedded_kube | bool %}
kubernetesMasterConfig:
-{% if not openshift.common.version_gte_3_1_or_1_1 | bool %}
- apiLevels:
- - v1beta3
- - v1
-{% endif %}
apiServerArguments: {{ openshift.master.api_server_args | default(None) | to_padded_yaml( level=2 ) }}
{% if r_openshift_master_etcd3_storage or ( r_openshift_master_clean_install and openshift.common.version_gte_3_6 ) %}
storage-backend:
@@ -160,21 +134,17 @@ kubernetesMasterConfig:
{% endif %}
masterClients:
{# TODO: allow user to set externalKubernetesKubeConfig #}
-{% if openshift.common.version_gte_3_3_or_1_3 | bool %}
externalKubernetesClientConnectionOverrides:
acceptContentTypes: application/vnd.kubernetes.protobuf,application/json
contentType: application/vnd.kubernetes.protobuf
burst: {{ openshift_master_external_ratelimit_burst | default(400) }}
qps: {{ openshift_master_external_ratelimit_qps | default(200) }}
-{% endif %}
externalKubernetesKubeConfig: ""
-{% if openshift.common.version_gte_3_3_or_1_3 | bool %}
openshiftLoopbackClientConnectionOverrides:
acceptContentTypes: application/vnd.kubernetes.protobuf,application/json
contentType: application/vnd.kubernetes.protobuf
burst: {{ openshift_master_loopback_ratelimit_burst | default(600) }}
qps: {{ openshift_master_loopback_ratelimit_qps | default(300) }}
-{% endif %}
openshiftLoopbackKubeConfig: openshift-master.kubeconfig
masterPublicURL: {{ openshift.master.public_api_url }}
networkConfig:
@@ -208,11 +178,7 @@ oauthConfig:
{% for line in translated_identity_providers.splitlines() %}
{{ line }}
{% endfor %}
-{% if openshift.common.version_gte_3_2_or_1_2 | bool %}
masterCA: ca-bundle.crt
-{% else %}
- masterCA: ca.crt
-{% endif %}
masterPublicURL: {{ openshift.master.public_api_url }}
masterURL: {{ openshift.master.api_url }}
sessionConfig:
@@ -245,11 +211,7 @@ serviceAccountConfig:
- default
- builder
- deployer
-{% if openshift.common.version_gte_3_2_or_1_2 | bool %}
masterCA: ca-bundle.crt
-{% else %}
- masterCA: ca.crt
-{% endif %}
privateKeyFile: serviceaccounts.private.key
publicKeyFiles:
- serviceaccounts.public.key
diff --git a/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.service.j2 b/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.service.j2
index e284413f7..fae021845 100644
--- a/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.service.j2
+++ b/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.service.j2
@@ -7,11 +7,7 @@ Wants={{ openshift.common.service_type }}-master-api.service
Requires=network-online.target
[Service]
-{% if openshift.common.version_gte_3_1_1_or_1_1_1 | bool %}
Type=notify
-{% else %}
-Type=simple
-{% endif %}
EnvironmentFile=/etc/sysconfig/{{ openshift.common.service_type }}-master-controllers
Environment=GOTRACEBACK=crash
ExecStart=/usr/bin/openshift start master controllers --config=${CONFIG_FILE} $OPTIONS
diff --git a/roles/openshift_master_certificates/tasks/main.yml b/roles/openshift_master_certificates/tasks/main.yml
index d9ffb1b6f..ec1fbb1ee 100644
--- a/roles/openshift_master_certificates/tasks/main.yml
+++ b/roles/openshift_master_certificates/tasks/main.yml
@@ -3,7 +3,7 @@
openshift_master_certs_no_etcd:
- admin.crt
- master.kubelet-client.crt
- - "{{ 'master.proxy-client.crt' if openshift.common.version_gte_3_1_or_1_1 else omit }}"
+ - master.proxy-client.crt
- master.server.crt
- openshift-master.crt
- openshift-registry.crt
@@ -57,9 +57,7 @@
--hostnames={{ hostvars[item].openshift.common.all_hostnames | join(',') }}
--cert={{ openshift_generated_configs_dir }}/master-{{ hostvars[item].openshift.common.hostname }}/master.server.crt
--key={{ openshift_generated_configs_dir }}/master-{{ hostvars[item].openshift.common.hostname }}/master.server.key
- {% if openshift_version | oo_version_gte_3_5_or_1_5(openshift.common.deployment_type) | bool %}
--expire-days={{ openshift_master_cert_expire_days }}
- {% endif %}
--signer-cert={{ openshift_ca_cert }}
--signer-key={{ openshift_ca_key }}
--signer-serial={{ openshift_ca_serial }}
@@ -87,9 +85,7 @@
--signer-serial={{ openshift_ca_serial }}
--user=system:openshift-master
--basename=openshift-master
- {% if openshift_version | oo_version_gte_3_5_or_1_5(openshift.common.deployment_type) | bool %}
--expire-days={{ openshift_master_cert_expire_days }}
- {% endif %}
args:
creates: "{{ openshift_generated_configs_dir }}/master-{{ hostvars[item].openshift.common.hostname }}/openshift-master.kubeconfig"
with_items: "{{ hostvars
diff --git a/roles/openshift_master_cluster/tasks/main.yml b/roles/openshift_master_cluster/tasks/main.yml
index 0543872c9..40705d357 100644
--- a/roles/openshift_master_cluster/tasks/main.yml
+++ b/roles/openshift_master_cluster/tasks/main.yml
@@ -3,10 +3,6 @@
msg: "Not possible on atomic hosts for now"
when: openshift.common.is_containerized | bool
-- fail:
- msg: "Pacemaker HA is unsupported on OpenShift Enterprise 3.2 and Origin 1.2"
- when: openshift.master.cluster_method == "pacemaker" and openshift.common.version_gte_3_2_or_1_2 | bool
-
- name: Test if cluster is already configured
command: pcs status
register: pcs_status
diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py
index 97a5179e0..c827f2d26 100644
--- a/roles/openshift_master_facts/filter_plugins/openshift_master.py
+++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py
@@ -518,29 +518,16 @@ class FilterModule(object):
'admin.key',
'admin.kubeconfig',
'master.kubelet-client.crt',
- 'master.kubelet-client.key']
+ 'master.kubelet-client.key',
+ 'master.proxy-client.crt',
+ 'master.proxy-client.key',
+ 'service-signer.crt',
+ 'service-signer.key']
if bool(include_ca):
certs += ['ca.crt', 'ca.key', 'ca-bundle.crt', 'client-ca-bundle.crt']
if bool(include_keys):
certs += ['serviceaccounts.private.key',
'serviceaccounts.public.key']
- if bool(hostvars['openshift']['common']['version_gte_3_1_or_1_1']):
- certs += ['master.proxy-client.crt',
- 'master.proxy-client.key']
- if not bool(hostvars['openshift']['common']['version_gte_3_2_or_1_2']):
- certs += ['openshift-master.crt',
- 'openshift-master.key',
- 'openshift-master.kubeconfig']
- if bool(hostvars['openshift']['common']['version_gte_3_3_or_1_3']):
- certs += ['service-signer.crt',
- 'service-signer.key']
- if not bool(hostvars['openshift']['common']['version_gte_3_5_or_1_5']):
- certs += ['openshift-registry.crt',
- 'openshift-registry.key',
- 'openshift-registry.kubeconfig',
- 'openshift-router.crt',
- 'openshift-router.key',
- 'openshift-router.kubeconfig']
return certs
@staticmethod
diff --git a/roles/openshift_metrics/handlers/main.yml b/roles/openshift_metrics/handlers/main.yml
index 88b893448..074b72942 100644
--- a/roles/openshift_metrics/handlers/main.yml
+++ b/roles/openshift_metrics/handlers/main.yml
@@ -18,11 +18,7 @@
# wait_for port doesn't provide health information.
command: >
curl --silent --tlsv1.2
- {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
--cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
- {% else %}
- --cacert {{ openshift.common.config_base }}/master/ca.crt
- {% endif %}
{{ openshift.master.api_url }}/healthz/ready
args:
# Disables the following warning:
diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2
index 718d35dca..d452cc45c 100644
--- a/roles/openshift_node/templates/node.yaml.v1.j2
+++ b/roles/openshift_node/templates/node.yaml.v1.j2
@@ -29,13 +29,11 @@ kubeletArguments: {{ openshift.node.kubelet_args | default(None) | to_padded_yam
runtime-request-timeout:
- 10m
{% endif %}
-{% if openshift.common.version_gte_3_3_or_1_3 | bool %}
masterClientConnectionOverrides:
acceptContentTypes: application/vnd.kubernetes.protobuf,application/json
contentType: application/vnd.kubernetes.protobuf
burst: 200
qps: 100
-{% endif %}
masterKubeConfig: system:node:{{ openshift.common.hostname }}.kubeconfig
{% if openshift_node_use_openshift_sdn | bool %}
networkPluginName: {{ openshift_node_sdn_network_plugin_name }}
diff --git a/roles/openshift_node_certificates/tasks/main.yml b/roles/openshift_node_certificates/tasks/main.yml
index 1a775178d..97f1fbbdd 100644
--- a/roles/openshift_node_certificates/tasks/main.yml
+++ b/roles/openshift_node_certificates/tasks/main.yml
@@ -66,9 +66,7 @@
--signer-key={{ openshift_ca_key }}
--signer-serial={{ openshift_ca_serial }}
--user=system:node:{{ hostvars[item].openshift.common.hostname }}
- {% if openshift_version | oo_version_gte_3_5_or_1_5(openshift.common.deployment_type) | bool %}
--expire-days={{ openshift_node_cert_expire_days }}
- {% endif %}
args:
creates: "{{ openshift_generated_configs_dir }}/node-{{ hostvars[item].openshift.common.hostname }}"
with_items: "{{ hostvars
@@ -82,9 +80,7 @@
{{ hostvars[openshift_ca_host].openshift.common.client_binary }} adm ca create-server-cert
--cert={{ openshift_generated_configs_dir }}/node-{{ hostvars[item].openshift.common.hostname }}/server.crt
--key={{ openshift_generated_configs_dir }}/node-{{ hostvars[item].openshift.common.hostname }}/server.key
- {% if openshift_version | oo_version_gte_3_5_or_1_5(openshift.common.deployment_type) | bool %}
--expire-days={{ openshift_node_cert_expire_days }}
- {% endif %}
--overwrite=true
--hostnames={{ hostvars[item].openshift.common.hostname }},{{ hostvars[item].openshift.common.public_hostname }},{{ hostvars[item].openshift.common.ip }},{{ hostvars[item].openshift.common.public_ip }}
--signer-cert={{ openshift_ca_cert }}
diff --git a/roles/openshift_node_upgrade/tasks/main.yml b/roles/openshift_node_upgrade/tasks/main.yml
index c1c9e0062..66c1fcc38 100644
--- a/roles/openshift_node_upgrade/tasks/main.yml
+++ b/roles/openshift_node_upgrade/tasks/main.yml
@@ -69,8 +69,6 @@
file:
path: "/etc/systemd/system/docker.service.d/docker-sdn-ovs.conf"
state: absent
- when: (deployment_type == 'openshift-enterprise' and openshift_release | version_compare('3.4', '>='))
- or (deployment_type == 'origin' and openshift_release | version_compare('1.4', '>='))
- include: containerized_node_upgrade.yml
when: openshift.common.is_containerized | bool
diff --git a/test/openshift_version_tests.py b/test/openshift_version_tests.py
index 6095beb95..36b8263bb 100644
--- a/test/openshift_version_tests.py
+++ b/test/openshift_version_tests.py
@@ -15,50 +15,6 @@ class OpenShiftVersionTests(unittest.TestCase):
openshift_version_filters = openshift_version.FilterModule()
- # Static tests for legacy filters.
- legacy_gte_tests = [{'name': 'oo_version_gte_3_1_or_1_1',
- 'positive_openshift-enterprise_version': '3.2.0',
- 'negative_openshift-enterprise_version': '3.0.0',
- 'positive_origin_version': '1.2.0',
- 'negative_origin_version': '1.0.0'},
- {'name': 'oo_version_gte_3_1_1_or_1_1_1',
- 'positive_openshift-enterprise_version': '3.2.0',
- 'negative_openshift-enterprise_version': '3.1.0',
- 'positive_origin_version': '1.2.0',
- 'negative_origin_version': '1.1.0'},
- {'name': 'oo_version_gte_3_2_or_1_2',
- 'positive_openshift-enterprise_version': '3.3.0',
- 'negative_openshift-enterprise_version': '3.1.0',
- 'positive_origin_version': '1.3.0',
- 'negative_origin_version': '1.1.0'},
- {'name': 'oo_version_gte_3_3_or_1_3',
- 'positive_openshift-enterprise_version': '3.4.0',
- 'negative_openshift-enterprise_version': '3.2.0',
- 'positive_origin_version': '1.4.0',
- 'negative_origin_version': '1.2.0'},
- {'name': 'oo_version_gte_3_4_or_1_4',
- 'positive_openshift-enterprise_version': '3.5.0',
- 'negative_openshift-enterprise_version': '3.3.0',
- 'positive_origin_version': '1.5.0',
- 'negative_origin_version': '1.3.0'},
- {'name': 'oo_version_gte_3_5_or_1_5',
- 'positive_openshift-enterprise_version': '3.6.0',
- 'negative_openshift-enterprise_version': '3.4.0',
- 'positive_origin_version': '3.6.0',
- 'negative_origin_version': '1.4.0'}]
-
- def test_legacy_gte_filters(self):
- for test in self.legacy_gte_tests:
- for deployment_type in ['openshift-enterprise', 'origin']:
- # Test negative case per deployment_type
- self.assertFalse(
- self.openshift_version_filters._filters[test['name']](
- test["negative_{}_version".format(deployment_type)], deployment_type))
- # Test positive case per deployment_type
- self.assertTrue(
- self.openshift_version_filters._filters[test['name']](
- test["positive_{}_version".format(deployment_type)], deployment_type))
-
def test_gte_filters(self):
for major, minor_start, minor_end in self.openshift_version_filters.versions:
for minor in range(minor_start, minor_end):