summaryrefslogtreecommitdiffstats
path: root/roles/openshift_web_console
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2018-02-07 16:27:04 -0500
committerGitHub <noreply@github.com>2018-02-07 16:27:04 -0500
commit178a71a0952adc5a4137f2c0acae8e5d2cf71c62 (patch)
tree22bb3aa040193ed92b5635682470ed369edda847 /roles/openshift_web_console
parent5a3fdd11e8ba92693b7c842e3210c40a76fe5b15 (diff)
parent9c1cfdec3ca6ec7034ea55050b66215d6a827323 (diff)
downloadopenshift-178a71a0952adc5a4137f2c0acae8e5d2cf71c62.tar.gz
openshift-178a71a0952adc5a4137f2c0acae8e5d2cf71c62.tar.bz2
openshift-178a71a0952adc5a4137f2c0acae8e5d2cf71c62.tar.xz
openshift-178a71a0952adc5a4137f2c0acae8e5d2cf71c62.zip
Merge pull request #7032 from spadgett/console-liveness
Detect config changes in console liveness probe
Diffstat (limited to 'roles/openshift_web_console')
-rw-r--r--roles/openshift_web_console/files/console-template.yaml15
-rw-r--r--roles/openshift_web_console/tasks/update_console_config.yml7
2 files changed, 11 insertions, 11 deletions
diff --git a/roles/openshift_web_console/files/console-template.yaml b/roles/openshift_web_console/files/console-template.yaml
index 547e7a265..5bcfcf73f 100644
--- a/roles/openshift_web_console/files/console-template.yaml
+++ b/roles/openshift_web_console/files/console-template.yaml
@@ -67,10 +67,17 @@ objects:
port: 8443
scheme: HTTPS
livenessProbe:
- httpGet:
- path: /
- port: 8443
- scheme: HTTPS
+ exec:
+ command:
+ - /bin/sh
+ - -i
+ - -c
+ - |-
+ if [[ ! -f /tmp/webconsole-config.hash ]]; then \
+ md5sum /var/webconsole-config/webconsole-config.yaml > /tmp/webconsole-config.hash; \
+ elif [[ $(md5sum /var/webconsole-config/webconsole-config.yaml) != $(cat /tmp/webconsole-config.hash) ]]; then \
+ exit 1; \
+ fi && curl -k -f https://0.0.0.0:8443/console/
resources:
requests:
cpu: 100m
diff --git a/roles/openshift_web_console/tasks/update_console_config.yml b/roles/openshift_web_console/tasks/update_console_config.yml
index 967222ea4..8b967cda3 100644
--- a/roles/openshift_web_console/tasks/update_console_config.yml
+++ b/roles/openshift_web_console/tasks/update_console_config.yml
@@ -5,9 +5,6 @@
# `value` properties in the same format as `yedit` module `edits`. Only
# properties passed are updated. The separator for nested properties is `#`.
#
-# Note that this triggers a redeployment on the console and a brief downtime
-# since it uses a `Recreate` strategy.
-#
# Example usage:
#
# - include_role:
@@ -55,13 +52,9 @@
state: present
from_file:
webconsole-config.yaml: "{{ mktemp_console.stdout }}/webconsole-config.yaml"
- register: update_console_config_map
- name: Remove temp directory
file:
state: absent
name: "{{ mktemp_console.stdout }}"
changed_when: False
-
- - include_tasks: rollout_console.yml
- when: update_console_config_map.changed | bool