Skip to content

Create dns-aggregator charm - #477

Open
weiiwang01 wants to merge 4 commits into
ddns/dns-policyfrom
ddns/dns-aggregator
Open

weiiwang01 wants to merge 4 commits into
ddns/dns-policyfrom
ddns/dns-aggregator

Conversation

@weiiwang01

@weiiwang01 weiiwang01 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Creates the dns-aggregator charm, a charm that aggregates multiple dns_record relations into one upstream dns_record relation.

The dns-aggregator charm has one upstream relation and two downstream relations: the main downstream dns-record-provider (limit: 1) with full forwarding capability, including ddns, and the mixin downstream dns-record-provider-mixin for forwarding DNS entries only.

Why we need it

One unsolved problem of charm relations is that sometimes, we often find relations from different charm applications that are related, but from the Juju perspective, they are standalone relations that have no relation to each other.

For example, inside a web application charm deployment, the web application charm needs to request a DNS domain for its service using the dns_record relation. Also, there's a lego charm inside the same model that uses the dns_record relation to perform a DNS-01 ACME challenge to obtain a TLS certificate for the web application charm.

From the perspective of the upstream DNS provider, for example, the dns-policy charm, these two relations are completely separated with no relation to each other. So we need separate policy rules to approve these two relations to get what they need.

With the dns-aggregator charm, the web application charm and the lego charm's dns_record relations can be combined into one dns_record relation and then presented to the dns-policy charm. With this, the dns-policy charm can know the DNS A record request sent by the web application charm and the TXT record sent by the lego charm are from the same deployment and associated. This gives the dns-policy charm the possibility to create some intelligent rules to, for example, automatically approve the TXT record when an A record inside the same relation for the same domain is approved.

Checklist

  • I followed the contributing guide
  • I added or updated the documentation (if applicable)
  • I updated docs/changelog.md with user-relevant changes
  • I used AI to assist with preparing this PR
  • I added or updated tests as needed (unit and integration)
  • If integration test modules are used: I updated the workflow configuration
    (e.g., in .github/workflows/integration_tests.yaml, ensure the modules list is correct)
  • If this PR involves Terraform: terraform fmt passes and tflint reports no errors

@weiiwang01
weiiwang01 marked this pull request as ready for review September 15, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant