Skip to content

Commit

Permalink
Blobscan-web chart (#9)
Browse files Browse the repository at this point in the history
* add blobscan-web chart

* update blobscan-api comments

* bump version

* bump version

* update description
  • Loading branch information
PabloCastellano authored Aug 7, 2024
1 parent fc5ab76 commit 1c6ac99
Show file tree
Hide file tree
Showing 16 changed files with 724 additions and 14 deletions.
2 changes: 1 addition & 1 deletion charts/blobscan-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://raw.githubusercontent.com/Blobscan/blobscan/main/.github/assets/lo
sources:
- https://github.com/blobscan/blobscan/
type: application
version: 0.3.0
version: 0.3.1
maintainers:
- name: PabloCastellano
email: pablo@anche.no
14 changes: 7 additions & 7 deletions charts/blobscan-api/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# blobscan-api

![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.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Blobscan API

Expand All @@ -18,10 +18,10 @@ Blobscan API
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the Deployment |
| args | list | `[]` | Command arguments |
| config | object | See `values.yaml` | Config file https://github.com/Blobscan/blobscan/blob/next/.env.example |
| config | object | See `values.yaml` | Config file https://github.com/Blobscan/blobscan/blob/main/.env.example |
| 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 |
| customArgs | list | `["api"]` | Custom args for the blobscan-api container |
| customCommand | list | `[]` | Command replacement for the blobscan-api container |
| extraContainers | list | `[]` | Additional containers |
| extraEnv | list | `[]` | Additional env variables |
| extraPodPorts | list | `[]` | Extra Pod ports |
Expand All @@ -30,9 +30,9 @@ Blobscan API
| 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-api"` | blobscan container image repository |
| image.tag | string | `"latest"` | blobscan container image tag |
| image.pullPolicy | string | `"IfNotPresent"` | blobscan-api container pull policy |
| image.repository | string | `"blossomlabs/blobscan-api"` | blobscan-api container image repository |
| image.tag | string | `"latest"` | blobscan-api 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 |
Expand Down
12 changes: 6 additions & 6 deletions charts/blobscan-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ fullnameOverride: ""
replicas: 1

image:
# -- blobscan container image repository
# -- blobscan-api container image repository
repository: blossomlabs/blobscan-api
# -- blobscan container image tag
# -- blobscan-api container image tag
tag: latest
# -- blobscan container pull policy
# -- blobscan-api container pull policy
pullPolicy: IfNotPresent

# -- Secret env variables injected via a created secret
Expand All @@ -26,7 +26,7 @@ args: []

# -- Config file
# @default -- See `values.yaml`
# https://github.com/Blobscan/blobscan/blob/next/.env.example
# https://github.com/Blobscan/blobscan/blob/main/.env.example
config:
CHAIN_ID: "1"
DATABASE_URL: "postgresql://postgres:postgres@blobscan-blobscandb:5432/blobscan?ssl=false"
Expand Down Expand Up @@ -73,10 +73,10 @@ ingress:
# hosts:
# - chart-example.local

# -- Custom args for the blobscan container
# -- Custom args for the blobscan-api container
customArgs: ["api"]

# -- Command replacement for the blobscan container
# -- Command replacement for the blobscan-api container
customCommand: [] # Only change this if you need to change the default command

service:
Expand Down
23 changes: 23 additions & 0 deletions charts/blobscan-web/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
16 changes: 16 additions & 0 deletions charts/blobscan-web/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: blobscan-web
version: 0.3.1
description: Blobscan Web UI
type: application
keywords:
- ethereum
- eip4844
- blobs
home: https://blobscan.com
sources:
- https://github.com/blobscan/blobscan/
maintainers:
- name: PabloCastellano
email: pablo@anche.no
icon: https://raw.githubusercontent.com/Blobscan/blobscan/main/.github/assets/logo.svg
71 changes: 71 additions & 0 deletions charts/blobscan-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

# blobscan-web

![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Blobscan Web UI

**Homepage:** <https://blobscan.com>

## Source Code

* <https://github.com/blobscan/blobscan/>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the Deployment |
| args | list | `[]` | Command arguments |
| config | object | See `values.yaml` | Config file https://github.com/Blobscan/blobscan/blob/main/.env.example |
| containerSecurityContext | object | See `values.yaml` | The security context for containers |
| customArgs | list | `["web"]` | Custom args for the blobscan-web container |
| customCommand | list | `[]` | Command replacement for the blobscan-web container |
| extraContainers | list | `[]` | Additional containers |
| extraEnv | list | `[]` | 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 | `3000` | Ports |
| image.pullPolicy | string | `"IfNotPresent"` | blobscan-web container pull policy |
| image.repository | string | `"blossomlabs/blobscan-web"` | blobscan-web container image repository |
| image.tag | string | `"latest"` | blobscan-web 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 |
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pods |
15 changes: 15 additions & 0 deletions charts/blobscan-web/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -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" . }}
22 changes: 22 additions & 0 deletions charts/blobscan-web/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -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 }}
66 changes: 66 additions & 0 deletions charts/blobscan-web/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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 "3000" }}
{{- end }}
Loading

0 comments on commit 1c6ac99

Please sign in to comment.