-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: gating test #9918
feat: gating test #9918
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
name: aztec-chaos-scenarios | ||
description: Chaos scenarios for spartan using chaos-mesh | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "1.0.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.bootNodeFailure.enabled }} | ||
--- | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: PodChaos | ||
metadata: | ||
name: {{ .Values.global.targetNamespace }}-boot-node-failure | ||
namespace: {{ .Values.global.chaosMeshNamespace }} | ||
labels: | ||
{{- include "aztec-chaos-scenarios.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/resource-policy": keep | ||
spec: | ||
action: pod-failure | ||
mode: all | ||
selector: | ||
namespaces: | ||
- {{ .Values.global.targetNamespace }} | ||
labelSelectors: | ||
app: boot-node | ||
duration: {{ .Values.bootNodeFailure.duration }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.proverFailure.enabled }} | ||
--- | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: PodChaos | ||
metadata: | ||
name: {{ .Values.global.targetNamespace }}-prover-failure | ||
namespace: {{ .Values.global.chaosMeshNamespace }} | ||
labels: | ||
{{- include "aztec-chaos-scenarios.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/resource-policy": keep | ||
spec: | ||
action: pod-failure | ||
mode: all | ||
selector: | ||
namespaces: | ||
- {{ .Values.global.targetNamespace }} | ||
labelSelectors: | ||
app: prover-node | ||
duration: {{ .Values.proverFailure.duration }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.validatorKill.enabled }} | ||
--- | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: PodChaos | ||
metadata: | ||
name: {{ .Values.global.targetNamespace }}-validator-kill | ||
namespace: {{ .Values.global.chaosMeshNamespace }} | ||
labels: | ||
{{- include "aztec-chaos-scenarios.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/resource-policy": keep | ||
spec: | ||
action: pod-kill | ||
mode: fixed-percent | ||
value: {{ .Values.validatorKill.percent | quote }} | ||
selector: | ||
namespaces: | ||
- {{ .Values.global.targetNamespace }} | ||
labelSelectors: | ||
app: validator | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
nameOverride: null | ||
fullnameOverride: null | ||
|
||
global: | ||
# When deploying, override the namespace to where spartan will deploy to, this will apply all chaos experiments to all pods within that namespace | ||
# run deployment with --values global.namespace=your-namespace | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, thanks for including this note. It wasn't clear to me at first why the values files used different namespace refs. |
||
|
@@ -7,12 +10,12 @@ global: | |
# Network shaping configuration | ||
networkShaping: | ||
# Master switch to enable network shaping | ||
enabled: true | ||
enabled: false | ||
|
||
# Default settings | ||
defaultSettings: | ||
mode: all | ||
# Set duration to 1 year so the the experiment will run indefinitely unless overridden | ||
# Set duration to 1 year so the experiment will run indefinitely unless overridden | ||
duration: 8760h | ||
|
||
# Network conditions to apply | ||
|
@@ -62,9 +65,17 @@ networkShaping: | |
# Buffer = smoother bandwidth restriction but higher memory usage | ||
buffer: 1000 | ||
|
||
killProvers: | ||
enabled: false | ||
duration: 13m | ||
proverFailure: | ||
enabled: false | ||
duration: 13m | ||
|
||
validatorKill: | ||
enabled: false | ||
percent: 30 | ||
|
||
bootNodeFailure: | ||
enabled: false | ||
duration: 60m | ||
## Here are some exciting example configurations created by claude: | ||
# Example use cases for different configurations: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
global: | ||
namespace: "smoke" | ||
|
||
bootNodeFailure: | ||
enabled: true | ||
duration: 60m |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ networkShaping: | |
packetLoss: | ||
enabled: true | ||
loss: "0.5" | ||
correlation: "60" | ||
correlation: "60" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Imposes the network conditions that are stated as requirements for node operators | ||
global: | ||
namespace: "smoke" | ||
|
||
networkShaping: | ||
enabled: true | ||
conditions: | ||
latency: | ||
enabled: true | ||
delay: | ||
# Regional network latency (e.g., cross-country) | ||
latency: 100ms | ||
jitter: 20ms | ||
correlation: "75" | ||
bandwidth: | ||
enabled: true | ||
rate: 250mbps | ||
limit: 125000000 | ||
buffer: 25000 | ||
packetLoss: | ||
enabled: true | ||
loss: "0.5" | ||
correlation: "60" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
global: | ||
namespace: "smoke" | ||
|
||
proverFailure: | ||
enabled: true | ||
duration: 13m |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
global: | ||
namespace: "smoke" | ||
|
||
validatorKill: | ||
enabled: true | ||
percent: 25 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ http://{{ include "aztec-network.fullname" . }}-boot-node-0.{{ include "aztec-ne | |
{{- if .Values.validator.externalTcpHost -}} | ||
http://{{ .Values.validator.externalTcpHost }}:{{ .Values.validator.service.nodePort }} | ||
{{- else -}} | ||
http://{{ include "aztec-network.fullname" . }}-validator-0.{{ include "aztec-network.fullname" . }}-validator.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.validator.service.nodePort }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adjusts |
||
http://{{ include "aztec-network.fullname" . }}-validator.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.validator.service.nodePort }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ spec: | |
echo "L2 contracts initialized" | ||
env: | ||
- name: PXE_URL | ||
value: {{ include "aztec-network.pxeUrl" . | quote }} | ||
value: {{ include "aztec-network.bootNodeUrl" . | quote }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why has this changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to simplify, since the boot node is a PXE. |
||
- name: DEBUG | ||
value: "aztec:*" | ||
- name: LOG_LEVEL | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this annotation to mean that this resource is left behind when the helm chart is uninstalled. Is this intentional?
Would applying
"helm.sh/hook": post-install,post-upgrade
and"helm.sh/hook-weight": "<some-weight>"
be sufficient for the scenarios?