From 4285b56e841daa6b31aabff716fc1c8ed05228fe Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Wed, 7 Aug 2024 19:59:11 +0200 Subject: [PATCH] blobscan is now a meta chart that depends on blobscan-{web,api,indexer} (#10) --- README.md | 7 +- charts/blobscan/Chart.lock | 13 +- charts/blobscan/Chart.yaml | 13 +- charts/blobscan/README.md | 7 +- charts/blobscan/templates/NOTES.txt | 22 --- charts/blobscan/templates/_helpers.tpl | 66 --------- charts/blobscan/templates/deployment.yaml | 136 ------------------ charts/blobscan/templates/ingress.yaml | 61 -------- charts/blobscan/templates/secret.yaml | 10 -- charts/blobscan/templates/service.yaml | 18 --- charts/blobscan/templates/serviceaccount.yaml | 13 -- charts/blobscan/templates/servicemonitor.yaml | 43 ------ 12 files changed, 31 insertions(+), 378 deletions(-) delete mode 100644 charts/blobscan/templates/NOTES.txt delete mode 100644 charts/blobscan/templates/_helpers.tpl delete mode 100644 charts/blobscan/templates/deployment.yaml delete mode 100644 charts/blobscan/templates/ingress.yaml delete mode 100644 charts/blobscan/templates/secret.yaml delete mode 100644 charts/blobscan/templates/service.yaml delete mode 100644 charts/blobscan/templates/serviceaccount.yaml delete mode 100644 charts/blobscan/templates/servicemonitor.yaml diff --git a/README.md b/README.md index 881d4849..3b702811 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,10 @@ helm delete blobscan ## List of charts -- [`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 Postgresql for use with Blobscan. +- [`blobscan`](charts/blobscan) - Blobscan meta-chart (depends on blobscan-api, blobscan-web and blobscan-indexer). +- [`blobscan-api`](charts/blobscan-api) - Blobscan API. +- [`blobscan-web`](charts/blobscan-web) - Blobscan Web UI. +- [`blobscan-indexer`](charts/blobscan-indexer) - Blobscan blob indexer. ## Development diff --git a/charts/blobscan/Chart.lock b/charts/blobscan/Chart.lock index ae5d048e..ea39652d 100644 --- a/charts/blobscan/Chart.lock +++ b/charts/blobscan/Chart.lock @@ -1,9 +1,18 @@ dependencies: +- name: blobscan-web + repository: https://blobscan.github.io/blobscan-helm-charts + version: 0.3.1 +- name: blobscan-api + repository: https://blobscan.github.io/blobscan-helm-charts + version: 0.3.1 +- name: blobscan-indexer + repository: https://blobscan.github.io/blobscan-helm-charts + version: 0.2.10 - name: postgresql repository: https://charts.bitnami.com/bitnami version: 15.5.20 - name: redis repository: https://charts.bitnami.com/bitnami version: 19.6.4 -digest: sha256:0162d54327769d6492c9809d3eaffbc58fbcce75bbf595a000190d1f6fcc080b -generated: "2024-08-07T17:15:26.012754279+02:00" +digest: sha256:e8842c17ad3d93c50e016790b730a3d4ba5f88afe8ce32ade9898bbfdbd73995 +generated: "2024-08-07T19:43:58.805369682+02:00" diff --git a/charts/blobscan/Chart.yaml b/charts/blobscan/Chart.yaml index b51d1585..c43b6940 100644 --- a/charts/blobscan/Chart.yaml +++ b/charts/blobscan/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: blobscan -version: 0.3.0 -description: Blobscan is the first blockchain explorer that helps to navigate and visualize those EIP-4844 blobs +version: 0.4.0 +description: Blobscan meta-chart (depends on blobscan-api, blobscan-web and blobscan-indexer) type: application keywords: - ethereum @@ -11,6 +11,15 @@ home: https://blobscan.com sources: - https://github.com/blobscan/blobscan/ dependencies: +- name: blobscan-web + repository: "https://blobscan.github.io/blobscan-helm-charts" + version: 0.3.1 +- name: blobscan-api + repository: "https://blobscan.github.io/blobscan-helm-charts" + version: 0.3.1 +- name: blobscan-indexer + repository: "https://blobscan.github.io/blobscan-helm-charts" + version: 0.2.10 - name: postgresql repository: "https://charts.bitnami.com/bitnami" version: 15.5.20 diff --git a/charts/blobscan/README.md b/charts/blobscan/README.md index 4b493c11..8a3a456a 100644 --- a/charts/blobscan/README.md +++ b/charts/blobscan/README.md @@ -1,9 +1,9 @@ # blobscan -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.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 +Blobscan meta-chart (depends on blobscan-api, blobscan-web and blobscan-indexer) **Homepage:** @@ -15,6 +15,9 @@ Blobscan is the first blockchain explorer that helps to navigate and visualize t | Repository | Name | Version | |------------|------|---------| +| https://blobscan.github.io/blobscan-helm-charts | blobscan-api | 0.3.1 | +| https://blobscan.github.io/blobscan-helm-charts | blobscan-indexer | 0.2.10 | +| https://blobscan.github.io/blobscan-helm-charts | blobscan-web | 0.3.1 | | https://charts.bitnami.com/bitnami | blobscandb(postgresql) | 15.5.20 | | https://charts.bitnami.com/bitnami | redis(redis) | 19.6.4 | diff --git a/charts/blobscan/templates/NOTES.txt b/charts/blobscan/templates/NOTES.txt deleted file mode 100644 index c90d46cb..00000000 --- a/charts/blobscan/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -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/templates/_helpers.tpl b/charts/blobscan/templates/_helpers.tpl deleted file mode 100644 index d4a97437..00000000 --- a/charts/blobscan/templates/_helpers.tpl +++ /dev/null @@ -1,66 +0,0 @@ -{{/* -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 "3000" }} -{{- end }} diff --git a/charts/blobscan/templates/deployment.yaml b/charts/blobscan/templates/deployment.yaml deleted file mode 100644 index ba7e56a0..00000000 --- a/charts/blobscan/templates/deployment.yaml +++ /dev/null @@ -1,136 +0,0 @@ -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: - - name: DATABASE_URL - value: {{ .Values.config.DATABASE_URL | quote }} - - name: NETWORK_NAME - value: {{ .Values.config.NETWORK_NAME | quote }} - - name: BLOBSCAN_API_BASE_URL - value: {{ .Values.config.BLOBSCAN_API_BASE_URL | quote }} - - name: BLOBSCAN_API_PORT - value: {{ .Values.config.BLOBSCAN_API_PORT | quote }} - - name: SECRET_KEY - value: {{ .Values.config.SECRET_KEY | quote }} - - name: POSTGRES_STORAGE_ENABLED - value: {{ .Values.config.POSTGRES_STORAGE_ENABLED | quote }} - - name: SWARM_STORAGE_ENABLED - value: {{ .Values.config.SWARM_STORAGE_ENABLED | quote }} - - name: GOOGLE_STORAGE_ENABLED - value: {{ .Values.config.GOOGLE_STORAGE_ENABLED | quote }} - - name: GOOGLE_STORAGE_BUCKET_NAME - value: {{ .Values.config.GOOGLE_STORAGE_BUCKET_NAME | quote }} - - name: GOOGLE_STORAGE_PROJECT_ID - value: {{ .Values.config.GOOGLE_STORAGE_PROJECT_ID | quote }} - - name: GOOGLE_SERVICE_KEY - value: {{ .Values.config.GOOGLE_SERVICE_KEY | quote }} - - name: OTLP_AUTH_USERNAME - value: {{ .Values.config.OTLP_AUTH_USERNAME | quote }} - - name: OTLP_AUTH_PASSWORD - value: {{ .Values.config.OTLP_AUTH_PASSWORD | quote }} - - name: OTEL_EXPORTER_OTLP_PROTOCOL - value: {{ .Values.config.OTEL_EXPORTER_OTLP_PROTOCOL | quote }} - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: {{ .Values.config.OTEL_EXPORTER_OTLP_ENDPOINT | quote }} - - name: METRICS_ENABLED - value: {{ .Values.config.METRICS_ENABLED | quote }} - - name: TRACES_ENABLED - value: {{ .Values.config.TRACES_ENABLED | quote }} - {{- 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 }} - topologySpreadConstraints: - {{- toYaml .Values.topologySpreadConstraints | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} - volumes: - {{- if .Values.extraVolumes }} - {{ toYaml .Values.extraVolumes | nindent 8}} - {{- end }} diff --git a/charts/blobscan/templates/ingress.yaml b/charts/blobscan/templates/ingress.yaml deleted file mode 100644 index 35a7bb35..00000000 --- a/charts/blobscan/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- 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/templates/secret.yaml b/charts/blobscan/templates/secret.yaml deleted file mode 100644 index 5afc106e..00000000 --- a/charts/blobscan/templates/secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ -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/templates/service.yaml b/charts/blobscan/templates/service.yaml deleted file mode 100644 index 6d14611b..00000000 --- a/charts/blobscan/templates/service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -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/templates/serviceaccount.yaml b/charts/blobscan/templates/serviceaccount.yaml deleted file mode 100644 index 3dc43c9f..00000000 --- a/charts/blobscan/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- 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/templates/servicemonitor.yaml b/charts/blobscan/templates/servicemonitor.yaml deleted file mode 100644 index f449f378..00000000 --- a/charts/blobscan/templates/servicemonitor.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- 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 }}