Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

storageClass spec value is ignored #37

Open
ankon opened this issue Oct 26, 2017 · 2 comments
Open

storageClass spec value is ignored #37

ankon opened this issue Oct 26, 2017 · 2 comments

Comments

@ankon
Copy link

ankon commented Oct 26, 2017

The value for the storageClass spec option is completely ignored, and instead the operator produces PVCs with a 'standard' storage class.

kind: Kafkacluster
apiVersion: krallistic.github.com/v1
metadata:
  name: kafka
spec:
  brokerCount: 3
  zookeeperConnect: zookeeper.default.svc.cluster.local
  storageClass: slow

I'm suspecting this patch will fix that, but I cannot even get dep ensure to work, and removing the constraints leads to build failures.

diff --git a/util/util.go b/util/util.go
--- a/util/util.go
+++ b/util/util.go
@@ -391,7 +391,7 @@ func (c *ClientUtil) createStsFromSpec(cluster spec.Kafkacluster) *appsv1Beta1.S
 	replicas := cluster.Spec.BrokerCount
 	image := cluster.Spec.Image
 
-	storageClass := "standard"
+	storageClass := cluster.Spec.StorageClass
 
 	//TODO error handling, default value?
 	cpus, err := resource.ParseQuantity(cluster.Spec.Resources.CPU)
@krallistic
Copy link
Owner

Thanks for the patch.

Unfortunately, I am currently on Vacation and have only Internet through my phone (which makes it impossible to do dep ensure (That would blow up my limit :) ). I will look into the dep problems next week when iam back.

@citywander
Copy link

any update? Maybe you can merge this change

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants