Consolidate BIND DNS into one bind-internal namespace
Reshapes the three DNS tiers from separate ns-* namespaces into a single bind-internal namespace and renames the StatefulSets, and scopes the TSIG keys to their cluster (needs the clusterRef field from operator v0.1.3). - move the 3 clusters + zones + keys into apps/base/bind-internal: BindCluster names bind-authoritative / bind-resolvers / bind-externaldns (= StatefulSet names), LBs kept on .6/.7/.8, external-dns hostnames renamed - add clusterRef to the transfer-key (bind-authoritative) and externaldns-key (bind-externaldns) TSIG keys so they no longer leak across clusters - remove the old ns-auth / ns-resolver / ns-externaldns apps - ApplicationSet + AppProject: replace the three ns-* entries with bind-internal - bump bind-system operator to v0.1.3 (CRD install link + image) so the CRDs understand the new clusterRef field - operator stays in bind-system (unchanged)
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindCluster
|
||||
metadata:
|
||||
name: auth
|
||||
namespace: ns-auth
|
||||
name: bind-authoritative
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
mode: authoritative
|
||||
replicas: 3
|
||||
@@ -16,7 +16,7 @@ spec:
|
||||
annotations:
|
||||
purelb.io/service-group: common
|
||||
purelb.io/addresses: 198.18.200.6
|
||||
external-dns.alpha.kubernetes.io/hostname: ns-auth.k8s.syd1.au.unkin.net
|
||||
external-dns.alpha.kubernetes.io/hostname: bind-authoritative.k8s.syd1.au.unkin.net
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
@@ -29,9 +29,9 @@ spec:
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindCatalogZone
|
||||
metadata:
|
||||
name: auth-catalog
|
||||
namespace: ns-auth
|
||||
name: bind-authoritative-catalog
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: catalog.internal
|
||||
transferKeyRef: transfer-key
|
||||
+1
-2
@@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- tsigkey.yaml
|
||||
- cluster.yaml
|
||||
- tsigkey.yaml
|
||||
- zones.yaml
|
||||
@@ -5,6 +5,7 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindTSIGKey
|
||||
metadata:
|
||||
name: transfer-key
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: bind-authoritative
|
||||
algorithm: hmac-sha256
|
||||
@@ -9,9 +9,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: unkin-net
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: unkin.net
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -20,9 +20,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: main-unkin-net
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: main.unkin.net
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -31,9 +31,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 13-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 13.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -42,9 +42,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 14-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 14.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -53,9 +53,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 15-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 15.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -64,9 +64,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 16-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 16.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -75,9 +75,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 17-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 17.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -86,9 +86,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 19-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 19.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -97,9 +97,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 20-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 20.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -108,9 +108,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 21-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 21.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -119,9 +119,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 22-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 22.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -130,9 +130,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 23-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 23.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -141,9 +141,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 24-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 24.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -152,9 +152,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 25-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 25.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -163,9 +163,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 26-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 26.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -174,9 +174,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 27-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 27.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -185,9 +185,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 28-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 28.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -196,9 +196,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 29-18-198-in-addr-arpa
|
||||
namespace: ns-auth
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: auth
|
||||
clusterRef: bind-authoritative
|
||||
zoneName: 29.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
+6
-6
@@ -5,8 +5,8 @@
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindCluster
|
||||
metadata:
|
||||
name: externaldns
|
||||
namespace: ns-externaldns
|
||||
name: bind-externaldns
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
mode: authoritative
|
||||
replicas: 3
|
||||
@@ -17,7 +17,7 @@ spec:
|
||||
annotations:
|
||||
purelb.io/service-group: common
|
||||
purelb.io/addresses: 198.18.200.8
|
||||
external-dns.alpha.kubernetes.io/hostname: ns-externaldns.k8s.syd1.au.unkin.net
|
||||
external-dns.alpha.kubernetes.io/hostname: bind-externaldns.k8s.syd1.au.unkin.net
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
@@ -31,9 +31,9 @@ spec:
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindCatalogZone
|
||||
metadata:
|
||||
name: externaldns-catalog
|
||||
namespace: ns-externaldns
|
||||
name: bind-externaldns-catalog
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: externaldns
|
||||
clusterRef: bind-externaldns
|
||||
zoneName: catalog.externaldns.internal
|
||||
transferKeyRef: externaldns-key
|
||||
+1
-2
@@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- tsigkey.yaml
|
||||
- cluster.yaml
|
||||
- tsigkey.yaml
|
||||
- zones.yaml
|
||||
+2
-1
@@ -5,6 +5,7 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindTSIGKey
|
||||
metadata:
|
||||
name: externaldns-key
|
||||
namespace: ns-externaldns
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: bind-externaldns
|
||||
algorithm: hmac-sha256
|
||||
+4
-4
@@ -7,9 +7,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: k8s-syd1-au-unkin-net
|
||||
namespace: ns-externaldns
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: externaldns
|
||||
clusterRef: bind-externaldns
|
||||
zoneName: k8s.syd1.au.unkin.net
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
@@ -22,9 +22,9 @@ apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindZone
|
||||
metadata:
|
||||
name: 200-18-198-in-addr-arpa
|
||||
namespace: ns-externaldns
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
clusterRef: externaldns
|
||||
clusterRef: bind-externaldns
|
||||
zoneName: 200.18.198.in-addr.arpa
|
||||
type: primary
|
||||
defaultTTL: 600
|
||||
+4
-1
@@ -3,4 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../../base/ns-auth
|
||||
- namespace.yaml
|
||||
- authoritative
|
||||
- resolvers
|
||||
- externaldns
|
||||
@@ -2,4 +2,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: ns-auth
|
||||
name: bind-internal
|
||||
@@ -4,8 +4,8 @@
|
||||
apiVersion: bind.unkin.net/v1alpha1
|
||||
kind: BindCluster
|
||||
metadata:
|
||||
name: resolver
|
||||
namespace: ns-resolver
|
||||
name: bind-resolvers
|
||||
namespace: bind-internal
|
||||
spec:
|
||||
mode: resolver
|
||||
replicas: 3
|
||||
@@ -16,7 +16,7 @@ spec:
|
||||
annotations:
|
||||
purelb.io/service-group: common
|
||||
purelb.io/addresses: 198.18.200.7
|
||||
external-dns.alpha.kubernetes.io/hostname: ns-resolver.k8s.syd1.au.unkin.net
|
||||
external-dns.alpha.kubernetes.io/hostname: bind-resolvers.k8s.syd1.au.unkin.net
|
||||
forwarders:
|
||||
- 1.1.1.1
|
||||
- 9.9.9.9
|
||||
-1
@@ -3,5 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- cluster.yaml
|
||||
@@ -21,7 +21,7 @@ spec:
|
||||
runAsNonRoot: true
|
||||
containers:
|
||||
- name: operator
|
||||
image: git.unkin.net/unkin/bind-operator:v0.1.2
|
||||
image: git.unkin.net/unkin/bind-operator:v0.1.3
|
||||
args:
|
||||
- --metrics-bind-address=:8080
|
||||
- --health-probe-bind-address=:8081
|
||||
|
||||
@@ -6,6 +6,6 @@ resources:
|
||||
- namespace.yaml
|
||||
# CRDs are pulled from the bind-operator repo at the matching tag rather than
|
||||
# vendored here, so they never drift from the operator.
|
||||
- https://git.unkin.net/unkin/bind-operator/raw/tag/v0.1.1/config/crd/install.yaml
|
||||
- https://git.unkin.net/unkin/bind-operator/raw/tag/v0.1.3/config/crd/install.yaml
|
||||
- rbac.yaml
|
||||
- deployment.yaml
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: ns-externaldns
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: ns-resolver
|
||||
+1
-1
@@ -3,4 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../../base/ns-resolver
|
||||
- ../../../base/bind-internal
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../../base/ns-externaldns
|
||||
Reference in New Issue
Block a user