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.
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
Add CoreDNS rewrite support for external services. #656
Add CoreDNS rewrite support for external services. #656
Changes from 5 commits
5211ffd
083a46c
fdcd150
b287952
52ad6af
bb9b316
e7dad17
6e337cf
92c266a
8d7cda9
d6b94fa
b31c0a3
bafabdc
cbe72e2
1e251a5
f73b4b9
805194c
40d67ce
f0cb126
caf3536
4177a82
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be less intrusive to use the
hosts
orfile
plugins so that the changes are not embedded as part of the CoreDNS configuration but are in their own file.We could then ask an administrator to enable the CoreDNS plugin manually (if they so desire) and require lower privileges for us (we won't be mocking with the Corefile directly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elevran , looking into
hosts
plugin, in case it is configured with malformed syntax, coredns pods seem to also fail.coredns configmap:
coredns deployment:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you use the file / hosts plugins there might already be packages for parsing their data (I imagine the pluiin needs it anyway)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may want to move rewrite parsing into its own package/struct so that the file parsing is not split across these functions as internal implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I realize it is not part of the new code, but I wonder if using append won't be a cleaner solution instead of assigning specific array entries. Unless, of course, there is a reliance on the specific order even when there are nil errors in the array.
Alternately, this might be better served by
errors.Join()
.@kfirtoledo @orozery - not familiar with this code well enough to say. Please weigh in.