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

ConfigMap setting whitelist-source-ranges doesn't work #473

Closed
gjcarneiro opened this issue Mar 21, 2017 · 4 comments · Fixed by #517
Closed

ConfigMap setting whitelist-source-ranges doesn't work #473

gjcarneiro opened this issue Mar 21, 2017 · 4 comments · Fixed by #517
Assignees

Comments

@gjcarneiro
Copy link

I have this configmap:

apiVersion: v1
data:
  disable-ipv6: "true"
  proxy-read-timeout: "3600"
  proxy-send-timeout: "3600"
  use-proxy-protocol: "true"
  whitelist-source-range: 10.122.0.0/16
kind: ConfigMap

But nginx controller (version 0.9.0.beta.3) totally ignores whitelist-source-range. I have some Ingress resources with the ingress.kubernetes.io/whitelist-source-range annotation, to explicitly say which IPs to allow, but I also have one Ingress resource without any annotation. It is my understanding that, in the absence of a specific annotation in an Ingress then the default whitelist-source-range from the ConfigMap should apply. It doesn't apply, in my experience.

Did I understand incorrectly, or is it a bug?

@snoby
Copy link

snoby commented Mar 24, 2017

I'm not 100% sure but i don't think white listing will work if you are using ssl_passthrough...

@gjcarneiro
Copy link
Author

Well, white listing certainly does work in my setup, but only for resources explicitly annotated with ingress.kubernetes.io/whitelist-source-range.

My only issue is that the config map's whitelist-source-range option should provide a default value for the Ingress resources that don't provide a ingress.kubernetes.io/whitelist-source-range annotation, but the default value never seems to apply.

@apgapg
Copy link

apgapg commented May 6, 2023

image

Somehow this isnt working.
I dont see the IP in generated nginx.conf

I have also applied externalTrafficPolicy: "Local"
I cant use ingress as my connection is TCP with port 5432 (postgres database)

@apgapg
Copy link

apgapg commented May 6, 2023

Looks like this setting doesnt work on TCP config map.
I have tried patching TCP config map with IP whitelisting but no help

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 a pull request may close this issue.

4 participants