Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion dist/bin/kctf-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ function kctf_cluster_start_gce {

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

"${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
"${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
fi

if [[ "${DISABLE_SRC_RANGES}" == "0" ]]; then
Expand Down
14 changes: 12 additions & 2 deletions kctf-operator/resources/external-dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,20 @@ func NewExternalDnsDeployment() client.Object {
Key: "DOMAIN_NAME",
},
},
}},
}, {
Name: "CLUSTER_NAME",
ValueFrom: &corev1.EnvVarSource{
ConfigMapKeyRef: &corev1.ConfigMapKeySelector{
LocalObjectReference: corev1.LocalObjectReference{
Name: "external-dns",
},
Key: "CLUSTER_NAME",
},
},
}, },
Args: []string{"--log-level=debug", "--source=service", "--source=ingress",
"--provider=google", "--domain-filter=$(DOMAIN_NAME)", "--registry=txt",
"--txt-owner-id=kctf-cloud-dns"},
"--txt-owner-id=kctf-cloud-dns-$(CLUSTER_NAME)"},
},
{
Image: DOCKER_CERTBOT_IMAGE,
Expand Down