-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Added maxmindMirror value to helm chart #11435
Conversation
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hi @lgyurci. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lgyurci The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-ingress-nginx canceled.
|
@lgyurci what is the link to the code for "option to set a mirror for the maxmind geoip databases" |
ingress-nginx/internal/nginx/maxmind.go Lines 135 to 138 in ac9e40a
@longwuyuan Are you thinking about this? |
@lgyurci, not sure if you are asking or telling. I am just trying to verify your issue description
|
ingress-nginx/pkg/flags/flags.go Line 233 in ac9e40a
and ingress-nginx/internal/nginx/maxmind.go Lines 135 to 138 in ac9e40a
This parameter (--maxmind-mirror) is also documented:
|
If you are trying to set a optional cli-argument flag to the controller executable, then the current method everybody uses is the key
So that will look like What is the need to create a unnecessary duplicate and redundant process to add optional cli-flag to the executable, via helm chart values file ? |
@lgyurci I am not able to test your change. Can you see below info and advice what I am doing wrong
I can not find any geoip config in nginx.conf. I got the mirrorURL from the maxmind website as a permalink Now I am going to try without the mirrorURL and update |
Alright, so my guess is, that you put the mirror url in the wrong format (you actually used the full path to the GeoLite2-ASN database, with parameters - and thats the controllers job). Secondly, with a maxmind mirror, you shouldn't use a license key, because (normally) an internal mirror shouldn't require one. So you actually can't test this functionality with MaxMind itself as its own mirror, you have to set one up locally. But all of this might be irrevelant, because: I actually overlooked the extraArgs section, and I wasn't aware that you can pass arbitrary arguments to the controller from the helm chart. Thank you for shedding light on that. I do not wish to argue about the necessity of this pull request, feel free to close this if you think putting this option to a more easily reachable area is not that important. And thanks again for looking into this! |
@lgyurci thanks for the update as it helps a lot in testing. I just now tried https://github.com/ffha/geolite-mirror & https://github.com/clashdev/geolite.clash.dev (found them on google search) . Still the logs say download is attempted but db not found. See below
The long story is that there was another issue on geoip2 and the root-cause was user configuring deprecated variable. So feedbacks like this are the best source of improvements. Now, even as I was typing this update, I tried out this values file (without Licence)
And I still get that same error of db not found ;
So the idea is to fill the PR with related info as iterations are hard to come by. If you are interested, a docs PR also would be most welcome. I practically was able to test only after your kind co-operation over multiple messages. As for the new key in values file, this testing shows, I can use the I am not a developer so maybe you can choose to use the There is lack of contributors so any improvements contributed are super appreciated. Thanks again . |
Huhh this is strange. I'll have a deeper look at this tomorrow, or monday, and keep you updated! (If you don't figure it out until then) I have a strong feeling that there is a bug here (in the code probably), so an issue would be nice about this. I'll run some tests locally to see what's wrong. |
Ok so I couldn't wait until tomorrow, and I tested with the mirrors you provided, and also added some debug prints to the controller code to see actually what's happening:
So actually the controller gets a 403 from geolite.090124.xyz (and the same goes for geolite.clash.dev, but that even has a cloudflare captcha) while trying to download the databases, there is probably some user-agent, or other L7 filtering on the site. This 403 is not logged normally for some reason. Please ignore the ="(MISSING)" messages at the end of the lines, I'm not a Go developer. So my guess would be, that your controller simply just can't reach these sites. I could set up a temporary public mirror for you to try this, if you'd like to. |
Thanks again for the update. It helped solve the problem. I basically minimal-ized the heck out of that mirror URL and the controller successfully configured geoip2.
So it was just the L7 & CDN stuff failing the tests so far. I now think there is no need to add a new key to the values file, as this PR proposes because a values file like this worked for me just now
/close |
@longwuyuan: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What this PR does / why we need it:
The option to set a mirror for the maxmind geoip databases is already in the code, the option is only missing from the helm chart. This PR makes a maxmind mirror configurable from helm values.
Types of changes
How Has This Been Tested?
Ran helm chart locally, it installed, and the controller tried to use the mirror I provided in the values properly
Checklist: