Skip to content

Commit

Permalink
update assertoor helm chart for persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Oct 1, 2024
1 parent fd74487 commit 1116347
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/assertoor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ home: https://github.com/ethpandaops/assertoor
sources:
- https://github.com/ethpandaops/assertoor
type: application
version: 0.0.4
version: 0.0.5
appVersion: "1.0.0"
maintainers:
- name: pk910
Expand Down
16 changes: 14 additions & 2 deletions charts/assertoor/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# assertoor

![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Testing tool that is capable of doing actions and checking conditions on ethereum pos networks.

Expand Down Expand Up @@ -56,10 +56,12 @@ assertoorTests:
| annotations | object | `{}` | Annotations for the StatefulSet |
| assertoorApiEnabled | bool | `true` | Enable assertoor API |
| assertoorFrontendEnabled | bool | `true` | Enable assertoor UI |
| assertoorMaxConcurrentTests | int | `1` | Maximum number of concurrent tests |
| assertoorTestRetentionTime | string | `"30d"` | Test retention time |
| assertoorTests | list | `[]` | assertoor test configurations -- file is the only required field. All other fields default to the values provided in the test file, but can be overriden if needed. |
| config | string | See `values.yaml` | Config file |
| containerSecurityContext | object | See `values.yaml` | The security context for containers |
| customArgs | list | `["--config=/data/assertoor-config.yaml"]` | Custom args for the assertoor container |
| customArgs | list | `["--config=/config/assertoor-config.yaml"]` | Custom args for the assertoor container |
| customCommand | list | `[]` | Command replacement for the assertoor container |
| endpoints | list | `[{"consensusHeaders":{"X-Test":"test","Y-Test":"test2"},"consensusUrl":"http://beacon-node:5052","executionHeaders":{"X-Test":"test","Y-Test":"test2"},"executionUrl":"http://execution-node:8545","name":"default-endpoint"}]` | An array of endpoints to use for assertoor -- executionUrl & consensusUrl are the only required fields |
| extraContainers | list | `[]` | Additional containers |
Expand Down Expand Up @@ -87,9 +89,17 @@ assertoorTests:
| initContainers | list | `[]` | Additional init containers |
| nameOverride | string | `""` | Overrides the chart's name |
| nodeSelector | object | `{}` | Node selector for pods |
| persistence.accessModes | list | `["ReadWriteOnce"]` | Access mode for the volume claim template |
| persistence.annotations | object | `{}` | Annotations for volume claim template |
| persistence.enabled | bool | `false` | Uses an EmptyDir when not enabled |
| persistence.existingClaim | string | `nil` | Use an existing PVC when persistence.enabled |
| persistence.selector | object | `{}` | Selector for volume claim template |
| persistence.size | string | `"5Gi"` | Requested size for volume claim template |
| persistence.storageClassName | string | `nil` | Use a specific storage class E.g 'local-path' for local storage to achieve best performance Read more (https://github.com/rancher/local-path-provisioner) |
| podAnnotations | object | `{}` | Pod annotations |
| podDisruptionBudget | object | `{}` | Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created |
| podLabels | object | `{}` | Pod labels |
| podManagementPolicy | string | `"OrderedReady"` | Pod management policy |
| priorityClassName | string | `nil` | Pod priority class |
| resources | object | `{}` | Resource requests and limits |
| securityContext | object | See `values.yaml` | The security context for pods |
Expand All @@ -100,5 +110,7 @@ assertoorTests:
| terminationGracePeriodSeconds | int | `30` | How long to wait until the pod is forcefully terminated |
| tolerations | list | `[]` | Tolerations for pods |
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pods |
| updateStrategy | object | `{"type":"RollingUpdate"}` | Update stategy for the Statefulset |
| updateStrategy.type | string | `"RollingUpdate"` | Update stategy type |
| validatorNamesInventory | string | `""` | This can be a url here for example: -- "https://config.dencun-devnet-8.ethpandaops.io/api/v1/nodes/validator-ranges" -- If you want to use a local range file define it in the values.yaml validatorNamesRanges section |
| validatorNamesRanges | string | `"0-1: test\n"` | |
22 changes: 22 additions & 0 deletions charts/assertoor/templates/service-headless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "assertoor.fullname" . }}-headless
labels:
{{- include "assertoor.labels" . | nindent 4 }}
spec:
clusterIP: None
ports:
- port: {{ include "assertoor.httpPort" . }}
targetPort: http
protocol: TCP
name: http
- port: {{ include "assertoor.httpPortAdmin" . }}
targetPort: http-admin
protocol: TCP
name: http-admin
{{- if .Values.extraPorts }}
{{ toYaml .Values.extraPorts | nindent 4}}
{{- end }}
selector:
{{- include "assertoor.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "assertoor.fullname" . }}
labels:
{{- include "assertoor.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.annotations | nindent 4 }}
spec:
podManagementPolicy: {{ .Values.podManagementPolicy }}
replicas: 1
selector:
matchLabels:
{{- include "assertoor.selectorLabels" . | nindent 6 }}
serviceName: {{ include "assertoor.fullname" . }}-headless
updateStrategy:
{{- toYaml .Values.updateStrategy | nindent 4 }}
template:
metadata:
labels:
Expand Down Expand Up @@ -52,12 +56,14 @@ spec:
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | nindent 12}}
{{- end }}
- name: storage
mountPath: "/data"
- name: config
mountPath: "/data/assertoor-config.yaml"
mountPath: "/config/assertoor-config.yaml"
subPath: assertoor-config.yaml
readOnly: true
- name: ranges
mountPath: "/data/ranges.yaml"
mountPath: "/config/ranges.yaml"
subPath: ranges.yaml
readOnly: true
ports:
Expand Down Expand Up @@ -95,3 +101,28 @@ spec:
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | nindent 8}}
{{- end }}
{{- if not .Values.persistence.enabled }}
- name: storage
emptyDir: {}
{{- else if .Values.persistence.existingClaim }}
- name: storage
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
{{- else }}
volumeClaimTemplates:
- metadata:
name: storage
annotations:
{{- toYaml .Values.persistence.annotations | nindent 8 }}
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 8 }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
storageClassName: {{ .Values.persistence.storageClassName }}
{{- if .Values.persistence.selector }}
selector:
{{- toYaml .Values.persistence.selector | nindent 8 }}
{{- end }}
{{- end }}
47 changes: 45 additions & 2 deletions charts/assertoor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ image:

