Skip to content

configure core dns for internal name resolution#317

Merged
nabuskey merged 1 commit intocnoe-io:mainfrom
nabuskey:core-dns
Jun 20, 2024
Merged

configure core dns for internal name resolution#317
nabuskey merged 1 commit intocnoe-io:mainfrom
nabuskey:core-dns

Conversation

@nabuskey
Copy link
Copy Markdown
Collaborator

@nabuskey nabuskey commented Jun 20, 2024

fixes: #300

This allows for in-cluster hostname resolutions using CoreDNS.

From a pod in the cluster:

root@debug-pod:/# dig cnoe.localtest.me +short
10.96.30.155
root@debug-pod:/# dig abc.cnoe.localtest.me +short
10.96.30.155

A few points about CoreDNS I should make clear:

  1. CoreDNS file allows you to import files matching a pattern.
  2. By default, CoreDNS installation only mounts the corefile key within coredns CM.

Taken together, what we need to do to allow our default customization and possible further customization:

  1. Update the coredns CM to use the import plugin, then make it look for files matching /etc/coredns-configs/*.conf
  2. Populate /etc/coredns-configs/ with two files (sourced from CMs):
    • One that contains our default configuration. That is to resolve the name given by the host flag and all subdomains to the internal ingress address.
    • One that is empty. This is to allow for other packages to update this file for further DNS configurations. In the absence of this file, other packages must update the coredns deployment.
  3. Update the coredns deployment to mount the two CMs.

Signed-off-by: Manabu McCloskey <manabu.mccloskey@gmail.com>
Copy link
Copy Markdown
Contributor

@nimakaviani nimakaviani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -22 to +26
recreateCluster bool
buildName string
kubeVersion string
extraPortsMapping string
kindConfigPath string
recreateCluster bool
buildName string
kubeVersion string
extraPortsMapping string
kindConfigPath string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats with the format change? a different editor?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting was missed in a previous commit I think.

@nabuskey nabuskey merged commit ef0fc09 into cnoe-io:main Jun 20, 2024
omrishiv pushed a commit to omrishiv/idpbuilder that referenced this pull request Jun 20, 2024
Signed-off-by: Manabu McCloskey <manabu.mccloskey@gmail.com>
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.

Feature: CoreDNS configuration for core packages

3 participants