If I want to run ansible-service-broker via openshift-ansible with my currently available glusterfs persistent storage solution, I need to modify a playbook so that I can use my specific storage class, e.g. I make this modification
$ git describe
openshift-ansible-3.7.0-0.117.0-8-gcc45402
$ git diff
diff --git a/roles/ansible_service_broker/tasks/install.yml b/roles/ansible_service_broker/tasks/install.yml
index b3797ef..373f16c 100644
--- a/roles/ansible_service_broker/tasks/install.yml
+++ b/roles/ansible_service_broker/tasks/install.yml
@@ -110,6 +110,7 @@
resources:
requests:
storage: 1Gi
+ storageClassName: glusterfs-storage
- name: create etcd deployment
oc_obj:
I then have the openshift_hosted_etcd_storage_*
vars setup as such:
(Note from Leif on 4/15/18, previous edit 8 months prior, saying: "btw yea, I don't think your dynamic configuration for etcd works any more", apparently completely bailing)
openshift_hosted_etcd_storage_kind=dynamic
openshift_hosted_etcd_storage_volume_name=etcd-vol
openshift_hosted_etcd_storage_access_modes=["ReadWriteOnce"]
openshift_hosted_etcd_storage_volume_size=128M
openshift_hosted_etcd_storage_labels={'storage': 'etcd'}
And you can see that I have the pods running, and I have the pv/pvc all good to go.
[centos@openshift-master ~]$ oc get storageclass
NAME TYPE
glusterfs-storage kubernetes.io/glusterfs
[centos@openshift-master ~]$ oc project
oUsing project "openshift-ansible-service-broker" on server "https://openshift-master.example.local:8443".
[centos@openshift-master ~]$ oc get pods
NAME READY STATUS RESTARTS AGE
asb-4013263480-5wxbf 0/1 CrashLoopBackOff 10 30m
etcd-3119139199-8b714 1/1 Running 0 30m
[centos@openshift-master ~]$ oc get pv
NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-d87ed3ee-8ceb-11e7-bbde-525400bbed42 1Gi RWO Delete Bound openshift-ansible-service-broker/etcd glusterfs-storage 30m
[centos@openshift-master ~]$ oc get pvc
NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE
etcd Bound pvc-d87ed3ee-8ceb-11e7-bbde-525400bbed42 1Gi RWO glusterfs-storage 30m