Skip to content

GIGAHOST: Add Gigahost DNS provider#4394

Open
jochristian wants to merge 2 commits into
DNSControl:mainfrom
jochristian:add-gigahost-provider
Open

GIGAHOST: Add Gigahost DNS provider#4394
jochristian wants to merge 2 commits into
DNSControl:mainfrom
jochristian:add-gigahost-provider

Conversation

@jochristian

Copy link
Copy Markdown

Overview

Adds a DNS Service Provider for Gigahost (a Norwegian host). This is a DnsProvider only — not a registrar.

Capabilities

  • get-zones, preview, and push
  • Diff strategy: diff2.ByRecord() (Gigahost assigns a per-record ID)
  • Record types: A, AAAA, CNAME, MX, TXT, NS, plus ALIAS, CAA, DNAME, NAPTR, PTR, SRV
  • GetNameservers returns Gigahost's fixed nameservers (ns1/ns2/ns3.gigahost.no)
  • ListZones supported; zone creation is not (zones must exist in the Gigahost panel)

API notes handled

  • All IDs arrive as JSON strings; record_priority/record_ttl may be quoted strings or null (handled by a tolerant unmarshaler).
  • The records endpoint returns an apex SOA that 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).
  • CAA/SRV/NAPTR are stored as full RFC1035 presentation strings in record_value.
  • Unsupported types (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.md entry, an integrationTest profile, and regenerated files via bin/generate-all.sh.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant