Skip to content

Commit

Permalink
Fix dns config name (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Nov 26, 2024
1 parent 7af0531 commit 49afc1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions charms/worker/k8s/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,15 +434,15 @@ def _assemble_cluster_config(self) -> UserFacingClusterConfig:
# https://github.com/canonical/k8s-operator/pull/169/files#r1847378214
)

dns_config = DNSConfig(
dns = DNSConfig(
enabled=self.config.get("dns-enabled"),
)
if cfg := self.config.get("dns-cluster-domain"):
dns_config.cluster_domain = str(cfg)
dns.cluster_domain = str(cfg)
if cfg := self.config.get("dns-service-ip"):
dns_config.service_ip = str(cfg)
dns.service_ip = str(cfg)
if cfg := self.config.get("dns-upstream-nameservers"):
dns_config.upstream_nameservers = str(cfg).split()
dns.upstream_nameservers = str(cfg).split()

gateway = GatewayConfig(enabled=self.config.get("gateway-enabled"))

Expand Down Expand Up @@ -476,7 +476,7 @@ def _assemble_cluster_config(self) -> UserFacingClusterConfig:
return UserFacingClusterConfig(
annotations=self._get_valid_annotations(),
cloud_provider=cloud_provider,
dns_config=dns_config,
dns=dns,
gateway=gateway,
ingress=ingress,
local_storage=local_storage,
Expand Down

0 comments on commit 49afc1a

Please sign in to comment.