Skip to content

fix: add external-dns resource defaults#7

Merged
patrickleet merged 1 commit into
mainfrom
feat/external-dns-resource-defaults
May 25, 2026
Merged

fix: add external-dns resource defaults#7
patrickleet merged 1 commit into
mainfrom
feat/external-dns-resource-defaults

Conversation

@patrickleet
Copy link
Copy Markdown
Contributor

@patrickleet patrickleet commented May 25, 2026

Summary

  • add default ExternalDNS requests/limits for the Cloudflare DNS stack
  • preserve user override behavior by merging defaults with spec values
  • extend render tests to assert the defaults

Verification

  • up test run tests/test-render: 10/10 passed
  • make render: rendered ExternalDNS resources include requests cpu=15m memory=100Mi and limits cpu=100m memory=256Mi
  • Colima: DNSStack/default pat-local is Synced=True Ready=True
  • Target aws/hops/pat-local: deployment external-dns/external-dns has requests cpu=15m memory=100Mi and limits cpu=100m memory=256Mi, 1/1 ready

Summary by CodeRabbit

  • Tests
    • Updated ExternalDNS deployment tests to verify resource configurations, including CPU and memory requests and limits.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2932460a-3349-41ce-a3a3-a47443fad4a0

📥 Commits

Reviewing files that changed from the base of the PR and between f208695 and 763a7c6.

📒 Files selected for processing (2)
  • functions/render/200-external-dns.yaml.gotmpl
  • tests/test-render/main.k

📝 Walkthrough

Walkthrough

This PR refactors the ExternalDNS Helm chart values construction from a conditional branching pattern into a structured defaults-and-merge approach, consolidating how provider settings, domain filters, and user overrides are combined, and updates the corresponding test to assert the expected resource configuration.

Changes

ExternalDNS Helm Values Construction

Layer / File(s) Summary
Values consolidation and default wiring
functions/render/200-external-dns.yaml.gotmpl
Creates ednsDefaults dict with provider, sources, policy, registry, interval, and CF_API_TOKEN secretKeyRef wiring. Conditionally merges domainFilters from spec.domains when overrideAllValues is empty. Computes mergedEdnsValues by merging defaults with user-provided externalDNS.values. Renders the merged map into the Helm release values field.
Resource expectation in test
tests/test-render/main.k
Updates the "minimal-renders-edns-and-cluster-issuer" test to assert that the dns-edns Helm Release includes values.resources with CPU/memory requests and limits.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through values, neat and clean,
Defaults and merges dance between the lines—
Where CF tokens wire, and filters convene,
The template now shines with structured designs! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: add external-dns resource defaults' directly and clearly describes the main change: adding default resource configurations for ExternalDNS.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/external-dns-resource-defaults

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Published Crossplane Package

The following Crossplane package was published as part of this PR:

Package: ghcr.io/hops-ops/cloudflare-dns-stack:pr-7-54ebcf8c6001af5a8ad96ff3455bc834c6eb36d6

View Package

@patrickleet patrickleet merged commit 4d1322a into main May 25, 2026
8 checks passed
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