Browse Source

Merge pull request #1395 from brenton/master

Updating the 3.1.1 router to match the new liveness probe configuration
Brenton Leanhardt 9 years ago
parent
commit
65e8d09e50

+ 10 - 0
playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml

@@ -622,6 +622,16 @@
       '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}"}]}}}}'
       --api-version=v1
     with_items: haproxy_routers
+    when: not openshift.common.version_gte_3_1_1_or_1_1_1
+
+  - name: Update router image to current version
+    when: all_routers.rc == 0
+    command: >
+      {{ oc_cmd }} patch dc/{{ item['labels']['deploymentconfig'] }} -p
+      '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}","livenessProbe":{"tcpSocket":null,"httpGet":{"path": "/healthz", "port": 1936, "host": "localhost", "scheme": "HTTP"},"initialDelaySeconds":10,"timeoutSeconds":1}}]}}}}'
+      --api-version=v1
+    with_items: haproxy_routers
+    when: openshift.common.version_gte_3_1_1_or_1_1_1
 
   - name: Check for default registry
     command: >

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_1_minor/post.yml

@@ -37,7 +37,7 @@
     when: all_routers.rc == 0
     command: >
       {{ oc_cmd }} patch dc/{{ item['labels']['deploymentconfig'] }} -p
-      '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}"}]}}}}'
+      '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}","livenessProbe":{"tcpSocket":null,"httpGet":{"path": "/healthz", "port": 1936, "host": "localhost", "scheme": "HTTP"},"initialDelaySeconds":10,"timeoutSeconds":1}}]}}}}'
       --api-version=v1
     with_items: haproxy_routers