# -- Custom args for the assertoor container
customArgs:
- --config=/data/assertoor-config.yaml
- --config=/config/assertoor-config.yaml

# -- Command replacement for the assertoor container
customCommand: [] # Only change this if you need to change the default command
Expand Down Expand Up @@ -74,6 +74,9 @@ podLabels: {}
# -- Pod annotations
podAnnotations: {}

# -- Pod management policy
podManagementPolicy: OrderedReady

# -- Pod priority class
priorityClassName: null

Expand Down Expand Up @@ -104,6 +107,26 @@ containerSecurityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

persistence:
# -- Uses an EmptyDir when not enabled
enabled: false
# -- Use an existing PVC when persistence.enabled
existingClaim: null
# -- Access mode for the volume claim template
accessModes:
- ReadWriteOnce
# -- Requested size for volume claim template
size: 5Gi
# -- Use a specific storage class
# E.g 'local-path' for local storage to achieve best performance
# Read more (https://github.com/rancher/local-path-provisioner)
storageClassName: null
# -- Annotations for volume claim template
annotations: {}
# -- Selector for volume claim template
selector: {}
# matchLabels:
# app.kubernetes.io/name: something

serviceAccount:
# -- Specifies whether a service account should be created
Expand Down Expand Up @@ -131,6 +154,11 @@ podDisruptionBudget: {}
# minAvailable: 1
# maxUnavailable: 1

# -- Update stategy for the Statefulset
updateStrategy:
# -- Update stategy type
type: RollingUpdate

# -- Additional init containers
initContainers: []
# - name: my-init-container
Expand Down Expand Up @@ -186,6 +214,12 @@ assertoorFrontendEnabled: true
# -- Enable assertoor API
assertoorApiEnabled: true

# -- Maximum number of concurrent tests
assertoorMaxConcurrentTests: 1

# -- Test retention time
assertoorTestRetentionTime: 30d

# -- global assertoor variables
# -- global variables are passed to all tests.
globalVariables:
Expand All @@ -210,6 +244,15 @@ config: |
api:
enabled: {{ .Values.assertoorApiEnabled }}
database:
engine: "sqlite"
sqlite:
file: "/data/assertoor.sqlite"
coordinator:
maxConcurrentTests: {{ .Values.assertoorMaxConcurrentTests }}
testRetentionTime: {{ .Values.assertoorTestRetentionTime }}
# Endpoints
endpoints:
{{- range .Values.endpoints }}
Expand All @@ -234,7 +277,7 @@ config: |
# Validator names
validatorNames:
inventoryYaml: "/data/ranges.yaml"
inventoryYaml: "/config/ranges.yaml"
inventoryUrl: "{{ .Values.validatorNamesInventory }}"
globalVars:
Expand Down

0 comments on commit 1116347

Please sign in to comment.