Search in sources :

Example 21 with StorageClass

use of io.fabric8.kubernetes.api.model.storage.StorageClass in project strimzi-kafka-operator by strimzi.

the class NamespaceDeletionRecoveryIsolatedST method createStorageClass.

@BeforeAll
void createStorageClass() {
    kubeClient().getClient().storage().storageClasses().withName(storageClassName).delete();
    StorageClass storageClass = new StorageClassBuilder().withNewMetadata().withName(storageClassName).endMetadata().withProvisioner("kubernetes.io/cinder").withReclaimPolicy("Retain").build();
    kubeClient().getClient().storage().storageClasses().createOrReplace(storageClass);
}
Also used : StorageClass(io.fabric8.kubernetes.api.model.storage.StorageClass) StorageClassBuilder(io.fabric8.kubernetes.api.model.storage.StorageClassBuilder) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

PersistentVolumeClaim (io.fabric8.kubernetes.api.model.PersistentVolumeClaim)17 StorageClass (io.fabric8.kubernetes.api.model.storage.StorageClass)16 StorageClassBuilder (io.fabric8.kubernetes.api.model.storage.StorageClassBuilder)16 Quantity (io.fabric8.kubernetes.api.model.Quantity)15 Kafka (io.strimzi.api.kafka.model.Kafka)14 PlatformFeaturesAvailability (io.strimzi.operator.PlatformFeaturesAvailability)14 KafkaCluster (io.strimzi.operator.cluster.model.KafkaCluster)14 ResourceOperatorSupplier (io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier)14 Reconciliation (io.strimzi.operator.common.Reconciliation)14 PvcOperator (io.strimzi.operator.common.operator.resource.PvcOperator)14 StorageClassOperator (io.strimzi.operator.common.operator.resource.StorageClassOperator)14 BeforeAll (org.junit.jupiter.api.BeforeAll)14 Test (org.junit.jupiter.api.Test)14 List (java.util.List)13 PersistentVolumeClaimConditionBuilder (io.fabric8.kubernetes.api.model.PersistentVolumeClaimConditionBuilder)12 PersistentVolumeClaimStatusBuilder (io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatusBuilder)12 KafkaBuilder (io.strimzi.api.kafka.model.KafkaBuilder)12 GenericKafkaListenerBuilder (io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder)12 KafkaListenerType (io.strimzi.api.kafka.model.listener.arraylistener.KafkaListenerType)12 CertManager (io.strimzi.certs.CertManager)12