Skip to content

GIGAHOST: Add Gigahost DNS provider#4394

Merged
TomOnTime merged 3 commits into
DNSControl:mainfrom
jochristian:add-gigahost-provider
Jul 8, 2026
Merged

GIGAHOST: Add Gigahost DNS provider#4394
TomOnTime merged 3 commits into
DNSControl:mainfrom
jochristian:add-gigahost-provider

Conversation

@jochristian

Copy link
Copy Markdown
Collaborator

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.

@TomOnTime

Copy link
Copy Markdown
Collaborator

Thank you for submitting this PR. I'll review it in the coming week.

In the meanwhile, let's set up credentials so that the provider can be added to our automated testing system. Instructions are here: https://docs.dnscontrol.org/developer-info/byo-secrets#donate-secrets-to-the-project

@jochristian

jochristian commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @TomOnTime, I will check whats possible to do for Gigahost regarding automatic testing.

@TomOnTime

Copy link
Copy Markdown
Collaborator

Please resolve the conflicts and I'll do another quick review. We should be able to get this into the next release. Thanks!

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.
@jochristian jochristian force-pushed the add-gigahost-provider branch from 9b1fcc2 to a00aa3f Compare July 8, 2026 12:29
@jochristian

Copy link
Copy Markdown
Collaborator Author

Hi @TomOnTime, the conflict should have been resolved now.

@TomOnTime

Copy link
Copy Markdown
Collaborator

Thank you for contributing this new provider, @jochristian !

Three notes:

  1. By now you should have received a Github invite to have the "triage" role for this repo. Please accept the invite so we can assign bugs to you.
  2. @fm: Faisal Misle is our “liaison to maintainers”. Please send him an email from your preferred address to dnscontrol so we can stay in touch? His email address is f at faisal dot fm
  3. Please consider setting up a test account for use by our automated testing. This will mean we can test the provider every release in an automated manner. Info is here: https://docs.dnscontrol.org/developer-info/byo-secrets#donate-secrets-to-the-project

@TomOnTime TomOnTime merged commit 3d0372b into DNSControl:main Jul 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants