gardener / gardener-extension-shoot-dns-service

Gardener extension controller for DNS services for shoot clusters.
https://gardener.cloud
Apache License 2.0
8 stars 35 forks source link

Add appropriate error code for error `no domain matching hosting zones. Need to be a (sub)domain of [...]` #300

Closed ialidzhikov closed 8 months ago

ialidzhikov commented 8 months ago

How to categorize this issue?

/area ops-productivity /kind enhancement

What would you like to be added: We see Extensions of type shoot-dns-service that fail to be created with:

status:
  lastError:
    description: "Error reconciling Extension: 1 error occurred:\n\t* Error while
      waiting for DNSProvider shoot--foo--bar/aws-route53-shoot-dns-service-baz-foo
      to become ready: state Error: no domain matching hosting zones. Need to be a
      (sub)domain of [<omitted>]\n\n"
    lastUpdateTime: "2024-02-28T09:53:53Z"
  lastOperation:
    description: "Error reconciling Extension: 1 error occurred:\n\t* Error while
      waiting for DNSProvider shoot--foo--bar/aws-route53-shoot-dns-service-baz-foo
      to become ready: state Error: no domain matching hosting zones. Need to be a
      (sub)domain of [<omitted>]\n\n"
    lastUpdateTime: "2024-02-28T09:53:53Z"
    progress: 50
    state: Error
    type: Create

The error reveals that Shoot wants to include a dns domain that is not supported by the backing account (?). If possible, such error should be reported with error code ERR_CONFIGURATION_PROBLEM in the Extension status.

The error itself is raised by external-dns-management: https://github.com/gardener/external-dns-management/blob/256e812ea1d5b4ec9432195365ff3c810d7592f0/pkg/dns/provider/selection/selection.go#L134-L135

Why is this needed: To prevent ops people looking into Shoots which are pure end user configuration problems.

/cc @adenitiu @nickytd

MartinWeindel commented 8 months ago

/close implemented with #303