Skip to content

Commit

Permalink
feat(charts/tracoor-single): move to sts (#327)
Browse files Browse the repository at this point in the history
* feat(charts/tracoor-single): move to sts
  • Loading branch information
Savid committed Jul 31, 2024
1 parent b889ea0 commit fbdcdeb
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 33 deletions.
2 changes: 1 addition & 1 deletion charts/tracoor-single/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions charts/tracoor-single/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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"` | |
Expand All @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down
22 changes: 0 additions & 22 deletions charts/tracoor-single/templates/hpa.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "tracoor-single.fullname" . }}
labels:
{{- include "tracoor-single.labels" . | nindent 4 }}
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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
25 changes: 23 additions & 2 deletions charts/tracoor-single/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ config:
store:
type: fs
config:
base_path: "/tmp/tracoor"
base_path: "/data/store"

server:
addr: ":8081"
Expand All @@ -50,7 +50,7 @@ config:
ntpServer: time.google.com

persistence:
dsn: "file:/tmp/tracoor.db"
dsn: "file:/data/tracoor.db"
driver_name: sqlite

services:
Expand Down Expand Up @@ -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: {}

Expand Down

0 comments on commit fbdcdeb

Please sign in to comment.