From 7f1de4cfae3d144d0e0f6d08bc57501ac80123b5 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Tue, 10 Dec 2024 09:14:37 +0100 Subject: [PATCH] Allow shoot owners to bring their own DNS providers. (#361) --- control-plane/roles/gardener/README.md | 1 + control-plane/roles/gardener/defaults/main/extensions.yaml | 2 ++ .../templates/shoot-dns-service/controller-deployment.yaml | 3 +++ .../roles/gardener/test/dns_extension_template_test.py | 5 +++++ 4 files changed, 11 insertions(+) diff --git a/control-plane/roles/gardener/README.md b/control-plane/roles/gardener/README.md index 3a446bce..83a71529 100644 --- a/control-plane/roles/gardener/README.md +++ b/control-plane/roles/gardener/README.md @@ -126,6 +126,7 @@ This includes the metal-stack extension provider called [gardener-extension-prov | gardener_shoot_dns_service_image_vector_overwrite | | Allows overriding the image vector for the shoot-dns-service extension | | gardener_shoot_dns_service_dns_controller_manager_image_name | | Setting an explicit image name for the dns-controller-manager | | gardener_shoot_dns_service_dns_controller_manager_image_tag | | Setting an explicit image tag for the dns-controller-manager | +| gardener_shoot_dns_service_dns_provider_replication | | Enable provider replication feature for the shoot-service-dns extension | | gardener_extension_backup_s3_image_name | | Setting an explicit image name for the gardener-extension-backup-s3 | | gardener_extension_backup_s3_image_tag | | Setting an explicit image tag for the gardener-extension-backup-s3 | | gardener_extension_dns_powerdns_image_name | | Setting an explicit image name for the gardener-extension-dns-powerdns | diff --git a/control-plane/roles/gardener/defaults/main/extensions.yaml b/control-plane/roles/gardener/defaults/main/extensions.yaml index 4156bc1c..0c689fb7 100644 --- a/control-plane/roles/gardener/defaults/main/extensions.yaml +++ b/control-plane/roles/gardener/defaults/main/extensions.yaml @@ -90,3 +90,5 @@ gardener_shoot_dns_service_image_vector_overwrite: [] # tag: "0.7.1" gardener_shoot_dns_service_dns_controller_manager_image_name: gardener_shoot_dns_service_dns_controller_manager_image_tag: + +gardener_shoot_dns_service_dns_provider_replication: false diff --git a/control-plane/roles/gardener/templates/shoot-dns-service/controller-deployment.yaml b/control-plane/roles/gardener/templates/shoot-dns-service/controller-deployment.yaml index 6c508c6b..94210a64 100644 --- a/control-plane/roles/gardener/templates/shoot-dns-service/controller-deployment.yaml +++ b/control-plane/roles/gardener/templates/shoot-dns-service/controller-deployment.yaml @@ -16,6 +16,9 @@ helm: {% endif %} dnsProviderManagement: enabled: true + dnsProviderReplication: + enabled: {{ gardener_shoot_dns_service_dns_provider_replication | lower }} + dnsControllerManager: deploy: true {% if gardener_shoot_dns_service_dns_controller_manager_image_name or gardener_shoot_dns_service_dns_controller_manager_image_tag %} diff --git a/control-plane/roles/gardener/test/dns_extension_template_test.py b/control-plane/roles/gardener/test/dns_extension_template_test.py index 299b8745..cde3ba44 100644 --- a/control-plane/roles/gardener/test/dns_extension_template_test.py +++ b/control-plane/roles/gardener/test/dns_extension_template_test.py @@ -40,6 +40,7 @@ def test_shoot_dns_extension_controller_deployment_template(self, mock_urlopen): "tag": "0.7.1", }, ], + "gardener_shoot_dns_service_dns_provider_replication": True, "gardener_shoot_dns_service_dns_controller_manager_image_name": "dns-controller-image", "gardener_shoot_dns_service_dns_controller_manager_image_tag": "dns-controller-tag", }) @@ -65,8 +66,12 @@ def test_shoot_dns_extension_controller_deployment_template(self, mock_urlopen): repository: europe-docker.pkg.dev/gardener-project/public/dns-controller-manager sourceRepository: github.com/gardener/external-dns-management tag: 0.7.1 + dnsProviderManagement: enabled: true + dnsProviderReplication: + enabled: true + dnsControllerManager: deploy: true image: