diff --git a/.github/helm-docs.sh b/.github/helm-docs.sh index cf61bd4..fa4df1e 100755 --- a/.github/helm-docs.sh +++ b/.github/helm-docs.sh @@ -1,13 +1,13 @@ #!/bin/bash set -euo pipefail -HELM_DOCS_VERSION="0.11.0" +HELM_DOCS_VERSION="1.3.0" # install helm-docs curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz tar -xf /tmp/helm-docs.tar.gz helm-docs # validate docs -# ./helm-docs -# git diff --exit-code +./helm-docs +git diff --exit-code exit 0 diff --git a/charts/promlens/Chart.yaml b/charts/promlens/Chart.yaml index ab508d9..b78f5e9 100644 --- a/charts/promlens/Chart.yaml +++ b/charts/promlens/Chart.yaml @@ -1,7 +1,8 @@ apiVersion: v2 name: promlens -version: 0.1.4 +version: 0.2.0 description: This Chart installs and configures PromLens +sources: ["https://github.com/ricardo-ch/helm-charts/tree/main/charts/promlens"] maintainers: - name: ricardo-ch email: sre@ricardo.ch diff --git a/charts/promlens/README.md b/charts/promlens/README.md deleted file mode 100644 index b3c98b3..0000000 --- a/charts/promlens/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# PromLens Chart - -This chart installs [PromLens](https://promlens.com/) from [PromLabs](https://promlabs.com/). - -PromLens is a tool that makes learning and using PromQL easier and more productive. It integrates a visual query builder with explanation and visualization features. - -## Helm Chart - -This is an initial release, based on the Helm chart we are using to deploy the tool internally. Currently, there are muliple features of PromLens that this Chart doesn't provide. If something is missing, feel free to open and issue or submit a Pull Request. - -### How To Install - -Simply add this Chart repository to your Helm: - -```sh -➜ helm repo add ricardo https://ricardo-ch.github.io/helm-charts/ -"ricardo" has been added to your repositories -``` - -## Configuration - -|Name|Description| Default Value| -|----|-----------|--------------| -| image | PromLens image repository and name | 'promlabs/promlens' | -| version | PromLens image tag | latest | -| replicas | Number of replicas | 1 | -| license | PromLens License (string) | | -| grafana_url | Grafana URL | | -| grafana_api_key | Grafana API Key | | -| gcs_sa | Google Storage Account | | -| shared_links_bucket_name | Bucket name for shared links | 'promlens' | diff --git a/charts/promlens/README.md.gotmpl b/charts/promlens/README.md.gotmpl new file mode 100644 index 0000000..52423e2 --- /dev/null +++ b/charts/promlens/README.md.gotmpl @@ -0,0 +1,28 @@ +# PromLens + +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}![Release Status](https://github.com/ricardo-ch/helm-charts/workflows/Release%20Charts/badge.svg) + +This chart installs [PromLens](https://promlens.com/) from [PromLabs](https://promlabs.com/). + +PromLens is a tool that makes learning and using PromQL easier and more productive. It integrates a visual query builder with explanation and visualization features. + +## Helm Chart + +This is an initial release, based on the Helm chart we are using to deploy the tool internally. Currently, there are multiple features of PromLens that this Chart doesn't provide. If something is missing, feel free to open and issue or submit a Pull Request. + +### How To Install + +Simply add this Chart repository to Helm: + +```sh +➜ helm repo add ricardo https://ricardo-ch.github.io/helm-charts/ +"ricardo" has been added to your repositories +``` + +{{ template "chart.valuesSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/promlens/templates/deployment.yaml b/charts/promlens/templates/deployment.yaml index b274d6a..bf9a81d 100644 --- a/charts/promlens/templates/deployment.yaml +++ b/charts/promlens/templates/deployment.yaml @@ -19,14 +19,14 @@ spec: spec: containers: - name: promlens - image: {{ .Values.image }}:{{ .Values.version }} + image: {{ .Values.image }}:{{ .Values.deployment.version }} args: - - "--shared-links.gcs.bucket={{ .Values.shared_links_bucket_name }}" - - "--grafana.url={{ .Values.grafana_url }}" + - "--shared-links.gcs.bucket={{ .Values.config.shared_links_bucket_name }}" + - "--grafana.url={{ .Values.config.grafana_url }}" - "--grafana.api-token" - - {{ .Values.grafana_api_key | quote }} + - {{ .Values.config.grafana_api_key | quote }} - "--license.key" - - {{ .Values.license | quote }} + - {{ .Values.config.license | quote }} env: - name: GOOGLE_APPLICATION_CREDENTIALS value: /var/secret-files/gcs-cred.json diff --git a/charts/promlens/templates/secret.yaml b/charts/promlens/templates/secret.yaml index 39f7db7..1caea01 100644 --- a/charts/promlens/templates/secret.yaml +++ b/charts/promlens/templates/secret.yaml @@ -9,4 +9,4 @@ metadata: heritage: {{ .Release.Service }} type: Opaque data: - gcs-cred.json: {{ .Values.gcs_sa | quote }} + gcs-cred.json: {{ .Values.config.gcs_sa | quote }} diff --git a/charts/promlens/values.yaml b/charts/promlens/values.yaml index db75c12..f73dd9e 100644 --- a/charts/promlens/values.yaml +++ b/charts/promlens/values.yaml @@ -1,16 +1,18 @@ -# -- Number of replicas -replicas: 1 -# -- PromLens License -license: "" -# -- Grafana URL -grafana_url: "" -# -- Grafana API Key, see https://grafana.com/docs/grafana/latest/http_api/auth/ -grafana_api_key: "" -# -- Google Cloud Storage Account -gcs_sa: "" -# -- Bucket Name in Storage Account -shared_links_bucket_name: promlens -# -- PromLens Conatiner Image -image: promlabs/promlens -# -- PromLens Container Image Version -version: latest +deployment: + # -- Number of replicas + replicas: 1 + # -- PromLens Conatiner Image + image: promlabs/promlens + # -- PromLens Container Image Version + version: latest +config: + # -- PromLens License + license: "" + # -- Grafana URL + grafana_url: "" + # -- Grafana API Key, see https://grafana.com/docs/grafana/latest/http_api/auth/ + grafana_api_key: "" + # -- Google Cloud Storage Account + gcs_sa: "" + # -- Bucket Name in Storage Account + shared_links_bucket_name: promlens