Skip to content

Add native ExternalDNS support for template-defined SRV records #1006

Open

Description

@Baylem

I currently use a custom bridge to translate Gameplane servers into ExternalDNS records. I'd like Gameplane to handle that directly, with SRV records defined by the game template.

Gameplane already supports ExternalDNS hostname annotations. Extend that support so a template can declare an SRV service and protocol, reference a named advertised port, and set priority and weight. This would let Minecraft Java players connect using the server's hostname when its public port differs from the default.

For example, a Minecraft Java template could declare _minecraft._tcp for its game port. With hostname play.example.com reaching a node at allocated NodePort 31234, and no upstream port translation, the record would be:

_minecraft._tcp.play.example.com. SRV 0 0 31234 play.example.com.

The integration should:

  • Resolve the advertised host and port from the server's effective external mapping, including overrides, Kubernetes allocations, and any supported NAT or forwarding-edge mapping.
  • Use the server's effective template revision and validate references to advertised ports.
  • Update owned records when the hostname, port, or template changes, and withdraw them when publication is disabled or the server is deleted.
  • Document supported exposure modes and report unresolved endpoints or missing dependencies.
  • Preserve existing hostname annotation behavior and leave provider credentials and DNS writes with ExternalDNS.

Reconciling ExternalDNS DNSEndpoint resources is one option; its CRD source supports SRV records. The schema and integration mechanism can be settled during implementation.

Relationship to #999 and #1001

These features complement one another. This integration should not require either PR: support fixed or overridden ports and Kubernetes-allocated NodePorts as well. When port pools are in use, resolve their resulting Service mapping.

Resolve the port players reach

Select the named advertised port from the server's effective template revision, then resolve its external mapping from reconciled resources and any supported public mapping configuration:

Exposure Port to publish in SRV
Service / LoadBalancer exposed without upstream port translation The corresponding Service.spec.ports[].port, including overrides or pool allocation, provided that Service endpoint is externally reachable.
NodePort exposed without upstream port translation The corresponding Service port's actual nodePort, including an explicit override or Kubernetes allocation.
NAT / forwarding edge The public port from an explicit or authoritative mapping for the advertised hostname. It may differ from both the Service port and NodePort.

For example, play.example.com:40000 -> node:31234 -> Service:25570 -> container:25565 requires SRV port 40000.

Do not infer the public port from the template's container port, a pool annotation alone, or a Service port when exposure uses NodePort or NAT. A ClusterIP alone does not establish external reachability. Preserve the distinction between the assigned Service address and the advertised connection address.

If the required external mapping is unknown or unsupported, report that state and withhold or withdraw the owned SRV record rather than publish a guessed port. Reconcile records when the effective mapping changes, including Kubernetes allocations and supported NAT mapping changes. Gateway route provisioning remains outside this issue; document which mapping sources and exposure modes the integration supports.

Activity

  1. added
    area: modules
    area: operator
    type: feature
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: modulesarea: operatortype: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions