Browse Source

Provide cacert when performing health checks

Andrew Butcher 9 years ago
parent
commit
837fe7dc76

+ 2 - 1
playbooks/common/openshift-master/scaleup.yml

@@ -33,7 +33,8 @@
     service: name={{ openshift.common.service_type }}-master-controllers state=restarted
   - name: verify api server
     command: >
-      curl -k --silent {{ openshift.master.api_url }}/healthz/ready
+      curl --silent --cacert {{ openshift.common.config_base }}/master/ca.crt
+      {{ openshift.master.api_url }}/healthz/ready
     register: api_available_output
     until: api_available_output.stdout == 'ok'
     retries: 120

+ 2 - 1
playbooks/common/openshift-node/config.yml

@@ -256,7 +256,8 @@
     # Using curl here since the uri module requires python-httplib2 and
     # wait_for port doesn't provide health information.
     command: >
-      curl -k --silent {{ openshift.master.api_url }}/healthz/ready
+      curl --silent --cacert {{ openshift.master.config_dir }}/master/ca.crt
+      {{ openshift.master.api_url }}/healthz/ready
     register: api_available_output
     until: api_available_output.stdout == 'ok'
     retries: 120

+ 2 - 1
roles/openshift_master/handlers/main.yml

@@ -17,7 +17,8 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl -k --silent {{ openshift.master.api_url }}/healthz/ready
+    curl --silent --cacert {{ openshift.common.config_base }}/master/ca.crt
+    {{ openshift.master.api_url }}/healthz/ready
   register: api_available_output
   until: api_available_output.stdout == 'ok'
   retries: 120

+ 2 - 1
roles/openshift_master/tasks/main.yml

@@ -282,7 +282,8 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl -k --silent {{ openshift.master.api_url }}/healthz/ready
+    curl --silent --cacert {{ openshift.common.config_base }}/master/ca.crt
+    {{ openshift.master.api_url }}/healthz/ready
   register: api_available_output
   until: api_available_output.stdout == 'ok'
   retries: 120

+ 2 - 1
roles/openshift_node/tasks/main.yml

@@ -126,7 +126,8 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl -k --silent {{ openshift_node_master_api_url }}/healthz/ready
+    curl --silent --cacert {{ openshift.common.config_base }}/node/ca.crt
+    {{ openshift_node_master_api_url }}/healthz/ready
   register: api_available_output
   until: api_available_output.stdout == 'ok'
   retries: 120