From ebcff385696b8d615248a9e9867052c28f48e41c Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 08:21:23 +0200 Subject: [PATCH] Adds storage class for kafka brokers --- 50kafka.yml | 2 ++ configure-gke/storageclass-broker-gke.yml | 7 +++++++ configure-minikube/storageclass-broker-minikube.yml | 5 +++++ 3 files changed, 14 insertions(+) create mode 100644 configure-gke/storageclass-broker-gke.yml create mode 100644 configure-minikube/storageclass-broker-minikube.yml diff --git a/50kafka.yml b/50kafka.yml index c564ffe3..8f8e2837 100644 --- a/50kafka.yml +++ b/50kafka.yml @@ -66,6 +66,8 @@ spec: volumeClaimTemplates: - metadata: name: data + annotations: + volume.beta.kubernetes.io/storage-class: kafka-broker spec: accessModes: [ "ReadWriteOnce" ] resources: diff --git a/configure-gke/storageclass-broker-gke.yml b/configure-gke/storageclass-broker-gke.yml new file mode 100644 index 00000000..d4361485 --- /dev/null +++ b/configure-gke/storageclass-broker-gke.yml @@ -0,0 +1,7 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: kafka-broker +provisioner: kubernetes.io/gce-pd +parameters: + type: pd-standard diff --git a/configure-minikube/storageclass-broker-minikube.yml b/configure-minikube/storageclass-broker-minikube.yml new file mode 100644 index 00000000..3cff3b21 --- /dev/null +++ b/configure-minikube/storageclass-broker-minikube.yml @@ -0,0 +1,5 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: kafka-broker +provisioner: k8s.io/minikube-hostpath