diff --git a/docs/application_outages.md b/docs/application_outages.md index 9f460ae4..f2ad9348 100644 --- a/docs/application_outages.md +++ b/docs/application_outages.md @@ -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 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 ``` diff --git a/kraken/application_outage/actions.py b/kraken/application_outage/actions.py index e48a0d26..6c82f8d8 100644 --- a/kraken/application_outage/actions.py +++ b/kraken/application_outage/actions.py @@ -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) diff --git a/scenarios/app_outage.yaml b/scenarios/app_outage.yaml index 4a5d39ea..6459727d 100644 --- a/scenarios/app_outage.yaml +++ b/scenarios/app_outage.yaml @@ -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 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