Coder Social home page Coder Social logo

zfy3000163 / haproxy-ingress Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jcmoraisjr/haproxy-ingress

0.0 0.0 0.0 12.89 MB

HAProxy Ingress

Home Page: https://haproxy-ingress.github.io

License: Apache License 2.0

Shell 0.31% Lua 2.20% Go 97.20% Makefile 0.11% Dockerfile 0.18%

haproxy-ingress's Introduction

HAProxy Ingress controller

Ingress controller implementation for HAProxy loadbalancer.

build helm

HAProxy Ingress is a Kubernetes ingress controller: it configures a HAProxy instance to route incoming requests from an external network to the in-cluster applications. The routing configurations are built reading specs from the Kubernetes cluster. Updates made to the cluster are applied on the fly to the HAProxy instance.

Use HAProxy Ingress

Documentation:

Supported versions:

HAProxy Ingress Embedded
HAProxy
Supported
Kubernetes
External
HAProxy (*)
v0.15 (snapshot) 2.6 1.19+ 2.2+
v0.14 (latest) 2.4 1.19+ 2.2+
v0.13 2.3 up to v0.13.10
2.4 on v0.13.11+
1.19+ 2.2+
v0.12 2.2 1.18 - 1.21 2.0+
v0.10 2.0 1.8 - 1.21 -
  • Beta quality versions (beta / canary tags) has some new, but battle tested features, usually running on some of our production clusters
  • Development versions (alpha / snapshot tags) has major changes with few tests, usually not recommended for production
  • (*) Minimum supported HAProxy version if using an external HAProxy instance

Community:

Develop HAProxy Ingress

The instructions below are valid for v0.14 and newer. See v0.13 branch for older versions.

Building and running locally:

mkdir -p $GOPATH/src/github.com/jcmoraisjr
cd $GOPATH/src/github.com/jcmoraisjr
git clone https://github.com/jcmoraisjr/haproxy-ingress.git
cd haproxy-ingress
make run

Dependencies to run locally:

  • Golang
  • HAProxy compiled with USE_OPENSSL=1 and USE_LUA=1
  • golangci-lint is used when running make lint or make test targets
  • Lua with lua-json (luarocks install lua-json) if using Auth External or OAuth
  • Kubernetes network should be reachable from the local machine for a proper e2e test

Building container image:

Fast build - cross compile for linux/amd64 (locally) and generate localhost/haproxy-ingress:latest:

make image

Official image - build in a multi-stage Dockerfile and generate localhost/haproxy-ingress:latest:

make docker-build

Deploy local image using Helm:

helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts
helm install haproxy-ingress haproxy-ingress/haproxy-ingress\
  --create-namespace --namespace=ingress-controller\
  --set controller.image.repository=localhost/haproxy-ingress\
  --set controller.image.tag=latest\
  --set controller.image.pullPolicy=Never

make options:

The following make variables are supported:

  • CONTROLLER_TAG (defaults to localhost/haproxy-ingress:latest): tag name for make image and make docker-build.
  • LOCAL_FS_PREFIX (defaults to /tmp/haproxy-ingress): temporary directory for make run.
  • KUBECONFIG (defaults to $KUBECONFIG, or $(HOME)/.kube/config if the former is empty): Kubernetes from where to read Ingress configurations.
  • CONTROLLER_CONFIGMAP: <namespace>/<name> of the ConfigMap with global configurations.
  • CONTROLLER_ARGS: space separated list of additional command-line arguments.

The following make targets are supported:

  • build (default): Compiles HAProxy Ingress using the default OS and arch, and generates an executable at bin/controller.
  • run: Runs HAProxy Ingress locally.
  • lint: Runs golangci-lint.
  • test: Runs unit tests.
  • linux-build: Compiles HAProxy Ingress and generates an ELF (Linux) executable despite the source platform at rootfs/haproxy-ingress-controller. Used by image step.
  • image: Compiles HAProxy Ingress locally and generates a Docker image.
  • docker-build: Compiles HAProxy Ingress and generates a Docker image using a multi-stage Dockerfile.

haproxy-ingress's People

Contributors

aiharos avatar andrejbaran avatar antcs avatar arodland avatar brianloss avatar danigrmartinez avatar empirejones avatar git001 avatar ironashram avatar jcmoraisjr avatar l27-0-0-l avatar mac-chaffee avatar maelvls avatar marvin-roesch avatar michal800106 avatar mrueg avatar mtatheonly avatar mythi avatar oktalz avatar pbabilas avatar prometherion avatar rgherta avatar rikatz avatar roberttheprofessional avatar saary avatar scukerman avatar sealneaward avatar shagon94 avatar sigseg1v avatar wolf-cosmose 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.