From fe6919d17eb00237db2dbb71abb15390d2e9dd4f Mon Sep 17 00:00:00 2001 From: Timofey Kukushkin Date: Thu, 20 Jul 2023 11:27:11 +0400 Subject: [PATCH 1/2] Add the ability to pass environment variables in Kubernetes format --- chart/pyroscope/Chart.yaml | 2 +- chart/pyroscope/README.md | 3 ++- chart/pyroscope/templates/deployment.yaml | 5 ++++- chart/pyroscope/values.yaml | 9 +++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/chart/pyroscope/Chart.yaml b/chart/pyroscope/Chart.yaml index 8e823a8..f0dcfd8 100644 --- a/chart/pyroscope/Chart.yaml +++ b/chart/pyroscope/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: pyroscope description: A Helm chart for Pyroscope type: application -version: 0.2.92 +version: 0.2.93 appVersion: "0.37.2" diff --git a/chart/pyroscope/README.md b/chart/pyroscope/README.md index 3a82e92..ed25fb7 100644 --- a/chart/pyroscope/README.md +++ b/chart/pyroscope/README.md @@ -1,6 +1,6 @@ # pyroscope -![Version: 0.2.92](https://img.shields.io/badge/Version-0.2.92-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.37.2](https://img.shields.io/badge/AppVersion-0.37.2-informational?style=flat-square) +![Version: 0.2.93](https://img.shields.io/badge/Version-0.2.93-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.37.2](https://img.shields.io/badge/AppVersion-0.37.2-informational?style=flat-square) A Helm chart for Pyroscope @@ -53,6 +53,7 @@ Please refer to [the documentation](https://pyroscope.io/docs/server-configurati | affinity | object | `{}` | Affinity settings for pod assignment | | deploymentStrategy | object | `{"type":"Recreate"}` | Deployment strategy | | env | object | `{}` | Extra environment variables | +| envVars | list | `[]` | Extra environment variables in Kubernetes format, use it when you need to use `valueFrom` | | extraLabels | object | `{}` | Extra common labels for all resources | | extraVolumeMounts | list | `[]` | Additional volume mounts for pyroscope server container | | extraVolumes | list | `[]` | Additional volumes | diff --git a/chart/pyroscope/templates/deployment.yaml b/chart/pyroscope/templates/deployment.yaml index 03926c5..f26b4e9 100644 --- a/chart/pyroscope/templates/deployment.yaml +++ b/chart/pyroscope/templates/deployment.yaml @@ -41,12 +41,15 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.env }} + {{- if or .Values.env .Values.envVars }} env: {{- range $k, $v := .Values.env }} - name: {{ $k }} value: {{ $v }} {{- end }} + {{- with .Values.envVars }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- end }} ports: - name: api diff --git a/chart/pyroscope/values.yaml b/chart/pyroscope/values.yaml index 8760334..fcf821b 100644 --- a/chart/pyroscope/values.yaml +++ b/chart/pyroscope/values.yaml @@ -203,6 +203,15 @@ extraVolumeMounts: [] # -- Extra environment variables env: {} +# -- Extra environment variables in Kubernetes format, use it when you need to use `valueFrom` +envVars: [] +# It +# - name: PYROSCOPE_AUTH_GOOGLE_CLIENT_ID +# valueFrom: +# secretKeyRef: +# name: pyroscope-auth-google +# key: client-id + rbac: # -- Creates Pyroscope cluster role and binds service account to it; requires service account to be created create: false From 8e36e8c523fc8142c17c7d958733a883b7098d8b Mon Sep 17 00:00:00 2001 From: Timofey Kukushkin Date: Thu, 20 Jul 2023 11:28:22 +0400 Subject: [PATCH 2/2] small fix --- chart/pyroscope/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/chart/pyroscope/values.yaml b/chart/pyroscope/values.yaml index fcf821b..4925e89 100644 --- a/chart/pyroscope/values.yaml +++ b/chart/pyroscope/values.yaml @@ -205,7 +205,6 @@ env: {} # -- Extra environment variables in Kubernetes format, use it when you need to use `valueFrom` envVars: [] -# It # - name: PYROSCOPE_AUTH_GOOGLE_CLIENT_ID # valueFrom: # secretKeyRef: