Skip to content

Commit 7946722

Browse files
authored
namespace kctf zones by cluster name
This reverts commit 687b70f.
1 parent 687b70f commit 7946722

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

dist/bin/kctf-cluster

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ function kctf_cluster_start_gce {
647647

648648
gcloud projects add-iam-policy-binding ${PROJECT} --member=serviceAccount:${DNS_GSA_EMAIL} --role=roles/dns.admin || return
649649

650-
"${KCTF_BIN}/kubectl" create configmap --namespace kctf-system external-dns --from-literal=DOMAIN_NAME=${DOMAIN_NAME} --from-literal=EMAIL_ADDRESS=${EMAIL_ADDRESS:-} --dry-run=client -o yaml | "${KCTF_BIN}/kubectl" apply -f - || return
650+
"${KCTF_BIN}/kubectl" create configmap --namespace kctf-system external-dns --from-literal=DOMAIN_NAME=${DOMAIN_NAME} --from-literal=EMAIL_ADDRESS=${EMAIL_ADDRESS:-} --from-literal=CLUSTER_NAME=${CLUSTER_NAME:-} --dry-run=client -o yaml | "${KCTF_BIN}/kubectl" apply -f - || return
651651
fi
652652

653653
if [[ "${DISABLE_SRC_RANGES}" == "0" ]]; then

kctf-operator/resources/external-dns.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,20 @@ func NewExternalDnsDeployment() client.Object {
8686
Key: "DOMAIN_NAME",
8787
},
8888
},
89-
}},
89+
}, {
90+
Name: "CLUSTER_NAME",
91+
ValueFrom: &corev1.EnvVarSource{
92+
ConfigMapKeyRef: &corev1.ConfigMapKeySelector{
93+
LocalObjectReference: corev1.LocalObjectReference{
94+
Name: "external-dns",
95+
},
96+
Key: "CLUSTER_NAME",
97+
},
98+
},
99+
}, },
90100
Args: []string{"--log-level=debug", "--source=service", "--source=ingress",
91101
"--provider=google", "--domain-filter=$(DOMAIN_NAME)", "--registry=txt",
92-
"--txt-owner-id=kctf-cloud-dns"},
102+
"--txt-owner-id=kctf-cloud-dns-$(CLUSTER_NAME)"},
93103
},
94104
{
95105
Image: DOCKER_CERTBOT_IMAGE,

0 commit comments

Comments
 (0)