Allow dns_provider not set - #39
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
| 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 | ||
| } | ||
| ) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I'll roll this back to the earlier version for now
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.