Skip to content

Allow dns_provider not set - #39

Merged
weshinsley merged 5 commits into
masterfrom
dns_optional
Dec 3, 2025
Merged

Allow dns_provider not set#39
weshinsley merged 5 commits into
masterfrom
dns_optional

Conversation

@weshinsley

@weshinsley weshinsley commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

We are not setting dns-provider if we want acme-buddy to use a self-signed cert, so allow that to not be provided in the config, and not sent as a command-line arg.

Also allowing the env var for self-signed certs to be used here.

@weshinsley
weshinsley marked this pull request as draft December 2, 2025 15:05
@codecov

codecov Bot commented Dec 2, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.33%. Comparing base (33d8535) to head (15bee7c).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
+ Coverage   97.29%   97.33%   +0.03%     
==========================================
  Files          16       16              
  Lines        1663     1686      +23     
  Branches      101      102       +1     
==========================================
+ Hits         1618     1641      +23     
  Misses         35       35              
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@weshinsley
weshinsley marked this pull request as ready for review December 2, 2025 17:41
Comment thread src/constellation/acme.py Outdated
Comment on lines +19 to +27
self.dns_provider = config_string(data, [*path, "dns_provider"], True)
self.env = config_dict(data, [*path, "env"])
if "ACME_BUDDY_STAGING" in os.environ:
self.env["ACME_BUDDY_STAGING"] = os.environ["ACME_BUDDY_STAGING"]
self.env.update(
{
var: os.environ[var]
for var in ("ACME_BUDDY_STAGING", "ACME_BUDDY_SELF_SIGNED")
if var in os.environ
}
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I can see the value of using a local environment variable for acme buddy staging, as in that case we want acme buddy staging to fake a cert for us (i.e. not self-signed) allowing us to test production configs without bothering real LE - but in case of self-signed, shouldn't that just be indicated through the config itself (as it has been in the past) - especially since this is assumed to be reflected in the config by not having to include dns_provider. Or am I misunderstanding how acme buddy staging works?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're probably right - I guess in reality, constellation will be called from whatever deployment we are doing, so the local environment would be the same between, say, packit-deploy and constellation? I slightly wonder how useful either of these things are in constellation itself, except perhaps for testing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll roll this back to the earlier version for now

@weshinsley
weshinsley merged commit 723213e into master Dec 3, 2025
9 checks passed
@weshinsley
weshinsley deleted the dns_optional branch December 3, 2025 16:09
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.

2 participants