AmitKumarDas / elitmus

litmus test your kubernetes infrastructure without learning curves
Apache License 2.0
2 stars 2 forks source link

check feasibility of lambda functions for each statement of a userstory #2

Open AmitKumarDas opened 6 years ago

AmitKumarDas commented 6 years ago

Assumption:

This issue tracks the feasibility of mapping each statement to corresponding lambda function executed as a web hook on a target container that exposes a hook service which understands these hooks. This hook service should have the ability to invoke kubectl commands.

Why?

NOTE:

AmitKumarDas commented 6 years ago

References:

What are admission webhooks? Admission webhooks are HTTP callbacks that receive admission requests and do something with them. You can define two types of admission webhooks, validating admission Webhook and mutating admission webhook. With validating admission Webhooks, you may reject requests to enforce custom admission policies. With mutating admission Webhooks, you may change requests to enforce custom defaults

Code in go

Links:

AmitKumarDas commented 6 years ago
AmitKumarDas commented 6 years ago

Current Design

Future Design

NOTE: These is otherwise known as lamdba expression or lambda function or web hook

High Level Implementation

Based on above concept, litmus will need a litmus service which can parse & execute the function as a declarative specification. We might build a litmus service from scratch and define the payload or we can build a Kubernetes custom resource and make use of an operator that does the job of a litmus service.

Below are few advantages of using a Kubernetes Custom Resource:

Below are few disadvantages of using a Kubernetes Custom Resource: