summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2017-06-16 14:17:45 -0500
committerJose A. Rivera <jarrpa@redhat.com>2017-06-16 17:30:51 -0500
commitdb2c93950bb9327afab3be70f087010751792977 (patch)
treed5e8c43d1cd19d295a69dfa62f7f7b48584176a3
parent3b3c6a33f5cab37d4574182ffe7f756b24d1cbb6 (diff)
downloadopenshift-db2c93950bb9327afab3be70f087010751792977.tar.gz
openshift-db2c93950bb9327afab3be70f087010751792977.tar.bz2
openshift-db2c93950bb9327afab3be70f087010751792977.tar.xz
openshift-db2c93950bb9327afab3be70f087010751792977.zip
GlusterFS: Use proper identity in heketi secret
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
-rw-r--r--roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml8
-rw-r--r--roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-storageclass.yml.j24
2 files changed, 7 insertions, 5 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
index 428f741ff..92accc170 100644
--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml
@@ -149,16 +149,18 @@
- glusterfs_heketi_is_native
- glusterfs_heketi_is_missing
-- name: Create heketi user secret
+- name: Create heketi secret
oc_secret:
namespace: "{{ glusterfs_namespace }}"
state: present
- name: "heketi-{{ glusterfs_name }}-user-secret"
+ name: "heketi-{{ glusterfs_name }}-secret"
type: "kubernetes.io/glusterfs"
force: True
contents:
- path: key
- data: "{{ glusterfs_heketi_user_key }}"
+ data: "{{ glusterfs_heketi_admin_key }}"
+ when:
+ - glusterfs_storageclass
- name: Get heketi route
oc_obj:
diff --git a/roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-storageclass.yml.j2 b/roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-storageclass.yml.j2
index 014c3d870..5ea801e60 100644
--- a/roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-storageclass.yml.j2
+++ b/roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-storageclass.yml.j2
@@ -6,6 +6,6 @@ metadata:
provisioner: kubernetes.io/glusterfs
parameters:
resturl: "http://{% if glusterfs_heketi_is_native %}{{ glusterfs_heketi_route }}{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %}"
- restuser: "user"
+ restuser: "admin"
secretNamespace: "{{ glusterfs_namespace }}"
- secretName: "heketi-{{ glusterfs_name }}-user-secret"
+ secretName: "heketi-{{ glusterfs_name }}-secret"