Skip to content

Commit

Permalink
refactor: use updated snap/rock layout (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoppenheimer authored Apr 20, 2023
1 parent d752428 commit 16f7f12
Show file tree
Hide file tree
Showing 17 changed files with 445 additions and 362 deletions.
9 changes: 5 additions & 4 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ containers:
kafka:
resource: kafka-image
mounts:
- storage: log-data
location: /logs/kafka
- storage: data
location: /var/lib/kafka/data

resources:
kafka-image:
type: oci-image
description: OCI Image for Apache Kafka
upstream-source: ghcr.io/canonical/charmed-kafka:3.3.2-22.04_edge
upstream-source: ghcr.io/canonical/charmed-kafka:3-edge

peers:
cluster:
Expand Down Expand Up @@ -48,10 +48,11 @@ provides:
interface: grafana_dashboard

storage:
log-data:
data:
type: filesystem
description: Directories where the log data is stored
minimum-size: 10G
location: /var/lib/kafka/data

assumes:
- k8s-api
12 changes: 5 additions & 7 deletions src/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import logging
import re
from dataclasses import asdict, dataclass
from typing import List, Optional, Set

from ops.model import Container
from typing import Optional, Set

from utils import run_bin_command

Expand All @@ -29,11 +27,11 @@ class Acl:
class KafkaAuth:
"""Object for updating Kafka users and ACLs."""

def __init__(self, charm, opts: List[str], zookeeper: str, container: Container):
def __init__(self, charm):
self.charm = charm
self.opts = " ".join(opts)
self.zookeeper = zookeeper
self.container = container
self.opts = self.charm.kafka_config.auth_args
self.zookeeper = self.charm.kafka_config.zookeeper_config.get("connect", "")
self.container = self.charm.container
self.current_acls: Set[Acl] = set()
self.new_user_acls: Set[Acl] = set()

Expand Down
Loading

0 comments on commit 16f7f12

Please sign in to comment.