From 4f82fdfa183d7b6fa9725e2f2edb4698fcf090a2 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Date: Wed, 1 Dec 2021 12:29:21 +0530 Subject: [PATCH] add doc to manually tag dns Signed-off-by: Ashutosh Kumar --- azure/services/privatedns/privatedns.go | 6 ++++-- docs/book/src/topics/custom-dns.md | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/azure/services/privatedns/privatedns.go b/azure/services/privatedns/privatedns.go index 1c1574c4411..02a940c7dc3 100644 --- a/azure/services/privatedns/privatedns.go +++ b/azure/services/privatedns/privatedns.go @@ -70,7 +70,9 @@ func (s *Service) Reconcile(ctx context.Context) error { isManaged = true } if !isManaged { - s.Scope.V(2).Info("Skipping reconciliation of unmanaged private DNS zone", "private DNS", zoneSpec.ZoneName) + s.Scope.V(1).Info("Skipping reconciliation of unmanaged private DNS zone", "private DNS", zoneSpec.ZoneName) + s.Scope.V(1).Info("Tag the DNS manually from azure to manage it with capz."+ + "Please see https://capz.sigs.k8s.io/topics/custom-dns.html#manage-dns-via-capz-tool", "private DNS", zoneSpec.ZoneName) return nil } // Create the private DNS zone. @@ -188,7 +190,7 @@ func (s *Service) Delete(ctx context.Context) error { } if !isManaged { - s.Scope.V(2).Info("Skipping private DNS zone deletion for unmanaged private DNS zone", "private DNS", zoneSpec.ZoneName) + s.Scope.V(1).Info("Skipping private DNS zone deletion for unmanaged private DNS zone", "private DNS", zoneSpec.ZoneName) return nil } s.Scope.V(2).Info("deleting private dns zone", "private dns zone", zoneSpec.ZoneName) diff --git a/docs/book/src/topics/custom-dns.md b/docs/book/src/topics/custom-dns.md index ee82149e3dd..2e7bc2291a4 100644 --- a/docs/book/src/topics/custom-dns.md +++ b/docs/book/src/topics/custom-dns.md @@ -35,3 +35,18 @@ spec: resourceGroup: cluster-example ``` +# Manage DNS Via CAPZ Tool + +Private DNS when created by CAPZ can be managed by CAPZ tool itself automatically. To give the flexibility to have BYO +as well as managed DNS zone, an enhancement is made that causes all the managed zones created in the CAPZ version before +the enhancement changes to be treated as unmanaged. The enhancement is captured in PR +[1791](https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/1791) + +To manage the private DNS via CAPZ please tag it manually from azure portal. + +Steps to tag: + +- Go to azure portal and search for `Private DNS zones`. +- Select the DNS zone that you want to be managed. +- Go to `Tags` section and add key as `sigs.k8s.io_cluster-api-provider-azure_cluster_` and value as +`owned`. (Note: clustername is the name of the cluster that you created) \ No newline at end of file