Repository for some concepts around pattern and configuration checking for service meshes and other fancy microservice tech.
We embrace the concept of Architectural Decision Records. This repository works with the ADR markdown format:
- First, a design pattern is passed within the CLI
- Depending of the selected pattern, requests are prompted for relevant metrics of the pattern configuration.
- After passing the desired parameters for the configuration, an ADR for the pattern configuration is generated and stored in doc/architecture/decisions.
- In the next step, the now existing ADR is crawled for the Config Set which contains a dictionary with the parameter decisions.
Currently supported provider formats:
- Istio - Memquota
- Kong - Rate limiting
Currently supported provider formats:
- Python 2.7.x or Python 3.7.x
- pip 18.x or pip3 19.0.x
> pip install -r service-mesh-patterns/requirements.txt
Make sure that the configuration file which needs to be analyzed is stored as
service-mesh-patterns/sources/config_template.yaml
-
Navigate to
service-mesh-patterns
:cd service-mesh-patterns
-
Start the pattern-config-checker:
python init.py
-
A dialog will be displayed which determine the content of the markdown document, e.g.
-
Pattern type (Rate Limit / Circuit Breaker)
-
For Rate Limit:
- Rate limit interval in seconds
- Number of allowed requests
- DestinationID for which the rate limiting will be checked
-
For Circuit Breaker:
-
-
For the passed configuration, a corresponding ADR will be generated at
service-mesh-patterns/doc/architecture/decisions/PATTERN_TYPE_adr_0001.md
-
The checking script crawls the generated ADR for the desired configuration of the selected pattern and analyzes the stored
config_template.yaml
for the actual configuration state.
The providers for which the script automatically identifies the format of the stored template are listed above.