Consolidate BIND DNS into one bind-internal namespace (#225)
**HOLD until v0.1.3 is tagged/built** (operator #4 merged + tagged) — this PR bumps the operator to v0.1.3, whose CRD adds the `clusterRef` field these keys use. ## Why Put all BIND DNS services in one `bind-internal` namespace and name the StatefulSets clearly. ## Changes - 3 clusters consolidated into `bind-internal`, StatefulSets renamed **bind-authoritative** / **bind-resolvers** / **bind-externaldns**; LBs kept on 198.18.200.6/.7/.8; external-dns hostnames renamed to match - `clusterRef` added to `transfer-key` (→ bind-authoritative) and `externaldns-key` (→ bind-externaldns) so keys are scoped per cluster - removed the old `ns-auth`/`ns-resolver`/`ns-externaldns` apps; ApplicationSet + AppProject now list `bind-internal` - bumped `bind-system` operator to **v0.1.3** (CRD link + image) - operator stays in `bind-system` ## Deploy impact ArgoCD prunes the old ns-* namespaces (StatefulSets/PVCs — data is only seed SOA+NS, no migrated records yet) and creates the renamed clusters in bind-internal. ## Validated `kustomize build` → 28 docs (3 BindCluster, 20 BindZone, 2 catalog, 2 keys, ns); kubeconform clean. Reviewed-on: #225 Co-authored-by: Ben Vincent <ben@unkin.net> Co-committed-by: Ben Vincent <ben@unkin.net>
This commit was merged in pull request #225.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
---
|
||||
# external-dns tier (replaces the 3x Puppet external-dns servers). An ordinary
|
||||
# authoritative cluster; external-dns writes to its zones via RFC2136 because
|
||||
# those BindZones set dynamicUpdate (allow-update { key externaldns-key; }).
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindCluster
|
||||
metadata:
|
||||
name: bind-externaldns
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
mode: authoritative
|
||||
replicas: 3
|
||||
storageClassName: cephrbd-fast-delete
|
||||
storageSize: 1Gi
|
||||
service:
|
||||
type: LoadBalancer
|
||||
annotations:
|
||||
purelb.io/service-group: common
|
||||
purelb.io/addresses: 198.18.200.8
|
||||
external-dns.alpha.kubernetes.io/hostname: bind-externaldns.k8s.syd1.au.unkin.net
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
---
|
||||
# Catalog zone so the dynamic zones replicate onto the cluster's secondaries
|
||||
# (external-dns writes to the primary; secondaries IXFR the result).
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindCatalogZone
|
||||
metadata:
|
||||
name: bind-externaldns-catalog
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: bind-externaldns
|
||||
zoneName: catalog.externaldns.internal
|
||||
transferKeyRef: externaldns-key
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- cluster.yaml
|
||||
- tsigkey.yaml
|
||||
- zones.yaml
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
# Key that external-dns (and DNSRecord objects) use to send RFC2136 dynamic
|
||||
# updates to the primary. The operator generates the material into a Secret.
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindTSIGKey
|
||||
metadata:
|
||||
name: externaldns-key
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: bind-externaldns
|
||||
algorithm: hmac-sha256
|
||||
@@ -0,0 +1,34 @@
|
||||
# k8s external-dns zones migrated from puppet-prod
|
||||
# (externaldns::k8s_zones in hieradata/roles/infra/dns/externaldns.yaml).
|
||||
# Primary + dynamicUpdate: the Kubernetes external-dns controller writes
|
||||
# records here via RFC2136 authenticated with externaldns-key.
|
||||
---
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: k8s-syd1-au-unkin-net
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: bind-externaldns
|
||||
zoneName: k8s.syd1.au.unkin.net
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
dynamicUpdate: true
|
||||
updateKeyRef: externaldns-key
|
||||
allowTransfer:
|
||||
- key externaldns-key
|
||||
---
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 200-18-198-in-addr-arpa
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: bind-externaldns
|
||||
zoneName: 200.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
dynamicUpdate: true
|
||||
updateKeyRef: externaldns-key
|
||||
allowTransfer:
|
||||
- key externaldns-key
|
||||
Reference in New Issue
Block a user