GCORE: add SVCB and HTTPS support (#2983)

This commit is contained in:
Yuhui Xu 2024-06-04 11:00:10 -07:00 committed by GitHub
parent f029c9bc01
commit b47ac0df03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 1 deletions

View file

@ -35,7 +35,7 @@ If a feature is definitively not supported for whatever reason, we would also li
| [`EXOSCALE`](provider/exoscale.md) | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ❔ | ❔ | ❌ | ❔ | ✅ | ❔ | ✅ | ❔ | ❔ | ❌ | ❔ | ❔ | ❔ | ❔ | ❌ | ❌ | ❔ |
| [`GANDI_V5`](provider/gandi_v5.md) | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ❔ | ❔ | ❌ | ❔ | ✅ | ❔ | ✅ | ✅ | ❔ | ✅ | ❌ | ❔ | ❔ | ❔ | ❔ | ❌ | ✅ |
| [`GCLOUD`](provider/gcloud.md) | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❔ | ✅ | ❌ | ❔ | ✅ | ❔ | ✅ | ✅ | ✅ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`GCORE`](provider/gcore.md) | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❔ | ❌ | ❌ | ✅ | ❔ | ✅ | ❌ | ❔ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`GCORE`](provider/gcore.md) | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ✅ | ❌ | ✅ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`HEDNS`](provider/hedns.md) | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`HETZNER`](provider/hetzner.md) | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❔ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❔ | ✅ | ✅ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`HEXONET`](provider/hexonet.md) | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ❔ | ✅ | ❔ | ❔ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ❔ |

View file

@ -45,6 +45,11 @@ func nativeToRecords(n gcoreRRSetExtended, zoneName string) ([]*models.RecordCon
return nil, fmt.Errorf("unparsable record received from G-Core: %w", err)
}
case "SCVB": // GCore mistypes "SVCB" as "SCVB"
if err := rc.PopulateFromString("SVCB", value.ContentToString(), zoneName); err != nil {
return nil, fmt.Errorf("unparsable record received from G-Core: %w", err)
}
default: // "A", "AAAA", "CAA", "NS", "CNAME", "MX", "PTR", "SRV"
if err := rc.PopulateFromString(recType, value.ContentToString(), zoneName); err != nil {
return nil, fmt.Errorf("unparsable record received from G-Core: %w", err)
@ -90,6 +95,13 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) *
Meta: nil,
Enabled: true,
}
case "SVCB":
// GCore mistypes "SVCB" as "SCVB"
rr = dnssdk.ResourceRecord{
Content: dnssdk.ContentFromValue("SCVB", r.GetTargetCombined()),
Meta: nil,
Enabled: true,
}
default:
rr = dnssdk.ResourceRecord{
Content: dnssdk.ContentFromValue(key.Type, r.GetTargetCombined()),

View file

@ -55,6 +55,8 @@ var features = providers.DocumentationNotes{
providers.CanUseSRV: providers.Can("G-Core doesn't support SRV records with empty targets"),
providers.CanUseSSHFP: providers.Cannot(),
providers.CanUseTLSA: providers.Cannot(),
providers.CanUseHTTPS: providers.Can(),
providers.CanUseSVCB: providers.Can(),
providers.DocCreateDomains: providers.Can(),
providers.DocDualHost: providers.Can(),
providers.DocOfficiallySupported: providers.Cannot(),