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

Create geoip plugin #4688

Merged
merged 23 commits into from
Jul 14, 2021
Merged

Create geoip plugin #4688

merged 23 commits into from
Jul 14, 2021

Conversation

snebel29
Copy link
Collaborator

@snebel29 snebel29 commented Jun 13, 2021

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

This plugin add support for configuring maxmind geoIP2 City database to add geo location data to request metadata.

2. Which issues (if any) are related?

Discussed in #4685.

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

I still have to check everywhere a documentation change is required.

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

As a new plugin there is no backward incompatible changes.

@snebel29 snebel29 marked this pull request as draft June 13, 2021 20:27
@snebel29 snebel29 force-pushed the plugin/create-mmdb branch 2 times, most recently from 5359059 to d012dce Compare June 13, 2021 20:35
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/README.md Outdated Show resolved Hide resolved
plugin/mmdb/mmdb.go Outdated Show resolved Hide resolved
snebel29 and others added 19 commits July 13, 2021 16:53
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
@snebel29 snebel29 force-pushed the plugin/create-mmdb branch from 6051586 to afc5301 Compare July 13, 2021 15:54
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
@snebel29
Copy link
Collaborator Author

snebel29 commented Jul 13, 2021

@miekg

I just rebased all changes from master and resolved the conflicts in go.mod and go.sum followed by a go mod tidy, after that I also created a plugin line (sorted) in CODEOWNERS with you (should it be you and me or just me?) followed by me.

Is that everything?

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
@snebel29
Copy link
Collaborator Author

Go Covergae check failed, with what smells some sort of flaky test

--- FAIL: TestMultiZoneBlockConfigs (0.00s)
    server_test.go:124: Could not get CoreDNS serving instance: Listen: listen tcp :40000: bind: address already in use

@miekg
Copy link
Member

miekg commented Jul 14, 2021

yes, that test turns out to be flaky, in general fix port numbers are a bad idea, but there you sorta need it... Maybe some stupid retrying is in order there.

@miekg miekg merged commit 21f1207 into coredns:master Jul 14, 2021
@snebel29 snebel29 deleted the plugin/create-mmdb branch July 14, 2021 07:39
@snebel29
Copy link
Collaborator Author

Thanks!

jinglina pushed a commit to jinglina/coredns that referenced this pull request Dec 23, 2021
* Create geoip plugin

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Update plugin/geoip/README.md

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Update plugin/geoip/README.md

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Update plugin/geoip/README.md

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Move DBFILE bullet below example

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Update plugin/geoip/README.md

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Remove plugin name test case

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Remove languages option

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Update free database link

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Remove last language bits

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Use 127.0.0.1 as probing IP

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Update plugin/geoip/geoip.go

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Update plugin/geoip/geoip.go

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Use relative path for fixtures dir

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Set names with default string zero value

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Remove unused db types

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Remove non city databases in testdata

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Remove create databases main

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Fix metadata label format test case

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Fix import path block

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* go fmt after changes

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Tidy up go.mod and go.sum

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

* Add plugin to CODEOWNERS

Signed-off-by: Sven Nebel <nebel.sven@gmail.com>

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: jinglinax@163.com <jinglinax@163.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.

2 participants