Add primary (write) Services to authoritative + externaldns (#229)

**Stacked on #228** (needs operator v0.1.5). Merge #228 first; the diff collapses to just this after.

## Why
Writes (RFC2136/nsupdate) must go to pod-0 — the round-robin read Service would land them on a secondary (rejected). Adds a dedicated write endpoint per cluster (operator v0.1.5 `primaryService`).

## Changes
- `bind-authoritative`: LoadBalancer write endpoint on **198.18.200.9** (`bind-authoritative-primary`)
- `bind-externaldns`: ClusterIP write endpoint (`bind-externaldns-primary`, for in-cluster writers)
- regenerate the bindcluster kubeconform schema (primaryService + externalTrafficPolicy)

## Deferred
external-dns is **not** repointed at `bind-externaldns-primary` yet: it authenticates with the existing TSIG key, which the operator-generated key won't match until the planned Vault-sync + secret-reflection features exist. Until then external-dns keeps writing to the puppet externaldns.

## Validated
kustomize build + kubeconform (3 BindClusters valid against the v0.1.5 schema).

---------

Co-authored-by: BenVincent <benvin@main.unkin.net>
Reviewed-on: #229
Co-authored-by: Ben Vincent <ben@unkin.net>
Co-committed-by: Ben Vincent <ben@unkin.net>
This commit was merged in pull request #229.
This commit is contained in:
2026-07-05 16:37:49 +10:00
committed by BenVincent
parent 15e70404ae
commit e030f07986
4 changed files with 47 additions and 0 deletions
@@ -18,10 +18,17 @@ spec:
- "allow-query { auth-acl-main; 10.42.0.0/16; }" - "allow-query { auth-acl-main; 10.42.0.0/16; }"
service: service:
type: LoadBalancer type: LoadBalancer
externalTrafficPolicy: Local
annotations: annotations:
purelb.io/service-group: common purelb.io/service-group: common
purelb.io/addresses: 198.18.200.6 purelb.io/addresses: 198.18.200.6
external-dns.alpha.kubernetes.io/hostname: bind-authoritative.k8s.syd1.au.unkin.net external-dns.alpha.kubernetes.io/hostname: bind-authoritative.k8s.syd1.au.unkin.net
primaryService:
type: LoadBalancer
annotations:
purelb.io/service-group: common
purelb.io/addresses: 198.18.200.9
external-dns.alpha.kubernetes.io/hostname: bind-authoritative-primary.k8s.syd1.au.unkin.net
resources: resources:
requests: requests:
cpu: 100m cpu: 100m
@@ -14,10 +14,13 @@ spec:
storageSize: 1Gi storageSize: 1Gi
service: service:
type: LoadBalancer type: LoadBalancer
externalTrafficPolicy: Local
annotations: annotations:
purelb.io/service-group: common purelb.io/service-group: common
purelb.io/addresses: 198.18.200.8 purelb.io/addresses: 198.18.200.8
external-dns.alpha.kubernetes.io/hostname: bind-externaldns.k8s.syd1.au.unkin.net external-dns.alpha.kubernetes.io/hostname: bind-externaldns.k8s.syd1.au.unkin.net
primaryService:
type: ClusterIP
resources: resources:
requests: requests:
cpu: 100m cpu: 100m
@@ -13,6 +13,7 @@ spec:
storageSize: 1Gi storageSize: 1Gi
service: service:
type: LoadBalancer type: LoadBalancer
externalTrafficPolicy: Local
annotations: annotations:
purelb.io/service-group: common purelb.io/service-group: common
purelb.io/addresses: 198.18.200.7 purelb.io/addresses: 198.18.200.7
@@ -692,6 +692,35 @@
}, },
"type": "object" "type": "object"
}, },
"primaryService": {
"properties": {
"annotations": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"externalTrafficPolicy": {
"enum": [
"Cluster",
"Local"
],
"type": "string"
},
"loadBalancerIP": {
"type": "string"
},
"type": {
"enum": [
"ClusterIP",
"LoadBalancer",
"NodePort"
],
"type": "string"
}
},
"type": "object"
},
"recursion": { "recursion": {
"type": "boolean" "type": "boolean"
}, },
@@ -765,6 +794,13 @@
}, },
"type": "object" "type": "object"
}, },
"externalTrafficPolicy": {
"enum": [
"Cluster",
"Local"
],
"type": "string"
},
"loadBalancerIP": { "loadBalancerIP": {
"type": "string" "type": "string"
}, },