Update kubernetai plugin to support transfers via the transfers plugin. #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The kubernetes plugin was updated to support a new transfer plugin for managing zone transfer requests:
see:-
coredns/coredns#2585 - plugin/etcd: support zone transfers #2585
coredns/coredns#3121 - plugin/transfer: New plugin for handling zone transfers #3121
coredns/coredns#3223 - plugin/transfer: Zone transfer plugin #3223
When this work was performed, the internal implementation of AXFR requests was removed from the kubernetes plugin and instead it supports the transfer.Transferer interface. kubernetai doesn't support the transfer.Transferer interface and so building CoreDNS v1.11.3 with this plugin results in AXFR requests failing to respond with the zones.
This PR adds a Transfer method to the Kubernetesai object so that it can broker AXFR requests to its embedded Kubernetes plugins.
In order to write tests, I have abstracted the Kubernetes plugin to a embeddedKubernetesPluginInterface. Which allows me to swap out the underlying Kubernetes plugin. This is neater than the podHandlerItf approach and allows for us to generate different responses from the embedded plugins needed to check the integration through kubernetes plugins.
This PR is also supported by integration tests in coredns/ci - coredns/ci#158
The kubernetai tests fail against master:
Manual testing against this PR produces: