From f7df821ac06d1f47c48754bdb306f97d5c2c4563 Mon Sep 17 00:00:00 2001 From: Tom Hellier Date: Fri, 16 Sep 2022 13:28:25 +0100 Subject: [PATCH 1/2] #18 more configurable server config file the server validates the configuration file, and if it sees values it does not accept, the process exits. This change will allow users to force overwrite the values which exist in the helm chart to stop the helm maps merging --- charts/parca/Chart.yaml | 2 +- charts/parca/README.md | 1 + charts/parca/templates/server-configmap.yaml | 4 ++++ charts/parca/values.yaml | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/parca/Chart.yaml b/charts/parca/Chart.yaml index 8293a858b..0a2f17ac1 100644 --- a/charts/parca/Chart.yaml +++ b/charts/parca/Chart.yaml @@ -20,7 +20,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.2.1 +version: 2.2.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/parca/README.md b/charts/parca/README.md index b44b9bb1c..83cb4dd6e 100644 --- a/charts/parca/README.md +++ b/charts/parca/README.md @@ -74,6 +74,7 @@ helm repo add parca https://parca-dev.github.io/helm-charts | ingress.tls | list | `[]` | | | nameOverride | string | `""` | overrides chart name | | server.config | object | `{"debug_info":{"bucket":{"config":{"directory":"./tmp"},"type":"FILESYSTEM"},"cache":{"config":{"directory":"./tmp"},"type":"FILESYSTEM"}}}` | parca server config block | +| server.configFullyOverride | object | `{}` | allows the ability to fully override the configuration file | | server.corsAllowedOrigins | string | `"*"` | CORS setting | | server.enabled | bool | `true` | Allows disabling parca server | | server.extraArgs | list | `[]` | additional arguments to pass to the server | diff --git a/charts/parca/templates/server-configmap.yaml b/charts/parca/templates/server-configmap.yaml index 5c30f8e15..64863052e 100644 --- a/charts/parca/templates/server-configmap.yaml +++ b/charts/parca/templates/server-configmap.yaml @@ -7,7 +7,11 @@ metadata: {{- include "parca.labels.server" . | nindent 4 }} data: parca.yaml: |- +{{- if .Values.server.configFullyOverride }} +{{- toYaml .Values.server.configFullyOverride | nindent 4 }} +{{- else }} {{ toYaml .Values.server.config | indent 4 }} scrape_configs: {{ toYaml .Values.server.scrapeConfigs | indent 4 }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/charts/parca/values.yaml b/charts/parca/values.yaml index ddc38774b..f3c3bf299 100644 --- a/charts/parca/values.yaml +++ b/charts/parca/values.yaml @@ -116,6 +116,8 @@ server: - source_labels: [__meta_kubernetes_pod_name] action: replace target_label: kubernetes_pod_name + # -- allows the ability to fully override the configuration file + configFullyOverride: {} # -- additional annotations for server pod podAnnotations: {} # -- additional security context for server pod From 1f314ad68706d6aa181b0104dd8adb42608f594f Mon Sep 17 00:00:00 2001 From: Tom Hellier Date: Fri, 16 Sep 2022 13:30:03 +0100 Subject: [PATCH 2/2] #18 fix the readme.md --- charts/parca/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/parca/README.md b/charts/parca/README.md index 83cb4dd6e..005032f89 100644 --- a/charts/parca/README.md +++ b/charts/parca/README.md @@ -1,6 +1,6 @@ # parca -![Version: 2.2.1](https://img.shields.io/badge/Version-2.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.1](https://img.shields.io/badge/AppVersion-v0.12.1-informational?style=flat-square) +![Version: 2.2.2](https://img.shields.io/badge/Version-2.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.1](https://img.shields.io/badge/AppVersion-v0.12.1-informational?style=flat-square) Open Source Infrastructure-wide continuous profiling