Code Monkey home page Code Monkey logo

Comments (3)

bedis avatar bedis commented on May 28, 2024 1

Hi Patrick

Just to make this feature request more generic, here we want to:

  • "allow" or "deny" traffic based on source IP address
  • provide the list of IPs
  • apply this matching either to the source IP address of the TCP connection or in any HTTP header provided by configuration

I do propose the following annotations:

  • ip-list: name of a configmap where a list of IP can be found
  • ip-list-action: action to be perfomed: either 'allow' or 'deny'
  • ip-list-header: (optional) name of the HTTP header where to find the source IP address. Default is to be use the source IP from the TCP client connection

the ip-list configmap should look like:

data:
  ip-list:
    - a.b.c.d
    - e.f.g.h

The idea behind the config map is that we can use the list of IPs for multiple ingresses / controllers and also we can watch it and once updated, the controller can replicate the change in HAProxy at runtime (when the client-native lib will support this)

With this, we should be able to meet your needs and many other use cases.

from kubernetes-ingress.

andy-b-84 avatar andy-b-84 commented on May 28, 2024

That would be perfect, two things I forgot to specify though :

  • I need to specify IP ranges ( a.b.c.d/24 for example );
  • I need to specify both IPv4 & IPv6 IP addresses.

from kubernetes-ingress.

bedis avatar bedis commented on May 28, 2024

both will be supported out of the box.

I wonder one thing, I don't like the naming propositon: ip-list but would like to rename it to filter or filtering. What do you think? It is closer to what it does exactly

from kubernetes-ingress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.