diff options
-rw-r--r-- | inventory/byo/hosts.example | 2 | ||||
-rw-r--r-- | roles/openshift_master/handlers/main.yml | 2 | ||||
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 1 | ||||
-rw-r--r-- | roles/openshift_master/templates/master.yaml.v1.j2 | 4 |
4 files changed, 8 insertions, 1 deletions
diff --git a/inventory/byo/hosts.example b/inventory/byo/hosts.example index c445f28b7..d6c9c3ab6 100644 --- a/inventory/byo/hosts.example +++ b/inventory/byo/hosts.example @@ -76,6 +76,8 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', #openshift_master_cluster_public_hostname=openshift-ansible.test.example.com #openshift_master_cluster_vip=192.168.133.25 #openshift_master_cluster_public_vip=192.168.133.25 +# Override the default controller lease ttl +#osm_controller_lease_ttl=30 # default subdomain to use for exposed routes #osm_default_subdomain=apps.test.example.com diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml index 9ce4f512b..ad3ac5a9f 100644 --- a/roles/openshift_master/handlers/main.yml +++ b/roles/openshift_master/handlers/main.yml @@ -7,6 +7,8 @@ service: name={{ openshift.common.service_type }}-master-api state=restarted when: openshift_master_ha | bool +# TODO: need to fix up ignore_errors here - name: restart master controllers service: name={{ openshift.common.service_type }}-master-controllers state=restarted when: openshift_master_ha | bool + ignore_errors: yes diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 085855750..290f22358 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -64,6 +64,7 @@ infra_nodes: "{{ num_infra | default(None) }}" disabled_features: "{{ osm_disabled_features | default(None) }}" master_count: "{{ openshift_master_count | default(None) }}" + controller_lease_ttl: "{{ osm_controller_lease_ttl | default(None) }}" - name: Install Master package yum: pkg={{ openshift.common.service_type }}-master state=present diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2 index 3f2c51417..9145df479 100644 --- a/roles/openshift_master/templates/master.yaml.v1.j2 +++ b/roles/openshift_master/templates/master.yaml.v1.j2 @@ -16,7 +16,9 @@ assetConfig: keyFile: master.server.key maxRequestsInFlight: 0 requestTimeoutSeconds: 0 -controllerLeaseTTL: 0 +{% if openshift_master_ha | bool %} +controllerLeaseTTL: {{ openshift.master.controller_lease_ttl | default('30') }} +{% endif %} controllers: '*' corsAllowedOrigins: {% for origin in ['127.0.0.1', 'localhost', openshift.common.ip, openshift.common.public_ip] | union(openshift.common.all_hostnames) | unique %} |