Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: override CoreDNS config #4854

Closed
wants to merge 1 commit into from
Closed

feat: override CoreDNS config #4854

wants to merge 1 commit into from

Conversation

chris13524
Copy link

Proposed Changes

Fixes: #4397 (comment)

Problem:
The coredns-custom configmap does not support overriding an existing server to add custom rules.

Solution:
Import overrides from the coredns-custom ConfigMap.

Types of Changes

New Feature (non-breaking change).

Verification

  • deploy this ConfigMap:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: coredns-custom
      namespace: kube-system
    data:
      rewrite.override.start: |
        rewrite name example.com traefik.kube-system.svc.cluster.local
    
  • verify Traefik's ClusterIP is returned from: kubectl run -it --rm --image=azukiapp/dig dig -- dig example.com

Linked Issues

User-Facing Change

Allow optional customizations to existing CoreDNS servers via `coredns-custom` ConfigMap

Problem:
The coredns-custom configmap does not support overriding an existing server to add custom rules.

Solution:
Import overrides from the coredns-custom ConfigMap.

Signed-off-by: Chris Smith <chris@dtllc.io>
@chris13524 chris13524 requested a review from a team as a code owner December 30, 2021 23:49
@chris13524
Copy link
Author

Closing as per #4397 (comment)

I was able to implement my rewriting needs using:

apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns-custom
  namespace: kube-system
data:
  example.server: |
    example.com:53 {
      rewrite name example.com traefik.kube-system.svc.cluster.local
      forward . 127.0.0.1:53
    }

@chris13524 chris13524 closed this Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant