Code Monkey home page Code Monkey logo

kubipam's Introduction

Kubernetes based IP Address Management

This project provides an IP address management controller based on Kubernetes resources.

There are two resources, an IPAMRange resource describing managed IP ranges and an IPAMRequest resource for requesting an IP CIDR or a single IP address.

Ranges

The IPAMRange resource provides a pool of managed IP addresses. It consists of a list of CIDRs, arbitrary IP ranges of the form <ip>-<ip> or single IP addresses.

Optionally the range may provide a default chunkSize, the width of network bits allocated for a request, if it does not request a dedicated size.

A size lower than the IP size (32 for IPv4 and 128 for IPv6) only makes sense for a list of CIDRs with a smaller network part.

  apiVersion: ipam.mandelsoft.org/v1alpha1
  kind: IPAMRange
  metadata:
    name: mynetworkpool
    namespace: default
  spec:
    chunkSize: 24
    ranges:
      - 192.168.0.0/16

A range cannot be deleted as long as there are requests refering to this range.

Requests

The IPAMRequest resource is used to request the allocation of a single IP or CIDR from a dedicated pool specified by an IPAMRange object.

The allocated CIDR is reported in the status field of the object.

  apiVersion: ipam.mandelsoft.org/v1alpha1
  kind: IPAMRequest
  metadata:
    name: mynet
    namespace: default
  spec:
    ipam:
      name: mynetworkpool
  status:
    cidr: 192.168.1.0/24
    state: Ready

A request may specify a dedicated size (for example 32 for a dedicated IPv4 Address). If no size is given (either by the referenced pool or by the request itself) a single IP address is allocated (/32 or /128).

By specifying a request CIDR or IP in the field request in the request object it is possible to request the allocation of a dedicated range or IP. If it could be granted the status is set accordinly as for an anonymous request.

The allocation is released again, when the request object is deleted.

Constraints

Once created the specification of a range or request MUST never be modified.

So far there is no validating webhook yet, that prevents such operations.

kubipam's People

Contributors

mandelsoft avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.