diff --git a/charts/assertoor/Chart.yaml b/charts/assertoor/Chart.yaml index 272d21e3..ac668853 100644 --- a/charts/assertoor/Chart.yaml +++ b/charts/assertoor/Chart.yaml @@ -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 diff --git a/charts/assertoor/README.md b/charts/assertoor/README.md index 4903e00c..2ec9cd73 100644 --- a/charts/assertoor/README.md +++ b/charts/assertoor/README.md @@ -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. @@ -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 | @@ -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 | @@ -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"` | | diff --git a/charts/assertoor/templates/service-headless.yaml b/charts/assertoor/templates/service-headless.yaml new file mode 100644 index 00000000..d9d09bb0 --- /dev/null +++ b/charts/assertoor/templates/service-headless.yaml @@ -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 }} diff --git a/charts/assertoor/templates/deployment.yaml b/charts/assertoor/templates/statefulset.yaml similarity index 73% rename from charts/assertoor/templates/deployment.yaml rename to charts/assertoor/templates/statefulset.yaml index fe0c6f7f..6d373e7a 100644 --- a/charts/assertoor/templates/deployment.yaml +++ b/charts/assertoor/templates/statefulset.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "assertoor.fullname" . }} labels: @@ -7,10 +7,14 @@ metadata: 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: @@ -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: @@ -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 }} diff --git a/charts/assertoor/values.yaml b/charts/assertoor/values.yaml index 449a3a97..b5cbe4eb 100644 --- a/charts/assertoor/values.yaml +++ b/charts/assertoor/values.yaml @@ -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 @@ -74,6 +74,9 @@ podLabels: {} # -- Pod annotations podAnnotations: {} +# -- Pod management policy +podManagementPolicy: OrderedReady + # -- Pod priority class priorityClassName: null @@ -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 @@ -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 @@ -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: @@ -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 }} @@ -234,7 +277,7 @@ config: | # Validator names validatorNames: - inventoryYaml: "/data/ranges.yaml" + inventoryYaml: "/config/ranges.yaml" inventoryUrl: "{{ .Values.validatorNamesInventory }}" globalVars: