private final Future<CompositeFuture> deleteZk(Reconciliation reconciliation) { String namespace = reconciliation.namespace(); String name = reconciliation.name(); String zkSsName = ZookeeperCluster.zookeeperClusterName(name); Labels pvcSelector = Labels.forCluster(name).withKind(Kafka.RESOURCE_KIND).withName(zkSsName); return deletePersistentVolumeClaim(namespace, pvcSelector); }
private final Future<CompositeFuture> deleteKafka(Reconciliation reconciliation) { String namespace = reconciliation.namespace(); String name = reconciliation.name(); String kafkaSsName = KafkaCluster.kafkaClusterName(name); Labels pvcSelector = Labels.forCluster(name).withKind(Kafka.RESOURCE_KIND).withName(kafkaSsName); return deletePersistentVolumeClaim(namespace, pvcSelector); }
Labels.forCluster(ssLabels.get(Labels.STRIMZI_CLUSTER_LABEL)) .withKind(ssLabels.get(Labels.STRIMZI_KIND_LABEL)) .withName(name);
@Test public void testWithUserLabels() { Labels start = Labels.forCluster("my-cluster"); // null user labels Labels nullLabels = start.withUserLabels(null); assertEquals(start.toMap(), nullLabels.toMap()); // Non-null values Map userLabels = new HashMap<String, String>(2); userLabels.put("key1", "value1"); userLabels.put("key2", "value2"); Map<String, String> expected = new HashMap<String, String>(); expected.putAll(start.toMap()); expected.putAll(userLabels); Labels nonNullLabels = start.withUserLabels(userLabels); assertEquals(expected, nonNullLabels.toMap()); }