Skip to content

Commit

Permalink
Cooperate/GitHub chunqi faultinjection (#29)
Browse files Browse the repository at this point in the history
* fix:fix circuit breaker update condition

* fix:fix circuit and fault store update

* feat: add fault normal and regexp rules
  • Loading branch information
spring-young authored Jan 22, 2024
1 parent 7efa14b commit 2e8b51b
Show file tree
Hide file tree
Showing 16 changed files with 857 additions and 201 deletions.
23 changes: 23 additions & 0 deletions config/crd/bases/ctrlmesh.kusionstack.io_faultinjections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,29 @@ spec:
description: Match specifies a set of criterion to be met in
order for the rule to be applied to the HTTP request.
properties:
contentMatch:
description: ContentMatch
items:
properties:
contents:
description: Content is the content of the fault injection
rule
items:
type: string
type: array
matchType:
type: string
methods:
description: 'Method specifies the http method of
the request, like: PUT, POST, GET, DELETE.'
items:
type: string
type: array
required:
- contents
- methods
type: object
type: array
httpMatch:
items:
description: HttpMatch specifies the criteria for matching
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/ctrlmesh/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const (
EnvEnableSim = "ENABLE_SIM"

EnvDisableCircuitBreaker = "DISABLE_CIRCUIT_BREAKER"
EnvDisableFaultInjection = "DISABLE_FAULT_INJECTION"
EnvEnableFaultInjection = "ENABLE_FAULT_INJECTION"
EnvEnableApiServerCircuitBreaker = "ENABLE_API_SERVER_BREAKER"
EnvEnableRestCircuitBreaker = "ENABLE_REST_BREAKER"
EnvEnableRestFaultInjection = "ENABLE_REST_FAULT_INJECTION"
Expand All @@ -77,6 +77,7 @@ func AllProxySyncEnvKey() []string {
EnvIPTable,
EnvEnableWebHookProxy,
EnvDisableCircuitBreaker,
EnvEnableFaultInjection,
EnvEnableApiServerCircuitBreaker,
EnvEnableRestCircuitBreaker,
EnvEnableRestFaultInjection,
Expand Down
Loading

0 comments on commit 2e8b51b

Please sign in to comment.