Browse Source

Use glusterfs_name and glusterfs_namespace for heketi url

Kenjiro Nakayama 7 years ago
parent
commit
2a747dd3ec

+ 1 - 1
roles/openshift_storage_glusterfs/templates/gluster-block-storageclass.yml.j2

@@ -9,7 +9,7 @@ metadata:
 {% endif %}
 {% endif %}
 provisioner: gluster.org/glusterblock
 provisioner: gluster.org/glusterblock
 parameters:
 parameters:
-  resturl: "http://{% if glusterfs_heketi_is_native %}heketi-storage.glusterfs.svc.cluster.local:8080{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %}"
+  resturl: "http://{% if glusterfs_heketi_is_native %}heketi-{{ glusterfs_name }}.{{ glusterfs_namespace }}.svc:8080{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %}"
   restuser: "admin"
   restuser: "admin"
   chapauthenabled: "true"
   chapauthenabled: "true"
   hacount: "3"
   hacount: "3"

+ 1 - 1
roles/openshift_storage_glusterfs/templates/glusterfs-storageclass.yml.j2

@@ -9,7 +9,7 @@ metadata:
 {% endif %}
 {% endif %}
 provisioner: kubernetes.io/glusterfs
 provisioner: kubernetes.io/glusterfs
 parameters:
 parameters:
-  resturl: "http://{% if glusterfs_heketi_is_native %}heketi-storage.glusterfs.svc.cluster.local:8080{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %}"
+  resturl: "http://{% if glusterfs_heketi_is_native %}heketi-{{ glusterfs_name }}.{{ glusterfs_namespace }}.svc.svc.cluster.local:8080{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %}"
   restuser: "admin"
   restuser: "admin"
 {% if glusterfs_heketi_admin_key is defined %}
 {% if glusterfs_heketi_admin_key is defined %}
   secretNamespace: "{{ glusterfs_namespace }}"
   secretNamespace: "{{ glusterfs_namespace }}"