summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2017-05-31 11:48:33 -0500
committerJose A. Rivera <jarrpa@redhat.com>2017-06-13 13:10:23 -0500
commita315411dee1217518bbd83bf6508bc44e0fec5d6 (patch)
tree710675235f0b90eab1965171f6351648d2dac77b /roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
parent5e73aa7b07fefbb211c791f4b5b5f8d29af7860f (diff)
downloadopenshift-a315411dee1217518bbd83bf6508bc44e0fec5d6.tar.gz
openshift-a315411dee1217518bbd83bf6508bc44e0fec5d6.tar.bz2
openshift-a315411dee1217518bbd83bf6508bc44e0fec5d6.tar.xz
openshift-a315411dee1217518bbd83bf6508bc44e0fec5d6.zip
GlusterFS: Allow cleaner separation of multiple clusters
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Diffstat (limited to 'roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml')
-rw-r--r--roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml35
1 files changed, 33 insertions, 2 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml b/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
index 127b7d618..80aa1f2db 100644
--- a/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
+++ b/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
@@ -46,6 +46,36 @@
with_items:
- kind: "template,route,service,jobs,dc,secret"
selector: "deploy-heketi"
+ - kind: "svc"
+ name: "heketi-storage-endpoints"
+
+- name: Generate heketi endpoints
+ template:
+ src: "{{ openshift.common.examples_content_version }}/heketi-endpoints.yml.j2"
+ dest: "{{ mktemp.stdout }}/heketi-endpoints.yml"
+
+- name: Generate heketi service
+ template:
+ src: "{{ openshift.common.examples_content_version }}/heketi-service.yml.j2"
+ dest: "{{ mktemp.stdout }}/heketi-service.yml"
+
+- name: Create heketi endpoints
+ oc_obj:
+ namespace: "{{ glusterfs_namespace }}"
+ state: present
+ kind: endpoints
+ name: "heketi-db-{{ glusterfs_name }}-endpoints"
+ files:
+ - "{{ mktemp.stdout }}/heketi-endpoints.yml"
+
+- name: Create heketi service
+ oc_obj:
+ namespace: "{{ glusterfs_namespace }}"
+ state: present
+ kind: service
+ name: "heketi-db-{{ glusterfs_name }}-endpoints"
+ files:
+ - "{{ mktemp.stdout }}/heketi-service.yml"
- name: Copy heketi template
copy:
@@ -72,13 +102,14 @@
HEKETI_USER_KEY: "{{ glusterfs_heketi_user_key }}"
HEKETI_ADMIN_KEY: "{{ glusterfs_heketi_admin_key }}"
HEKETI_KUBE_NAMESPACE: "{{ glusterfs_namespace }}"
+ CLUSTER_NAME: "{{ glusterfs_name }}"
- name: Wait for heketi pod
oc_obj:
namespace: "{{ glusterfs_namespace }}"
kind: pod
state: list
- selector: "glusterfs=heketi-pod"
+ selector: "glusterfs=heketi-{{ glusterfs_name }}-pod"
register: heketi_pod
until:
- "heketi_pod.results.results[0]['items'] | count > 0"
@@ -92,7 +123,7 @@
namespace: "{{ glusterfs_namespace }}"
state: list
kind: ep
- selector: "glusterfs=heketi-service"
+ selector: "glusterfs=heketi-{{ glusterfs_name }}-service"
register: heketi_url
until:
- "heketi_url.results.results[0]['items'][0].subsets[0].addresses[0].ip != ''"