easegress
easegress copied to clipboard
PipelineGroup to share and reuse filters between Pipelines
Is your feature request related to a problem? Please describe.
For now, every path in HTTPSever
has a corresponding Pipeline
. To share filters between pipelines, we use GlobalFilter
, which execute before or/and after all the pipelines of a certain HTTPServer
.
Describe the solution you'd like
Create a new object called PipelineGroup
to share and reuse filters between multiple pipelines. For example, several pipelines share some validation. Other pipelines share same basic auth, etc.
name: pipeine-group
kind: PipelineGroup
groups:
- group: group1
before:
- filter: adminAuth
flows:
- pipeline: pipeline1
flow:
- filter: proxyAdmin1
- pipeline: pipeline2
flow:
- filter: proxyAdmin2
…
filters:
- name: proxyAdmin1
- name: proxyAdmin2
- name: proxyUser1
- name: proxyUser2
- name: adminAuth
Describe alternatives you've considered
A PipelineGroup
can have multiple pipelines in it. And these pipelines can be used by HTTPServer
or GRPCServer
. Based on design, we can support one or more groups in PipelineGroup
.
name: pipeine-group
kind: PipelineGroup
before:
- filter: adminAuth
after:
- filter: after
flows:
- pipeline: pipeline1
flow:
- filter: proxyAdmin1
- pipeline: pipeline2
flow:
- filter: proxyAdmin2
…
filters:
- name: proxyAdmin1
- name: proxyAdmin2
- name: proxyUser1
- name: proxyUser2
- name: adminAuth
Additional context Nop.
It's a complicated feature that has no imminent requirements for now. So let's hold for now.