GIGAHOST: Add Gigahost DNS provider#4394
Open
jochristian wants to merge 2 commits into
Open
Conversation
Add a DnsProvider (not a registrar) for Gigahost (https://gigahost.no), the Norwegian host. Supports get-zones, preview, and push for A/AAAA/CNAME/MX/TXT/NS records using diff2.ByRecord() with Gigahost's per-record IDs. Implementation notes: - API IDs are JSON strings; record_priority/record_ttl can arrive as quoted strings or null, handled by a flexUint custom unmarshaler. - The records endpoint returns an apex SOA which is ignored on read. - DELETE requires name+type+value query params: name+type alone removes the entire RRset, so value is needed to delete a single record when several share a name+type (round-robin A, multiple MX/TXT). - GetNameservers returns Gigahost's fixed nameservers ns1/ns2/ns3.gigahost.no. - 30s HTTP client timeout and url.PathEscape on path IDs. Registration, docs (provider page + SUMMARY), and an integrationTest profile are included. Generated files (CODEOWNERS, labeler.yml, .goreleaser.yml, provider/index.md) were refreshed via `go generate`; that run also synced pre-existing upstream drift (DYNU rows, dynu/bunny goreleaser tokens) required to keep the go-generate CI check clean. Verified end-to-end against a live zone: create/change/delete round-trip for all supported types plus round-robin delete; zone restored after.
Enable the optional record types the Gigahost API accepts (verified by
probing the live API). CAA, SRV, and NAPTR are stored as full RFC1035
presentation strings in record_value (no record_priority), mapped via
GetTargetCombined on write and SetTarget{CAA,SRV,NAPTR}String on read.
ALIAS/PTR/DNAME are hostname-target types handled like CNAME/NS.
Adds rejectif audits for CAA (whitespace) and SRV (null target), and
documents the supported/unsupported type list.
Verified end-to-end on a live zone: create/change/delete round-trip and
idempotency for all six new types; zone restored afterward. TLSA, SSHFP,
HTTPS, SVCB, DS, LOC, SPF, ANAME, CERT are rejected by the API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds a DNS Service Provider for Gigahost (a Norwegian host). This is a DnsProvider only — not a registrar.
Capabilities
get-zones,preview, andpushdiff2.ByRecord()(Gigahost assigns a per-record ID)A,AAAA,CNAME,MX,TXT,NS, plusALIAS,CAA,DNAME,NAPTR,PTR,SRVGetNameserversreturns Gigahost's fixed nameservers (ns1/ns2/ns3.gigahost.no)ListZonessupported; zone creation is not (zones must exist in the Gigahost panel)API notes handled
record_priority/record_ttlmay be quoted strings ornull(handled by a tolerant unmarshaler).SOAthat is ignored on read.DELETErequiresname+type+valuequery params:name+typealone removes the entire RRset, sovalueis needed to delete a single record when several share a name+type (round-robinA, multipleMX/TXT).CAA/SRV/NAPTRare stored as full RFC1035 presentation strings inrecord_value.TLSA,SSHFP,HTTPS,SVCB,DS,LOC, …) are rejected by the API and left untouched if already present.Testing
Verified end-to-end against a live zone: create → idempotency → change → idempotency → delete round-trips for every supported record type (including round-robin delete); the zone was restored to its original state afterward.
Config
{ "gigahost": { "TYPE": "GIGAHOST", "apikey": "flux_live_your-api-key" } }Includes the provider docs page,
SUMMARY.mdentry, anintegrationTestprofile, and regenerated files viabin/generate-all.sh.