Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mr-karan
Copy link

@mr-karan mr-karan commented Jan 5, 2023

This commit introduces a nomad plugin which provides a DNS interface for querying Nomad services.

1. Why is this pull request needed and what does it do?

This PR adds a nomad plugin. It provides the capability to query Nomad services API via DNS.

2. Which issues (if any) are related?

#5829

3. Which documentation changes (if any) need to be made?

The plugin has a README.md so I believe that is sufficient.

4. Does this introduce a backward incompatible change or deprecation?

No.

@mr-karan mr-karan force-pushed the nomad branch 3 times, most recently from fc54ab9 to 240710a Compare January 5, 2023 07:20
This commit introduces a `nomad` plugin which provides a DNS
interface for querying Nomad services.

Ref coredns#5829

Signed-off-by: Karan Sharma <[email protected]>
Copy link
Member

@chrisohaver chrisohaver left a comment

Choose a reason for hiding this comment

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

Thanks for contributing!

m.Rcode = dns.RcodeNameError
w.WriteMsg(m)
requestFailedCount.WithLabelValues(metrics.WithServer(ctx), namespace).Inc()
return dns.RcodeNameError, nil
Copy link
Member

Choose a reason for hiding this comment

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

RE: double writes: This is OK as is. dns.RcodeNameError is not categorized as a failure.

However, NXDOMAIN responses also require an SOA record returned in the Authority section (Ns).


// Check the query type to format the appriopriate response.
switch qtype {
case dns.TypeA:
Copy link
Member

Choose a reason for hiding this comment

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

I think before appending, you need to make sure here that the addr is actually a v4 IP.
ditto for AAAA case.

return dns.RcodeNotImplemented, nil
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Need to add a check here in the event that there were no matching registrations of the queried type. e.g. if a service has an ipv6 address registered, but no ipv4, and user queried for type A. In this case, we need to add an SOA record to the Authority section of the response, since the sewer will be empty (a "NODATA" response).

@chrisohaver chrisohaver linked an issue Jan 9, 2023 that may be closed by this pull request
@chrisohaver chrisohaver added the needs update Please update the PR label Jan 9, 2023
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@mr-karan
Copy link
Author

Sorry, lost track of this and got busy. I'll work on changes mentioned soon.

@github-actions github-actions bot removed Stale needs update Please update the PR labels Feb 12, 2023
@chrisohaver chrisohaver added the needs update Please update the PR label Feb 15, 2023
@github-actions
Copy link

This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Mar 18, 2023
@github-actions github-actions bot closed this Mar 26, 2023
@jdoss
Copy link

jdoss commented Apr 4, 2023

@mr-karan Can this get reopened and pushed over the finish line? Having this plugin added to coreDNS would be a fantastic addition.

@blinkinglight
Copy link

hey,
how can i continue this PR?

@chrisohaver
Copy link
Member

@mr-karan, is it ok with you if someone else picks up your proposed code to complete the feature?

@SuperQ
Copy link
Collaborator

SuperQ commented Aug 22, 2023

I think this would make more sense to start out as an external plugin.

@blinkinglight
Copy link

https://github.com/ituoga/coredns-nomad just good enought for now, builds via cd/cd but works with weave.works so good for now.

@blinkinglight
Copy link

if you think that something is broken and you have no time, please, tell for "next" (just with comment and PR) what it can do.

@blinkinglight
Copy link

you don't have to finish what you started just because you started it. but leave not to next, where to start ;)

@mr-karan
Copy link
Author

This was available as an external plugin since a very long time: https://github.com/mr-karan/coredns-nomad

I agree I should have been more proactive/communicative in this thread. Couldn't make/find time to continue with it. Apologies, will do better next time.

@blinkinglight
Copy link

This was available as an external plugin since a very long time: https://github.com/mr-karan/coredns-nomad

I agree I should have been more proactive/communicative in this thread. Couldn't make/find time to continue with it. Apologies, will do better next time.

just too long :) do you have time to merge and review PR's? ? so maybe we could move github actions part to your repo?

@mr-karan
Copy link
Author

Sure, please feel free to open a PR. Will get this shipped 🚀

@caiodelgadonew
Copy link

@mr-karan when do you plan to have this shipped? will be amazing to use it <3

@mr-karan
Copy link
Author

mr-karan commented Sep 15, 2023

@caiodelgadonew It's available as immediate use even now: https://github.com/mr-karan/coredns-nomad

@blinkinglight is helping with releasing a docker image for this plugin.

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

Labels

needs update Please update the PR Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New plugin: Nomad

7 participants