-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Feat/scaleway.com #899
base: master
Are you sure you want to change the base?
Feat/scaleway.com #899
Changes from 5 commits
75d1a15
740aa38
ac47230
1e80577
ea37d4a
49128bc
1ff7a34
5576557
0398397
fd3ee27
6f66a08
0b9af33
d13729d
4ab47f7
d21fd33
f67e76f
3642186
65684fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,42 @@ | ||||
# Example.com | ||||
|
||||
## Configuration | ||||
|
||||
If something is unclear in the documentation below, please refer to the [scaleway API documentation](https://www.scaleway.com/en/developers/api/domains-and-dns/#path-records-update-records-within-a-dns-zone). | ||||
|
||||
### Example | ||||
|
||||
```json | ||||
{ | ||||
"settings": [ | ||||
{ | ||||
"provider": "scaleway", | ||||
"domain": "munchkin-academia.eu", // corresponds to the `dns-zone` in the API documentation | ||||
"secret_key": "<SECRET_KEY>", | ||||
"ip_version": "ipv4", | ||||
"ipv6_suffix": "", | ||||
"field_type": "A", // optional, it will default to "A" | ||||
"field_name": "www", // optional, it will default to "" (equivalent to "@") | ||||
"ttl": 450 // optional, it will default to 3600 | ||||
qdm12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
francesco086 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
} | ||||
] | ||||
} | ||||
``` | ||||
|
||||
### Compulsory parameters | ||||
|
||||
- `"domain"` is the domain to update. It can be `example.com` (root domain), `sub.example.com` (subdomain of `example.com`) or `*.example.com` for the wildcard. This fields corresponds to the `dns-zone` in the scaleway API documentation. | ||||
francesco086 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- `"secret_key"` | ||||
|
||||
### Optional parameters | ||||
|
||||
- `"ip_version"` can be `"ipv4"` or `"ipv6"`. It defaults to `"ipv4"`. | ||||
- `"ipv6_suffix"` is the suffix to append to the IPv6 address. It defaults to `""`. | ||||
- `"field_type"` is the type of DNS record to update. It can be `"A"` or `"AAAA"`. It defaults to `"A"`. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should not need this, it should be deducted from the public IP address obtained and "ip_version" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uhm... again can you help me here? Do you have already a function that is able to distinguish between the two? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just found it in one of your comment below. Will change this in a moment! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. field_type is still in the documentation 😉 Please remove 🙏 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. argh sorry... missed the second entry... Now it is removed for good! |
||||
- `"field_name"` is the name of the DNS record to update. For example, it could be `"www"`, `"@"` or `"*"` for the wildcard. It defaults to to `""` (equivalent to `"@"`). | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should not need this, it should be deducted from the "domain" field There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please help me out here. How should I extract this? The only way I can imagine is to count how many There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The upper layers of ddns-updater takes care of extracting it: ddns-updater/internal/params/json.go Line 231 in 20ac110
It's a bit more complicated than the number of dots, it uses the "effective TLD + 1" mechanism to do this (i.e. some effective TLDs are So just use the domain and owner strings from calling layers 😉 - it's already parsed and ready to use for you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, it took me a while to understand what you mean and especialyl how this maps to the scaleway api, but I think I sorted out! I removed the field_name both in the code and documentation, and tested that everything works correctly. |
||||
- `"ttl"` is the TTL of the DNS record to update. It defaults to `3600`. | ||||
|
||||
## Domain setup | ||||
|
||||
If you need more information about how to configure your domain, you can check the [scaleway official documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/). |
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.
Yeah let's revert this otherwise the git history is going to look all weird; Note you can open the vscode command palette and hit "save without formatting" 😉
I would however be okay with a separate PR to auto-format this + perhaps enforce this in the CI 🤔
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.
done 😄
I am happy to do this in a separate PR. I am not sure of a way to enforce this in CI, but I guess there must be a way.
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.
Have a look at the .github/workflows/markdown.yml there might be rules you can set in the linter 😉
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 opened an issue #908 (comment)
Will be happy to contribute 😄