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

Fix geoip2 db files #3310

Merged
merged 2 commits into from
Oct 29, 2018
Merged

Fix geoip2 db files #3310

merged 2 commits into from
Oct 29, 2018

Conversation

mbode
Copy link
Contributor

@mbode mbode commented Oct 28, 2018

What this PR does / why we need it:
Currently, the geoip2 databases baked into the docker image do not work. This can be verified in the following way:

  1. Install libmaxminddb (e.g. on macOS brew install libmaxminddb)
  2. docker run -it quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.20.0 sh
  3. docker cp <CONTAINER_ID>:/etc/nginx/geoip/GeoLite2-ASN.mmdb .
  4. mmdblookup --file GeoLite2-ASN.mmdb --ip 1.1.1.1

Got an error from the maxminddb library: The MaxMind DB file's search tree is corrupt

This is due to the way the db files are currently unarchived and should be fixed with this PR.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 28, 2018
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 28, 2018
@ElvinEfendi
Copy link
Member

ElvinEfendi commented Oct 29, 2018

@mbode what do you think of using https://github.com/maxmind/geoipupdate2 ?

It will be as simple as running geoipupdate -d /etc/nginx/geoip -f /usr/local/etc/GeoIP.conf to download databases configured at /usr/local/etc/GeoIP.conf.

I'm not necessarily asking for any change in this PR now though.

@ElvinEfendi
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 29, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ElvinEfendi, mbode

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2018
@k8s-ci-robot k8s-ci-robot merged commit 9822847 into kubernetes:master Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants