diff --git a/charts/rollup-explorer-backend/Chart.yaml b/charts/rollup-explorer-backend/Chart.yaml index 816442cb..1aae2e26 100644 --- a/charts/rollup-explorer-backend/Chart.yaml +++ b/charts/rollup-explorer-backend/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: rollup-explorer-backend helm charts name: rollup-explorer-backend -version: 0.0.3 +version: 0.0.4 appVersion: v0.1.0 kubeVersion: ">=1.22.0-0" maintainers: diff --git a/charts/rollup-explorer-backend/README.md b/charts/rollup-explorer-backend/README.md index 99cb176c..a3d81045 100644 --- a/charts/rollup-explorer-backend/README.md +++ b/charts/rollup-explorer-backend/README.md @@ -1,6 +1,6 @@ # rollup-explorer-backend -![Version: 0.0.3](https://img.shields.io/badge/Version-0.0.3-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square) +![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square) rollup-explorer-backend helm charts @@ -74,6 +74,7 @@ Kubernetes: `>=1.22.0-0` | resources.limits.memory | string | `"6Gi"` | | | resources.requests.cpu | string | `"2"` | | | resources.requests.memory | string | `"4Gi"` | | +| scrollConfig | string | `"{}\n"` | | | service.main.enabled | bool | `true` | | | service.main.labels.app | string | `"rollup-explorer-backend"` | | | service.main.ports.http.enabled | bool | `true` | | diff --git a/charts/rollup-explorer-backend/templates/config-file.yaml b/charts/rollup-explorer-backend/templates/config-file.yaml index a8affce8..3c9c56e1 100644 --- a/charts/rollup-explorer-backend/templates/config-file.yaml +++ b/charts/rollup-explorer-backend/templates/config-file.yaml @@ -1,4 +1,3 @@ -{{- if .Values.global.isStandalone }} --- apiVersion: v1 kind: ConfigMap @@ -6,6 +5,4 @@ metadata: name: rollup-explorer-backend-config data: config.json: | -{{ .Files.Get "configs/rollup-explorer-backend-config.json" | indent 4 }} ---- -{{- end }} +{{ .Values.scrollConfig | indent 4 }} diff --git a/charts/rollup-explorer-backend/templates/helpers.tpl b/charts/rollup-explorer-backend/templates/helpers.tpl new file mode 100644 index 00000000..d762ba10 --- /dev/null +++ b/charts/rollup-explorer-backend/templates/helpers.tpl @@ -0,0 +1,47 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "scroll-sdk.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 "scroll-sdk.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 build as used by the chart label. +*/}} +{{- define "scroll-sdk.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} +{{/* +Common labels +*/}} +{{- define "scroll-sdk.labels" -}} +helm.sh/chart: {{ include "scroll-sdk.chart" . }} +{{ include "scroll-sdk.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/build: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} +{{/* +Selector labels +*/}} +{{- define "scroll-sdk.selectorLabels" -}} +app.kubernetes.io/name: {{ include "scroll-sdk.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/charts/rollup-explorer-backend/values.yaml b/charts/rollup-explorer-backend/values.yaml index caaa10b0..589aae89 100644 --- a/charts/rollup-explorer-backend/values.yaml +++ b/charts/rollup-explorer-backend/values.yaml @@ -96,3 +96,6 @@ serviceMonitor: - port: metrics interval: 1m scrapeTimeout: 10s + +scrollConfig: | + {}