-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
hetzner: update to new API #2663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c829878 to
c0bee9b
Compare
ebc14e4 to
bf46bbb
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Oh no! I had a typo! Sorry :-( |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Verdict: From my point of view it seems to work. |
No, if there is a timeout, an error message about that appears.
This message is not an error.
You are mixing several things:
Lego checks TXT record propagation after creating the TXT records and before attempting to call Let's Encrypt. The errors |
|
Well, I don't know anything about the internals of lego ;-). Therefore, I leave it in your hands. |
providers/dns/hetzner/hetzner.go
Outdated
| config.APIKey = values[EnvAPIKey] | ||
| switch { | ||
| case foundAPIToken && foundAPIKey: | ||
| return nil, fmt.Errorf("hetzner: credentials are provided by both %s and %s", EnvAPIToken, EnvAPIKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not be better to just use the API key here (and maybe log a strongly worded warning about the API token)?
I could imagine a scenario where one would rollout both the API token and API key, and then gradually upgrade the lego binaries (or more likely their traefik instances).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Otherwise: LGTM)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think about when I added the message.
For me, APIToken should "override" APIKey.
NewDNSProvider() and NewDNSProviderConfig(*Config) should have the same behavior.
NewDNSProviderConfig() when there is no env var should report the same error as hetznerv1, I should duplicate the code, and I was not happy with that.
But duplication, in this context, is not important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 You are thinking the opposite of me:
- you:
APIKey>APIToken - me:
APIToken>APIKey
If you are using a previous version of lego, you can set APIKey and APIToken without any problem because only APIKey will be handled.
APIToken is related to v1, and APIKey is related to legacy.
For me, it's better to use APIToken even if APIKey is defined.
50164d6 to
6b7e7c8
Compare
6b7e7c8 to
693e7a6
Compare
Closes #2662
How to test this PR?
git clone https://github.com/ldez/lego.git cd lego git checkout feat/dns/hetzner-v1make:make buildmake:go build -o dist/lego ./cmd/lego