mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-08-25 09:27:36 +00:00
Fix issue with matching labels
This commit fixes the issue with application outages scenario where the pod-selector is not being mapped properly.
This commit is contained in:
@@ -6,7 +6,7 @@ Scenario to block the traffic ( Ingress/Egress ) of an application matching the
|
||||
application_outage: # Scenario to create an outage of an application by blocking traffic
|
||||
duration: 600 # Duration in seconds after which the routes will be accessible
|
||||
namespace: <namespace-with-application> # Namespace to target - all application routes will go inaccessible if pod selector is empty
|
||||
pod_selector: {app=foo} # Pods to target
|
||||
pod_selector: {app: foo} # Pods to target
|
||||
block: [Ingress, Egress] # It can be Ingress or Egress or Ingress, Egress
|
||||
```
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ kind: NetworkPolicy
|
||||
metadata:
|
||||
name: kraken-deny
|
||||
spec:
|
||||
podSelector: {{ pod_selector }}
|
||||
podSelector:
|
||||
matchLabels: {{ pod_selector }}
|
||||
policyTypes: {{ traffic_type }}
|
||||
"""
|
||||
t = Template(network_policy_template)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
application_outage: # Scenario to create an outage of an application by blocking traffic
|
||||
duration: 600 # Duration in seconds after which the routes will be accessible
|
||||
namespace: <namespace-with-application> # Namespace to target - all application routes will go inaccessible if pod selector is empty
|
||||
pod_selector: {app=foo} # Pods to target
|
||||
pod_selector: {app: foo} # Pods to target
|
||||
block: [Ingress, Egress] # It can be Ingress or Egress or Ingress, Egress
|
||||
|
||||
Reference in New Issue
Block a user