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

Kubernetes Ingress Controller #25

Closed
localvar opened this issue Jun 16, 2021 · 0 comments · Fixed by #102
Closed

Kubernetes Ingress Controller #25

localvar opened this issue Jun 16, 2021 · 0 comments · Fixed by #102
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@localvar
Copy link
Collaborator

localvar commented Jun 16, 2021

Background

We have developed an ingress controller in EaseMesh, but it is an EaseMesh-dedicated implementation. So we decide to implement a general Kubernetes ingress controller.

Proposal

The ingress controller consumes Kubernetes Ingress Resources and converts them to an EaseGress configuration which allows the EaseGress to forward and load-balance traffic to Kubernetes pods.

Design

  1. Create a new ingress class
apiVersion: networking.k8s.io/v1beta1
kind: IngressClass
metadata:
  name: easegress
spec:
  controller: megaease.com/ingress-controller
  1. IngressController: An controller in Easegress, also an ingress controller for Kubernetes. It creates a HTTP server for ingress traffic and watches Kubernetes Ingress, Service, Endpoint, Security to translate Kubernetes Ingress rules to Easegress pipelines dynamically.
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ingress
spec:
  ingressClassName: easegress
  rules:
  - host: test.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          serviceName: test
          servicePort: 8000

the ingress above will be translated to one HTTPServer and one HTTPPipeline

kind: HTTPServer
name: http-server-ingress
port: 10080 # Indicated in the installation 
keepAlive: true
keepAliveTimeout: 75s
maxConnection: 10240
rules:
  - host: test.example.com
    paths:
    - path: /
       backend: test
name: test
kind: HTTPPipeline

flow:
  - filter: proxy
filters:
  - name: proxy
    kind: Proxy
    mainPool:
      servers: # retrieved from k8s
      - url: http://10.0.1.1:19095
      - url: http://10.0.1.2:19095
      loadBalance:
        policy: roundRobin
@localvar localvar self-assigned this Jun 16, 2021
@benja-wu benja-wu added the enhancement New feature or request label Jun 16, 2021
@benja-wu benja-wu added this to the v1.0.1 milestone Jun 17, 2021
@zhao-kun zhao-kun added this to In progress in Easegress Project Jun 17, 2021
@benja-wu benja-wu pinned this issue Jun 17, 2021
@zhao-kun zhao-kun modified the milestones: v1.0.1 , v1.2.0 Jul 5, 2021
@benja-wu benja-wu linked a pull request Jul 6, 2021 that will close this issue
Easegress Project automation moved this from In progress to Done Jul 8, 2021
xxx7xxxx pushed a commit that referenced this issue Jul 8, 2021
* add kubernetes ingress controller (close #25)

* update according to review comments

* update documentation

* update go.mod to fix test failure

* minor refactor according to review comment

Co-authored-by: Bomin Zhang <bomin.zhang@megaease.com>
@benja-wu benja-wu unpinned this issue Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants