Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
89c5008
feat: Package the internal DNS control plane and serving agents
scotwells Oct 12, 2026
75ecde9
Use scoped API roles for private DNS service access
scotwells Oct 12, 2026
04aedab
Scope admission to DNS relationships and publisher freshness
scotwells Oct 12, 2026
d3c8d4f
Scope private DNS customer configuration to project roles
scotwells Oct 12, 2026
cecc99d
fix: Align DNS integration boundaries
scotwells Oct 13, 2026
1e527b2
refactor: Consolidate DNS outage behavior
scotwells Oct 13, 2026
434147d
fix: Keep DNS stack tests buildable
scotwells Oct 13, 2026
e6aa134
refactor: Consolidate DNS continuity behavior
scotwells Oct 13, 2026
a0b9227
refactor: Simplify private DNS integration
scotwells Oct 13, 2026
35a2fb4
refactor: Keep DNS permissions aligned with APIs
scotwells Oct 13, 2026
fb10fca
fix: Keep DNS review branches buildable
scotwells Oct 13, 2026
c72243c
fix: Align DNS validation and permission checks
scotwells Oct 13, 2026
21110e8
docs: Describe DNS mapping validation
scotwells Oct 13, 2026
ae9b3c5
docs: Describe DNS mappings and reference validation
scotwells Oct 13, 2026
16e8c66
feat: Simplify private DNS publication and access
scotwells Oct 13, 2026
4705327
fix: Preserve source lifetimes across DNS takeover
scotwells Oct 13, 2026
08632dc
fix: Use authoritative DNS reads consistently
scotwells Oct 13, 2026
bfb0b4a
fix: Preserve DNS readiness during reconciliation
scotwells Oct 13, 2026
468ac0a
fix: Preserve independent DNS review builds
scotwells Oct 13, 2026
b72ae07
test: Wait for both resolver probe observations
scotwells Oct 13, 2026
f20efa0
feat: Publish automatic private DNS staging builds
scotwells Oct 13, 2026
08eeea3
test: Isolate PowerDNS fixture HTTP transports
scotwells Oct 13, 2026
3422f26
fix: Include serving readiness dependencies
scotwells Oct 13, 2026
28df6ae
feat: Discover internal DNS project sources
scotwells Oct 13, 2026
b5b8575
test: Keep discovery fixtures self-contained
scotwells Oct 13, 2026
9241d11
fix: Retain project sources through cleanup
scotwells Oct 13, 2026
7752b35
fix: Observe project lifetime before compilation
scotwells Oct 13, 2026
43ad254
Merge branch 'fix/serving-continuity-pr237' into fix/serving-continui…
scotwells Oct 13, 2026
78c1f20
Run DNS daemons and readiness independently of the agent
scotwells Oct 13, 2026
66886ee
Merge branch 'fix/serving-continuity-pr237' into fix/serving-continui…
scotwells Oct 13, 2026
c06e790
Merge branch 'fix/serving-continuity-pr237' into fix/serving-continui…
scotwells Oct 13, 2026
866b1ae
chore: Sync private DNS stack with main
scotwells Oct 14, 2026
518b003
chore: sync CoreDNS recovery parent
scotwells Oct 14, 2026
fc1f3ad
feat: package the CoreDNS serving fleet
scotwells Oct 14, 2026
3a4297e
test: scope runtime checks to its API
scotwells Oct 14, 2026
c917421
fix: validate the packaged CoreDNS entry point
scotwells Oct 14, 2026
cbc2202
chore: sync CoreDNS recovery validation
scotwells Oct 14, 2026
df4281f
chore: sync serving lint validation
scotwells Oct 14, 2026
cc7791a
style: format the CoreDNS command imports
scotwells Oct 14, 2026
315b600
chore: sync context test validation
scotwells Oct 14, 2026
54cd50c
Merge branch 'coredns/update-pr237-20261014' into coredns/compat-pr23…
scotwells Oct 14, 2026
75ec4a5
feat: run upstream dnsdist directly
scotwells Oct 15, 2026
fbcf54a
fix: detect native dnsdist console clients
scotwells Oct 15, 2026
e891d53
fix: confirm native DNS routing activation
scotwells Oct 15, 2026
b8d2bf8
fix: use DNS query readiness for routers
scotwells Oct 15, 2026
696cb2b
chore: sync internal DNS with main
scotwells Oct 20, 2026
d4e10cd
chore: merge latest parent branch
scotwells Oct 21, 2026
ef31fc0
chore: refresh stacked validation
scotwells Oct 21, 2026
87d8a72
chore: merge DNS environment preparation
scotwells Oct 21, 2026
f5852a0
fix: isolate internal DNS deployment dependencies
scotwells Oct 22, 2026
0d0397c
fix: separate DNS query processes from broker credentials
scotwells Oct 22, 2026
15315f6
fix: limit process signaling to CoreDNS agents
scotwells Oct 22, 2026
c0a8af4
fix: retain serving permissions after interrupted state writes
scotwells Oct 22, 2026
cd34442
docs: explain DNS process credential boundaries
scotwells Oct 22, 2026
33f92d6
Merge commit 'e74eaa2' into codex/dns-review-238
scotwells Oct 22, 2026
911bf93
Merge commit '0f08c61' into codex/dns-review-238
scotwells Oct 22, 2026
6df37c5
Merge commit '6fb1d79' into codex/dns-review-238
scotwells Oct 22, 2026
20555ce
Merge branch 'feat/internal-dns-serving-recovery' into feat/internal-…
scotwells Oct 22, 2026
0b2f7bc
Merge branch 'feat/internal-dns-serving-recovery' into feat/internal-…
scotwells Oct 22, 2026
def7b5a
Merge branch 'feat/internal-dns-serving-recovery' into feat/internal-…
scotwells Oct 22, 2026
2fe3c11
Merge branch 'feat/internal-dns-serving-recovery' into feat/internal-…
scotwells Oct 22, 2026
4b0ef65
Merge branch 'feat/internal-dns-serving-recovery' into feat/internal-…
scotwells Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,53 @@ jobs:
# release would not even match each other.
image-overlays: config/manager,config/agent,config/components/dns-mcp
secrets: inherit

publish-internal-dns-runtime:
permissions:
id-token: write
contents: read
packages: write
attestations: write
uses: datum-cloud/actions/.github/workflows/publish-docker.yaml@v1.14.0
with:
image-name: internal-dns
dockerfile-path: config/internal-dns/Dockerfile
target: runtime
platforms: linux/amd64,linux/arm64
secrets: inherit

publish-internal-dns-serving:
permissions:
id-token: write
contents: read
packages: write
attestations: write
uses: datum-cloud/actions/.github/workflows/publish-docker.yaml@v1.14.0
with:
image-name: internal-dns-serving
dockerfile-path: config/internal-dns/Dockerfile
target: serving
platforms: linux/amd64,linux/arm64
secrets: inherit

publish-internal-dns-builds:
if: github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/fix/internal-dns-name-references' || startsWith(github.ref, 'refs/tags/')))
needs: [publish-internal-dns-runtime, publish-internal-dns-serving, publish-kustomize-bundles]
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: fluxcd/flux2/action@v2.7.5
- name: Publish the runtime and serving image pair
env:
RUNTIME_TAG: ${{ needs.publish-internal-dns-runtime.outputs.tag }}
SERVING_TAG: ${{ needs.publish-internal-dns-serving.outputs.tag }}
run: hack/publish-internal-dns-channel.sh
52 changes: 52 additions & 0 deletions cmd/internal-dns-coredns/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// SPDX-License-Identifier: AGPL-3.0-only

package main

import (
"context"
"flag"
"fmt"
"os"
"os/signal"
"syscall"

"runtime/debug"

"go.miloapis.com/dns-operator/internal/internaldns/coredns"
)

func main() {
flags := flag.NewFlagSet("coredns", flag.ExitOnError)
var path string
var validate, version bool
flags.StringVar(&path, "config", "", "Absolute path to the DNS context snapshot")
flags.BoolVar(&validate, "validate", false, "Validate the DNS context snapshot and exit")
flags.BoolVar(&version, "version", false, "Print the CoreDNS version and exit")
if err := flags.Parse(os.Args[1:]); err != nil {
os.Exit(2)
}
if version {
version := "unknown"
if info, ok := debug.ReadBuildInfo(); ok {
for _, dep := range info.Deps {
if dep.Path == "github.com/coredns/coredns" {
version = dep.Version
}
}
}
fmt.Printf("CoreDNS %s; dnscontext plugin\n", version)
return
}
var err error
if validate {
_, err = coredns.Load(path)
} else {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()
err = coredns.Run(ctx, path)
}
if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "CoreDNS: %v\n", err)
os.Exit(1)
}
}
41 changes: 41 additions & 0 deletions cmd/internal-dns/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-License-Identifier: AGPL-3.0-only

package main

import (
"flag"
"fmt"
"os"

internruntime "go.miloapis.com/dns-operator/internal/internaldns/runtime"
_ "k8s.io/client-go/plugin/pkg/client/auth"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

func main() {
var role, configPath, kubeconfig string
flag.StringVar(&role, "role", "", "Process role: control-plane, agent, serving, readiness, or prepare")
flag.StringVar(&configPath, "config", "", "Absolute path to the internal DNS JSON configuration")
// controller-runtime/client-go may install this standard flag from an init
// hook. Reuse it when present so the command keeps one stable contract.
if flag.Lookup("kubeconfig") == nil {
flag.StringVar(&kubeconfig, "kubeconfig", "", "Control-plane Kubernetes configuration; ignored by serving processes")
}
logOptions := zap.Options{Development: false}
logOptions.BindFlags(flag.CommandLine)
flag.Parse()
if existing := flag.Lookup("kubeconfig"); existing != nil {
kubeconfig = existing.Value.String()
}
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&logOptions)))

cfg, err := internruntime.LoadConfig(configPath)
if err == nil {
err = internruntime.Run(ctrl.SetupSignalHandler(), role, cfg, kubeconfig)
}
if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "internal-dns: %v\n", err)
os.Exit(1)
}
}
39 changes: 39 additions & 0 deletions config/internal-dns/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# syntax=docker/dockerfile:1.7

FROM --platform=$BUILDPLATFORM golang:1.26 AS build
ARG TARGETOS=linux
ARG TARGETARCH
WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod go mod download
COPY cmd/internal-dns ./cmd/internal-dns
COPY cmd/internal-dns-coredns ./cmd/internal-dns-coredns
COPY api ./api
COPY internal ./internal
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -trimpath -tags netgo,osusergo -ldflags='-s -w' \
-o /out/internal-dns ./cmd/internal-dns && \
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -trimpath -o /out/coredns ./cmd/internal-dns-coredns

FROM scratch AS runtime
COPY --from=build /out/internal-dns /internal-dns
USER 65532:65532
ENTRYPOINT ["/internal-dns"]

FROM powerdns/dnsdist-20:2.0.10@sha256:24ac720af997aff6b98cb5b50d748754f815428e07b5368dfb0eccd5aa8d07e8 AS serving
USER 0:0
RUN apt-get update && apt-get install --no-install-recommends -y \
pdns-recursor iproute2 procps netcat-openbsd ca-certificates bash && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /out/internal-dns /internal-dns
COPY --from=build /out/coredns /usr/local/bin/coredns
COPY config/internal-dns/commands/ /usr/local/sbin/
USER 65532:65532
RUN for tool in bash ip nc coredns dnsdist pdns_recursor; do \
command -v "$tool" >/dev/null || exit 1; \
done && test -x /internal-dns && coredns -version
RUN for helper in /usr/local/sbin/internal-dns-*; do \
test -x "$helper" && bash -n "$helper" || exit 1; \
done
ENTRYPOINT ["/internal-dns"]
6 changes: 6 additions & 0 deletions config/internal-dns/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**
!**/*.go
**/*_test.go
!go.mod
!go.sum
!config/internal-dns/commands/**
Loading
Loading