Skip to content

Fix plugin loading order dependence #1

@chrisohaver

Description

@chrisohaver

Currently, the order in which k8s_api is registered is important in relation to other plugins. However, that order is not predictable, since CoreDNS iterates through a map to load them.

Two possible fixes:

  1. Change CoreDNS to initialize the plugins in order (the order established in plugin.cfg). This is a simple and harmless fix, but it has been proposed and rejected before in CoreDNS.
  2. Change k8s_api to defer looking for plugins that implement APIWatcher until after all plugins are registered (OnStartup). This makes the code a bit tougher to follow, and requires that k8s_api actually sit in the plugin packet serving path even though it has no functional need to process packets. But this doesn't require any change to CoreDNS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions