Skip to content

Make plugin more extensible #37

Description

@kuritka

k8s_crd plugin works well but will be extended which requires extra changes.

As plugin growths and more functionality is required, the k8s_crd plugin must execute multiple independent parts (another plugins / subplugins).

Currently the plugin has one larger function ServeDNS making core logic, but extending new - independent functionality leads to mixing with the old functionality.

Consider how to refactor k8s_crd to be able to run independent modules and keep them maintainable, testable. (e.g: by extending middleware (multiple ServeDNS funcs)? / run all in one ServeDNS but as submodules ? ….).

nit: look at configuration :

  {{ .Values.k8gb.dnsZone }}:5353 {
        errors
        health
        ready
        prometheus 0.0.0.0:9153
        forward . /etc/resolv.conf
        k8s_crd {
            loadbalance weight
            resources DNSEndpoint
            filter k8gb.absa.oss/dnstype=local
            negttl {{ .Values.k8gb.dnsZoneNegTTL }}
        }
    }

^^^ consider if changes are necessary as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions