summaryrefslogtreecommitdiffstats
path: root/roles/openshift_web_console/files
diff options
context:
space:
mode:
authorSamuel Padgett <spadgett@redhat.com>2018-02-06 13:52:51 -0500
committerSamuel Padgett <spadgett@redhat.com>2018-02-06 13:56:00 -0500
commit9c1cfdec3ca6ec7034ea55050b66215d6a827323 (patch)
treea572723ffc9c1bdc40579117d314eadb092dead1 /roles/openshift_web_console/files
parentfa6c7cc621ff05b35eadc846d3960ac2dc1009c0 (diff)
downloadopenshift-9c1cfdec3ca6ec7034ea55050b66215d6a827323.tar.gz
openshift-9c1cfdec3ca6ec7034ea55050b66215d6a827323.tar.bz2
openshift-9c1cfdec3ca6ec7034ea55050b66215d6a827323.tar.xz
openshift-9c1cfdec3ca6ec7034ea55050b66215d6a827323.zip
Detect config changes in console liveness probe
Use an md5sum to check if the console config has changed and automatically restart the container.
Diffstat (limited to 'roles/openshift_web_console/files')
-rw-r--r--roles/openshift_web_console/files/console-template.yaml15
1 files changed, 11 insertions, 4 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