diff --git a/README.md b/README.md index 3e3137d0..5763ed4e 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ Tooling - [`beaconchain-explorer`](charts/beaconchain-explorer) - Beacon chain block explorer. - [`blobscan`](charts/blobscan) - Blobscan is the first blockchain explorer that helps to navigate and visualize those EIP-4844 blobs. +- [`blobscan-api`](charts/blobscan-api) - Blobscan tRPC API. - [`blobscan-indexer`](charts/blobscan-indexer) - Blobscan-Indexer indexes blobs in MongoDB for use with Blobscan. - [`blockscout`](charts/blockscout) - Execution layer block explorer. - [`consensus-monitor`](charts/consensus-monitor) - Web UI to check your ethereum consensus layer nodes via their beacon APIs. diff --git a/charts/blobscan-api/.helmignore b/charts/blobscan-api/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/blobscan-api/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/blobscan-api/Chart.yaml b/charts/blobscan-api/Chart.yaml new file mode 100644 index 00000000..911fefc1 --- /dev/null +++ b/charts/blobscan-api/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: blobscan-api +description: Blobscan tRPC API +home: https://blobscan.com +icon: https://raw.githubusercontent.com/Blobscan/blobscan/next/.github/assets/blobi.jpeg +sources: + - https://github.com/blobscan/blobscan/ +type: application +version: 0.2.0 +maintainers: + - name: samcm + email: sam.calder-mason@ethereum.org + - name: PabloCastellano + email: pablo@anche.no diff --git a/charts/blobscan-api/README.md b/charts/blobscan-api/README.md new file mode 100644 index 00000000..602e4bef --- /dev/null +++ b/charts/blobscan-api/README.md @@ -0,0 +1,69 @@ + +# blobscan-api + +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) + +Blobscan tRPC API + +**Homepage:** + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Affinity configuration for pods | +| annotations | object | `{}` | Annotations for the Deployment | +| args | list | `[]` | Command arguments | +| containerSecurityContext | object | See `values.yaml` | The security context for containers | +| customArgs | list | `["api"]` | Custom args for the blobscan container | +| customCommand | list | `[]` | Command replacement for the blobscan container | +| extraContainers | list | `[]` | Additional containers | +| extraEnv | list | `[{"name":"DATABASE_URL","value":"postgresql://postgres:postgres@blobscan-postgresql:5432/blobscan?ssl=false"},{"name":"BLOBSCAN_API_PORT","value":"3001"}]` | Additional env variables | +| extraPodPorts | list | `[]` | Extra Pod ports | +| extraPorts | list | `[]` | Additional ports. Useful when using extraContainers | +| extraVolumeMounts | list | `[]` | Additional volume mounts | +| extraVolumes | list | `[]` | Additional volumes | +| fullnameOverride | string | `""` | Overrides the chart's computed fullname | +| httpPort | int | `3001` | Ports | +| image.pullPolicy | string | `"IfNotPresent"` | blobscan container pull policy | +| image.repository | string | `"blossomlabs/blobscan"` | blobscan container image repository | +| image.tag | string | `"next"` | blobscan container image tag | +| imagePullSecrets | list | `[]` | Image pull secrets for Docker images | +| ingress.annotations | object | `{}` | Annotations for Ingress | +| ingress.enabled | bool | `false` | Ingress resource for the HTTP API | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths | list | `[]` | | +| ingress.tls | list | `[]` | Ingress TLS | +| initContainers | list | `[]` | Additional init containers | +| livenessProbe | object | See `values.yaml` | Liveness probe | +| nameOverride | string | `""` | Overrides the chart's name | +| nodeSelector | object | `{}` | Node selector for pods | +| podAnnotations | object | `{}` | Pod annotations | +| podDisruptionBudget | object | `{}` | Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created | +| podLabels | object | `{}` | Pod labels | +| priorityClassName | string | `nil` | Pod priority class | +| readinessProbe | object | See `values.yaml` | Readiness probe | +| replicas | int | `1` | Number of replicas | +| resources | object | `{}` | Resource requests and limits | +| secretEnv | object | `{}` | Secret env variables injected via a created secret | +| securityContext | object | See `values.yaml` | The security context for pods | +| service.type | string | `"ClusterIP"` | Service type | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `false` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | +| serviceMonitor.annotations | object | `{}` | Additional ServiceMonitor annotations | +| serviceMonitor.enabled | bool | `false` | If true, a ServiceMonitor CRD is created for a prometheus operator https://github.com/coreos/prometheus-operator | +| serviceMonitor.interval | string | `"15s"` | ServiceMonitor scrape interval | +| serviceMonitor.labels | object | `{}` | Additional ServiceMonitor labels | +| serviceMonitor.namespace | string | `nil` | Alternative namespace for ServiceMonitor | +| serviceMonitor.path | string | `"/metrics"` | Path to scrape | +| serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | +| serviceMonitor.scheme | string | `"http"` | ServiceMonitor scheme | +| serviceMonitor.scrapeTimeout | string | `"30s"` | ServiceMonitor scrape timeout | +| serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | +| terminationGracePeriodSeconds | int | `30` | How long to wait until the pod is forcefully terminated | +| tolerations | list | `[]` | Tolerations for pods | diff --git a/charts/blobscan-api/README.md.gotmpl b/charts/blobscan-api/README.md.gotmpl new file mode 100644 index 00000000..54549956 --- /dev/null +++ b/charts/blobscan-api/README.md.gotmpl @@ -0,0 +1,15 @@ + +{{ template "chart.header" . }} +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }} + +{{ template "chart.description" . }} + +{{ template "chart.homepageLine" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} diff --git a/charts/blobscan-api/templates/NOTES.txt b/charts/blobscan-api/templates/NOTES.txt new file mode 100644 index 00000000..c90d46cb --- /dev/null +++ b/charts/blobscan-api/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "blobscan.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "blobscan.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "blobscan.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ include "blobscan.httpPort" . }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "blobscan.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/blobscan-api/templates/_helpers.tpl b/charts/blobscan-api/templates/_helpers.tpl new file mode 100644 index 00000000..1fda9e40 --- /dev/null +++ b/charts/blobscan-api/templates/_helpers.tpl @@ -0,0 +1,66 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "blobscan.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "blobscan.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "blobscan.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "blobscan.labels" -}} +helm.sh/chart: {{ include "blobscan.chart" . }} +{{ include "blobscan.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "blobscan.selectorLabels" -}} +app.kubernetes.io/name: {{ include "blobscan.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "blobscan.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "blobscan.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{- define "blobscan.httpPort" -}} +{{ .Values.httpPort | default "3001" }} +{{- end }} diff --git a/charts/blobscan-api/templates/deployment.yaml b/charts/blobscan-api/templates/deployment.yaml new file mode 100644 index 00000000..8f9bd8f0 --- /dev/null +++ b/charts/blobscan-api/templates/deployment.yaml @@ -0,0 +1,100 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "blobscan.fullname" . }} + labels: + {{- include "blobscan.labels" . | nindent 4 }} + annotations: + {{- toYaml .Values.annotations | nindent 4 }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + {{- include "blobscan.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "blobscan.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + checksum/secrets: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + serviceAccountName: {{ include "blobscan.serviceAccountName" . }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + securityContext: + {{- toYaml .Values.securityContext | nindent 8 }} + initContainers: + {{- if .Values.initContainers }} + {{- toYaml .Values.initContainers | nindent 8 }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + {{- if gt (len .Values.customCommand) 0 }} + {{- toYaml .Values.customCommand | nindent 12}} + {{- else }} + {{- if gt (len .Values.args) 0 }} + {{- toYaml .Values.args | nindent 12}} + {{- end }} + {{- end }} + {{- if gt (len .Values.customArgs) 0 }} + args: + {{- toYaml .Values.customArgs | nindent 12}} + {{- end }} + securityContext: + {{- toYaml .Values.containerSecurityContext | nindent 12 }} + volumeMounts: + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} + ports: + - name: http + containerPort: {{ include "blobscan.httpPort" . }} + protocol: TCP + {{- if .Values.extraPodPorts }} + {{ toYaml .Values.extraPodPorts | nindent 10 }} + {{- end }} + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + env: + {{- range $key, $value := .Values.secretEnv }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ include "blobscan.fullname" $ }}-env + key: {{ $key }} + {{- end }} + {{- if .Values.extraEnv }} + {{- toYaml .Values.extraEnv | nindent 12 }} + {{- end }} + {{- if .Values.extraContainers }} + {{ toYaml .Values.extraContainers | nindent 8}} + {{- end }} + nodeSelector: + {{- toYaml .Values.nodeSelector | nindent 8 }} + affinity: + {{- toYaml .Values.affinity | nindent 8 }} + tolerations: + {{- toYaml .Values.tolerations | nindent 8 }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + volumes: + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | nindent 8}} + {{- end }} \ No newline at end of file diff --git a/charts/blobscan-api/templates/ingress.yaml b/charts/blobscan-api/templates/ingress.yaml new file mode 100644 index 00000000..35a7bb35 --- /dev/null +++ b/charts/blobscan-api/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "blobscan.fullname" . -}} +{{- $svcPort := include "blobscan.httpPort" . -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "blobscan.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/blobscan-api/templates/secret.yaml b/charts/blobscan-api/templates/secret.yaml new file mode 100644 index 00000000..5afc106e --- /dev/null +++ b/charts/blobscan-api/templates/secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "blobscan.fullname" . }}-env + labels: + {{- include "blobscan.labels" . | nindent 4 }} +data: +{{- range $key, $value := .Values.secretEnv }} + {{ $key }}: {{ $value | b64enc }} +{{- end }} diff --git a/charts/blobscan-api/templates/service.yaml b/charts/blobscan-api/templates/service.yaml new file mode 100644 index 00000000..6d14611b --- /dev/null +++ b/charts/blobscan-api/templates/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "blobscan.fullname" . }} + labels: + {{- include "blobscan.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ include "blobscan.httpPort" . }} + targetPort: http + protocol: TCP + name: http + {{- if .Values.extraPorts }} + {{ toYaml .Values.extraPorts | nindent 4}} + {{- end }} + selector: + {{- include "blobscan.selectorLabels" . | nindent 4 }} diff --git a/charts/blobscan-api/templates/serviceaccount.yaml b/charts/blobscan-api/templates/serviceaccount.yaml new file mode 100644 index 00000000..3dc43c9f --- /dev/null +++ b/charts/blobscan-api/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "blobscan.serviceAccountName" . }} + labels: + {{- include "blobscan.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/blobscan-api/templates/servicemonitor.yaml b/charts/blobscan-api/templates/servicemonitor.yaml new file mode 100644 index 00000000..f449f378 --- /dev/null +++ b/charts/blobscan-api/templates/servicemonitor.yaml @@ -0,0 +1,43 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "blobscan.fullname" . }} + {{- if .Values.serviceMonitor.namespace }} + namespace: {{ .Values.serviceMonitor.namespace }} + {{- end }} + labels: + {{- include "blobscan.labels" . | nindent 4 }} + {{- if .Values.serviceMonitor.labels }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + {{- end }} + {{- if .Values.serviceMonitor.annotations }} + annotations: + {{ toYaml .Values.serviceMonitor.annotations | nindent 4 }} + {{- end }} +spec: + endpoints: + - interval: {{ .Values.serviceMonitor.interval }} + {{- if .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} + {{- end }} + honorLabels: true + port: metrics + path: {{ .Values.serviceMonitor.path }} + scheme: {{ .Values.serviceMonitor.scheme }} + {{- if .Values.serviceMonitor.tlsConfig }} + tlsConfig: + {{- toYaml .Values.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} + {{- if .Values.serviceMonitor.relabelings }} + relabelings: + {{- toYaml .Values.serviceMonitor.relabelings | nindent 4 }} + {{- end }} + jobLabel: "{{ .Release.Name }}" + selector: + matchLabels: + {{- include "blobscan.selectorLabels" . | nindent 8 }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/charts/blobscan-api/values.yaml b/charts/blobscan-api/values.yaml new file mode 100644 index 00000000..490f571b --- /dev/null +++ b/charts/blobscan-api/values.yaml @@ -0,0 +1,189 @@ +# -- Overrides the chart's name +nameOverride: "" + +# -- Overrides the chart's computed fullname +fullnameOverride: "" + +# -- Number of replicas +replicas: 1 + +image: + # -- blobscan container image repository + repository: blossomlabs/blobscan + # -- blobscan container image tag + tag: next + # -- blobscan container pull policy + pullPolicy: IfNotPresent + +# -- Secret env variables injected via a created secret +secretEnv: {} + +# -- Ports +httpPort: 3001 + +# -- Command arguments +args: [] + +# -- Additional env variables +extraEnv: + - name: DATABASE_URL + value: "postgresql://postgres:postgres@blobscan-postgresql:5432/blobscan?ssl=false" + - name: BLOBSCAN_API_PORT + value: "3001" + +ingress: + # -- Ingress resource for the HTTP API + enabled: false + # -- Annotations for Ingress + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # -- Ingress host + hosts: + - host: chart-example.local + paths: [] + # -- Ingress TLS + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +# -- Custom args for the blobscan container +customArgs: ["api"] + +# -- Command replacement for the blobscan container +customCommand: [] # Only change this if you need to change the default command + +service: + # -- Service type + type: ClusterIP + +# -- Affinity configuration for pods +affinity: {} + +# -- Image pull secrets for Docker images +imagePullSecrets: [] + +# -- Annotations for the Deployment +annotations: {} + +# -- Liveness probe +# @default -- See `values.yaml` +livenessProbe: + tcpSocket: + port: http + initialDelaySeconds: 60 + periodSeconds: 120 + +# -- Readiness probe +# @default -- See `values.yaml` +readinessProbe: + tcpSocket: + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + +# -- Node selector for pods +nodeSelector: {} + +# -- Pod labels +podLabels: {} + +# -- Pod annotations +podAnnotations: {} + +# -- Extra Pod ports +extraPodPorts: [] + +# -- Pod priority class +priorityClassName: null + +# -- Resource requests and limits +resources: {} +# limits: +# cpu: 500m +# memory: 2Gi +# requests: +# cpu: 300m +# memory: 1Gi + +# -- The security context for pods +# @default -- See `values.yaml` +securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + +# -- The security context for containers +# @default -- See `values.yaml` +containerSecurityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +serviceAccount: + # -- Specifies whether a service account should be created + create: false + # -- Annotations to add to the service account + annotations: {} + # -- The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# -- How long to wait until the pod is forcefully terminated +terminationGracePeriodSeconds: 30 + +# -- Tolerations for pods +## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +tolerations: [] + +# -- Define the PodDisruptionBudget spec +# If not set then a PodDisruptionBudget will not be created +podDisruptionBudget: {} +# minAvailable: 1 +# maxUnavailable: 1 + +# -- Additional init containers +initContainers: [] +# - name: my-init-container +# image: busybox:latest +# command: ['sh', '-c', 'echo hello'] + +# -- Additional containers +extraContainers: [] + +# -- Additional volumes +extraVolumes: [] + +# -- Additional volume mounts +extraVolumeMounts: [] + +# -- Additional ports. Useful when using extraContainers +extraPorts: [] + +serviceMonitor: + # -- If true, a ServiceMonitor CRD is created for a prometheus operator + # https://github.com/coreos/prometheus-operator + enabled: false + # -- Path to scrape + path: /metrics + # -- Alternative namespace for ServiceMonitor + namespace: null + # -- Additional ServiceMonitor labels + labels: {} + # -- Additional ServiceMonitor annotations + annotations: {} + # -- ServiceMonitor scrape interval + interval: 15s + # -- ServiceMonitor scheme + scheme: http + # -- ServiceMonitor TLS configuration + tlsConfig: {} + # -- ServiceMonitor scrape timeout + scrapeTimeout: 30s + # -- ServiceMonitor relabelings + relabelings: [] diff --git a/charts/blobscan-indexer/Chart.yaml b/charts/blobscan-indexer/Chart.yaml index ceed0c2b..fef6804b 100644 --- a/charts/blobscan-indexer/Chart.yaml +++ b/charts/blobscan-indexer/Chart.yaml @@ -1,9 +1,14 @@ apiVersion: v2 name: blobscan-indexer description: Blobscan-indexer indexes blobs in MongoDB for use with Blobscan. -home: https://github.com/blobscan/blobscan-indexer +home: https://blobscan.com +icon: https://raw.githubusercontent.com/Blobscan/blobscan/next/.github/assets/blobi.jpeg +sources: + - https://github.com/blobscan/blobscan-indexer type: application -version: 0.1.1 +version: 0.2.0 maintainers: - name: samcm email: sam.calder-mason@ethereum.org + - name: PabloCastellano + email: pablo@anche.no diff --git a/charts/blobscan-indexer/README.md b/charts/blobscan-indexer/README.md index ade33dcd..911b81d1 100644 --- a/charts/blobscan-indexer/README.md +++ b/charts/blobscan-indexer/README.md @@ -1,11 +1,15 @@ # blobscan-indexer -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Blobscan-indexer indexes blobs in MongoDB for use with Blobscan. -**Homepage:** +**Homepage:** + +## Source Code + +* ## Values @@ -18,15 +22,15 @@ Blobscan-indexer indexes blobs in MongoDB for use with Blobscan. | customArgs | list | `[]` | Custom args for the blobscan-indexer container | | customCommand | list | `[]` | Command replacement for the blobscan-indexer container | | extraContainers | list | `[]` | Additional containers | -| extraEnv | list | `[{"name":"MONGODB_URI","value":"mongodb://mongodb:27017"},{"name":"MONGODB_DB","value":"blobscan"},{"name":"EXECUTION_NODE_RPC","value":"http://your-execution-node:8545"},{"name":"BEACON_NODE_RPC","value":"http://your-beacon-node:5052"}]` | Additional env variables | +| extraEnv | list | `[{"name":"BLOBSCAN_API_ENDPOINT","value":"http://blobscan-api:3001"},{"name":"EXECUTION_NODE_RPC","value":"http://your-execution-node:8545"},{"name":"BEACON_NODE_RPC","value":"http://your-beacon-node:5052"},{"name":"SECRET_KEY","value":"supersecret"}]` | Additional env variables | | extraPodPorts | list | `[]` | Extra Pod ports | | extraPorts | list | `[]` | Additional ports. Useful when using extraContainers | | extraVolumeMounts | list | `[]` | Additional volume mounts | | extraVolumes | list | `[]` | Additional volumes | | fullnameOverride | string | `""` | Overrides the chart's computed fullname | | image.pullPolicy | string | `"IfNotPresent"` | blobscan-indexer container pull policy | -| image.repository | string | `"ethpandaops/blobscan-indexer"` | blobscan-indexer container image repository | -| image.tag | string | `"latest"` | blobscan-indexer container image tag | +| image.repository | string | `"blossomlabs/blobscan-indexer"` | blobscan-indexer container image repository | +| image.tag | string | `"master"` | blobscan-indexer container image tag | | imagePullSecrets | list | `[]` | Image pull secrets for Docker images | | ingress.annotations | object | `{}` | Annotations for Ingress | | ingress.enabled | bool | `false` | Ingress resource for the HTTP API | diff --git a/charts/blobscan-indexer/values.yaml b/charts/blobscan-indexer/values.yaml index 3b3d0ff6..69ad7203 100644 --- a/charts/blobscan-indexer/values.yaml +++ b/charts/blobscan-indexer/values.yaml @@ -9,9 +9,9 @@ replicas: 1 image: # -- blobscan-indexer container image repository - repository: ethpandaops/blobscan-indexer + repository: blossomlabs/blobscan-indexer # -- blobscan-indexer container image tag - tag: latest + tag: master # -- blobscan-indexer container pull policy pullPolicy: IfNotPresent @@ -23,14 +23,14 @@ args: [] # -- Additional env variables extraEnv: - - name: MONGODB_URI - value: "mongodb://mongodb:27017" - - name: MONGODB_DB - value: "blobscan" + - name: BLOBSCAN_API_ENDPOINT + value: "http://blobscan-api:3001" - name: EXECUTION_NODE_RPC value: "http://your-execution-node:8545" - name: BEACON_NODE_RPC value: "http://your-beacon-node:5052" + - name: SECRET_KEY + value: "supersecret" ingress: # -- Ingress resource for the HTTP API diff --git a/charts/blobscan/Chart.lock b/charts/blobscan/Chart.lock new file mode 100644 index 00000000..6667c31f --- /dev/null +++ b/charts/blobscan/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.5.1 +digest: sha256:a0bc759194541dc3c3a94171da35bbe2dcb50731406b381409cfb2abd8c88d33 +generated: "2023-05-14T12:59:38.002079658+02:00" diff --git a/charts/blobscan/Chart.yaml b/charts/blobscan/Chart.yaml index 70dc19a1..2fc1f52c 100644 --- a/charts/blobscan/Chart.yaml +++ b/charts/blobscan/Chart.yaml @@ -1,9 +1,20 @@ apiVersion: v2 name: blobscan description: Blobscan is the first blockchain explorer that helps to navigate and visualize those EIP-4844 blobs -home: https://github.com/blobscan/blobscan +home: https://blobscan.com +icon: https://raw.githubusercontent.com/Blobscan/blobscan/next/.github/assets/blobi.jpeg +sources: + - https://github.com/blobscan/blobscan/ type: application -version: 0.1.1 +version: 0.2.0 maintainers: - name: samcm email: sam.calder-mason@ethereum.org + - name: PabloCastellano + email: pablo@anche.no +dependencies: +- name: postgresql + version: "12.5.1" + repository: "https://charts.bitnami.com/bitnami" + alias: blobscandb + condition: postgresql.enabled diff --git a/charts/blobscan/README.md b/charts/blobscan/README.md index fcc30473..6c8604c7 100644 --- a/charts/blobscan/README.md +++ b/charts/blobscan/README.md @@ -1,11 +1,21 @@ # blobscan -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Blobscan is the first blockchain explorer that helps to navigate and visualize those EIP-4844 blobs -**Homepage:** +**Homepage:** + +## Source Code + +* + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://charts.bitnami.com/bitnami | blobscandb(postgresql) | 12.5.1 | ## Values @@ -15,10 +25,10 @@ Blobscan is the first blockchain explorer that helps to navigate and visualize t | annotations | object | `{}` | Annotations for the Deployment | | args | list | `[]` | Command arguments | | containerSecurityContext | object | See `values.yaml` | The security context for containers | -| customArgs | list | `[]` | Custom args for the blobscan container | +| customArgs | list | `["web"]` | Custom args for the blobscan container | | customCommand | list | `[]` | Command replacement for the blobscan container | | extraContainers | list | `[]` | Additional containers | -| extraEnv | list | `[{"name":"MONGODB_URI","value":"mongodb://mongodb:27017"},{"name":"MONGODB_DB","value":"blobscan"}]` | Additional env variables | +| extraEnv | list | `[{"name":"DATABASE_URL","value":"postgresql://postgres:postgres@blobscan-postgresql:5432/blobscan?schema=public"},{"name":"NEXTAUTH_URL","value":"http://localhost:3000"},{"name":"NEXTAUTH_SECRET","value":"supersecret"},{"name":"NEXT_PUBLIC_BEACON_BASE_URL","value":"http://134.209.87.158:8080/"},{"name":"NEXT_PUBLIC_EXPLORER_BASE_URL","value":"https://explorer.4844-devnet-5.etpandaops.io/"}]` | Additional env variables | | extraPodPorts | list | `[]` | Extra Pod ports | | extraPorts | list | `[]` | Additional ports. Useful when using extraContainers | | extraVolumeMounts | list | `[]` | Additional volume mounts | @@ -26,8 +36,8 @@ Blobscan is the first blockchain explorer that helps to navigate and visualize t | fullnameOverride | string | `""` | Overrides the chart's computed fullname | | httpPort | int | `3000` | Ports | | image.pullPolicy | string | `"IfNotPresent"` | blobscan container pull policy | -| image.repository | string | `"ethpandaops/blobscan"` | blobscan container image repository | -| image.tag | string | `"latest"` | blobscan container image tag | +| image.repository | string | `"blossomlabs/blobscan"` | blobscan container image repository | +| image.tag | string | `"next"` | blobscan container image tag | | imagePullSecrets | list | `[]` | Image pull secrets for Docker images | | ingress.annotations | object | `{}` | Annotations for Ingress | | ingress.enabled | bool | `false` | Ingress resource for the HTTP API | @@ -41,6 +51,18 @@ Blobscan is the first blockchain explorer that helps to navigate and visualize t | podAnnotations | object | `{}` | Pod annotations | | podDisruptionBudget | object | `{}` | Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created | | podLabels | object | `{}` | Pod labels | +| postgresql.auth.database | string | `"blobscan"` | | +| postgresql.auth.password | string | `"postgres"` | | +| postgresql.auth.postgresPassword | string | `"postgres"` | | +| postgresql.auth.username | string | `"postgres"` | | +| postgresql.enabled | bool | `true` | If enabled a postgres chart will be deployed as a dependency | +| postgresql.image.registry | string | `"docker.io"` | | +| postgresql.image.repository | string | `"bitnami/postgresql"` | | +| postgresql.image.tag | string | `"14.8.0"` | | +| postgresql.initdbScripts | object | See `values.yaml` | How to init the PSQL DB | +| postgresql.persistence.enabled | bool | `true` | | +| postgresql.persistence.size | string | `"8Gi"` | | +| postgresql.pullPolicy | string | `"IfNotPresent"` | | | priorityClassName | string | `nil` | Pod priority class | | readinessProbe | object | See `values.yaml` | Readiness probe | | replicas | int | `1` | Number of replicas | diff --git a/charts/blobscan/values.yaml b/charts/blobscan/values.yaml index e5244b34..0de01b6e 100644 --- a/charts/blobscan/values.yaml +++ b/charts/blobscan/values.yaml @@ -9,9 +9,9 @@ replicas: 1 image: # -- blobscan container image repository - repository: ethpandaops/blobscan + repository: blossomlabs/blobscan # -- blobscan container image tag - tag: latest + tag: next # -- blobscan container pull policy pullPolicy: IfNotPresent @@ -26,10 +26,16 @@ args: [] # -- Additional env variables extraEnv: - - name: MONGODB_URI - value: "mongodb://mongodb:27017" - - name: MONGODB_DB - value: "blobscan" + - name: DATABASE_URL + value: "postgresql://postgres:postgres@blobscan-postgresql:5432/blobscan?schema=public" + - name: NEXTAUTH_URL + value: "http://localhost:3000" + - name: NEXTAUTH_SECRET + value: "supersecret" + - name: NEXT_PUBLIC_BEACON_BASE_URL + value: "http://134.209.87.158:8080/" + - name: NEXT_PUBLIC_EXPLORER_BASE_URL + value: "https://explorer.4844-devnet-5.etpandaops.io/" ingress: # -- Ingress resource for the HTTP API @@ -49,7 +55,7 @@ ingress: # - chart-example.local # -- Custom args for the blobscan container -customArgs: [] +customArgs: ["web"] # -- Command replacement for the blobscan container customCommand: [] # Only change this if you need to change the default command @@ -191,3 +197,25 @@ serviceMonitor: scrapeTimeout: 30s # -- ServiceMonitor relabelings relabelings: [] + +postgresql: + # -- If enabled a postgres chart will be deployed as a dependency + enabled: true + auth: + postgresPassword: postgres + username: postgres + password: postgres + database: blobscan + image: + registry: docker.io + repository: bitnami/postgresql + tag: 14.8.0 + pullPolicy: IfNotPresent + persistence: + enabled: true + size: 8Gi + # -- How to init the PSQL DB + # @default -- See `values.yaml` + initdbScripts: + init_01.sql: | + CREATE DATABASE blobscan;