diff --git a/charts/tracoor-single/Chart.yaml b/charts/tracoor-single/Chart.yaml index c090476f..7afe65ee 100644 --- a/charts/tracoor-single/Chart.yaml +++ b/charts/tracoor-single/Chart.yaml @@ -3,7 +3,7 @@ name: tracoor-single description: Ethereum debug data capture and indexer home: https://github.com/ethpandaops/tracoor type: application -version: 0.0.2 +version: 0.0.3 maintainers: - name: samcm email: sam.calder-mason@ethereum.org diff --git a/charts/tracoor-single/README.md b/charts/tracoor-single/README.md index 71025cf8..7b692a29 100644 --- a/charts/tracoor-single/README.md +++ b/charts/tracoor-single/README.md @@ -1,7 +1,7 @@ # tracoor-single -![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.0.3](https://img.shields.io/badge/Version-0.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Ethereum debug data capture and indexer @@ -29,7 +29,7 @@ Ethereum debug data capture and indexer | config.server.gatewayAddr | string | `":8080"` | | | config.server.ntpServer | string | `"time.google.com"` | | | config.server.persistence.driver_name | string | `"sqlite"` | | -| config.server.persistence.dsn | string | `"file:/tmp/tracoor.db"` | | +| config.server.persistence.dsn | string | `"file:/data/tracoor.db"` | | | config.server.pprofAddr | string | `":6060"` | | | config.server.preStopSleepSeconds | int | `1` | | | config.server.services.indexer.retention.beaconBlocks | string | `"30m"` | | @@ -38,7 +38,7 @@ Ethereum debug data capture and indexer | config.shared.indexer.address | string | `"localhost:8081"` | | | config.shared.logging | string | `"debug"` | | | config.shared.metricsAddr | string | `":9091"` | | -| config.shared.store.config.base_path | string | `"/tmp/tracoor"` | | +| config.shared.store.config.base_path | string | `"/data/store"` | | | config.shared.store.type | string | `"fs"` | | | containerSecurityContext | object | See `values.yaml` | The security context for containers | | customArgs | list | `[]` | Custom args for the tracoor container | @@ -69,6 +69,13 @@ Ethereum debug data capture and indexer | livenessProbe | object | See `values.yaml` | Liveness probe | | 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 | `"20Gi"` | 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 | diff --git a/charts/tracoor-single/templates/hpa.yaml b/charts/tracoor-single/templates/hpa.yaml deleted file mode 100644 index 996c3a64..00000000 --- a/charts/tracoor-single/templates/hpa.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.autoscaling.enabled -}} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "tracoor-single.fullname" . }} - labels: - {{- include "tracoor-single.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "tracoor-single.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} -{{- end }} diff --git a/charts/tracoor-single/templates/deployment.yaml b/charts/tracoor-single/templates/statefulset.yaml similarity index 79% rename from charts/tracoor-single/templates/deployment.yaml rename to charts/tracoor-single/templates/statefulset.yaml index 6760b90d..e1a51f1a 100644 --- a/charts/tracoor-single/templates/deployment.yaml +++ b/charts/tracoor-single/templates/statefulset.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "tracoor-single.fullname" . }} labels: @@ -7,7 +7,11 @@ metadata: annotations: {{- toYaml .Values.annotations | nindent 4 }} spec: + serviceName: {{ include "tracoor-single.fullname" . }} replicas: {{ .Values.replicas }} + podManagementPolicy: {{ .Values.podManagementPolicy }} + updateStrategy: + {{- toYaml .Values.updateStrategy | nindent 4 }} selector: matchLabels: {{- include "tracoor-single.selectorLabels" . | nindent 6 }} @@ -65,8 +69,10 @@ spec: mountPath: "/config.yaml" subPath: config.yaml readOnly: true + - name: storage + mountPath: "/data" {{- if .Values.extraVolumeMounts }} - {{ toYaml .Values.extraVolumeMounts | nindent 10 }} + {{ toYaml .Values.extraVolumeMounts | nindent 10}} {{- end }} ports: - name: http @@ -118,9 +124,34 @@ spec: {{- toYaml .Values.topologySpreadConstraints | nindent 8 }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} volumes: - {{- if .Values.extraVolumes }} - {{ toYaml .Values.extraVolumes | nindent 8}} - {{- end }} - name: config configMap: name: {{ include "tracoor-single.fullname" . }} + {{- 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/tracoor-single/values.yaml b/charts/tracoor-single/values.yaml index aef70498..f660b91a 100644 --- a/charts/tracoor-single/values.yaml +++ b/charts/tracoor-single/values.yaml @@ -40,7 +40,7 @@ config: store: type: fs config: - base_path: "/tmp/tracoor" + base_path: "/data/store" server: addr: ":8081" @@ -50,7 +50,7 @@ config: ntpServer: time.google.com persistence: - dsn: "file:/tmp/tracoor.db" + dsn: "file:/data/tracoor.db" driver_name: sqlite services: @@ -165,6 +165,27 @@ readinessProbe: # -- Node selector for pods nodeSelector: {} +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: 20Gi + # -- 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 + # -- Pod labels podLabels: {}