Skip to content

Commit 62b2c50

Browse files
authored
[DPE-6575] Add microk8s testing (#21)
1 parent 20c107f commit 62b2c50

File tree

6 files changed

+290
-120
lines changed

6 files changed

+290
-120
lines changed

lib/charms/kafka/v0/client.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def on_kafka_relation_created(self, event: RelationCreatedEvent):
7777
import time
7878
import sys
7979
from functools import cached_property
80-
from typing import Generator, List, Optional
80+
from typing import Generator, List, Optional, Any
8181

8282
from kafka import KafkaAdminClient, KafkaConsumer, KafkaProducer
8383
from kafka.admin import NewTopic
@@ -184,6 +184,10 @@ def _consumer_client(self) -> KafkaConsumer:
184184
consumer_timeout_ms=15000,
185185
)
186186

187+
def describe_cluster(self) -> Any:
188+
"""Returns the cluster metadata."""
189+
return self._admin_client.describe_cluster()
190+
187191
def create_topic(self, topic: NewTopic) -> None:
188192
"""Creates a new topic on the Kafka cluster.
189193

0 commit comments

Comments
 (0)