From f046804c21a5db21c47736c9754dbe610b7894f2 Mon Sep 17 00:00:00 2001 From: Lex Rivera Date: Wed, 27 Jul 2022 09:44:35 +0300 Subject: [PATCH] allow to disable parca server (#7) --- charts/parca/Chart.yaml | 2 +- charts/parca/README.md | 3 ++- charts/parca/templates/server-configmap.yaml | 4 +++- charts/parca/templates/server-deployment.yaml | 2 ++ charts/parca/templates/server-ingress.yaml | 2 ++ charts/parca/templates/server-service.yaml | 4 +++- charts/parca/templates/server-servicemonitor.yaml | 2 ++ charts/parca/values.yaml | 2 ++ 8 files changed, 17 insertions(+), 4 deletions(-) diff --git a/charts/parca/Chart.yaml b/charts/parca/Chart.yaml index 79cf31cec..8c1a5375c 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.0.1 +version: 2.1.0 # 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 c7d715125..59141e257 100644 --- a/charts/parca/README.md +++ b/charts/parca/README.md @@ -1,6 +1,6 @@ # parca -![Version: 2.0.1](https://img.shields.io/badge/Version-2.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.0](https://img.shields.io/badge/AppVersion-v0.12.0-informational?style=flat-square) +![Version: 2.1.0](https://img.shields.io/badge/Version-2.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.0](https://img.shields.io/badge/AppVersion-v0.12.0-informational?style=flat-square) Open Source Infrastructure-wide continuous profiling @@ -74,6 +74,7 @@ helm repo add parca https://parca-dev.github.io/helm-charts | 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.corsAllowedOrigins | string | `"*"` | CORS setting | +| server.enabled | bool | `true` | Allows disabling parca server | | server.extraEnv | list | `[]` | additional container environment variables for server | | server.image.pullPolicy | string | `"IfNotPresent"` | Overrides pull policy for server | | server.image.repository | string | `"ghcr.io/parca-dev/parca"` | Overrides the image repository for server | diff --git a/charts/parca/templates/server-configmap.yaml b/charts/parca/templates/server-configmap.yaml index e630d31df..5c30f8e15 100644 --- a/charts/parca/templates/server-configmap.yaml +++ b/charts/parca/templates/server-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.server.enabled -}} apiVersion: v1 kind: ConfigMap metadata: @@ -8,4 +9,5 @@ data: parca.yaml: |- {{ toYaml .Values.server.config | indent 4 }} scrape_configs: -{{ toYaml .Values.server.scrapeConfigs | indent 4 }} \ No newline at end of file +{{ toYaml .Values.server.scrapeConfigs | indent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/parca/templates/server-deployment.yaml b/charts/parca/templates/server-deployment.yaml index fefd97807..2d5052330 100644 --- a/charts/parca/templates/server-deployment.yaml +++ b/charts/parca/templates/server-deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.server.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -87,3 +88,4 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/parca/templates/server-ingress.yaml b/charts/parca/templates/server-ingress.yaml index 883695965..b171e80a4 100644 --- a/charts/parca/templates/server-ingress.yaml +++ b/charts/parca/templates/server-ingress.yaml @@ -1,3 +1,4 @@ +{{- if .Values.server.enabled -}} {{- if .Values.ingress.enabled -}} {{- $fullName := include "parca.fullname" . -}} {{- $svcPort := .Values.server.service.port -}} @@ -59,3 +60,4 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/parca/templates/server-service.yaml b/charts/parca/templates/server-service.yaml index b895864b6..beaef01f9 100644 --- a/charts/parca/templates/server-service.yaml +++ b/charts/parca/templates/server-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.server.enabled -}} apiVersion: v1 kind: Service metadata: @@ -12,4 +13,5 @@ spec: protocol: TCP name: http selector: - {{- include "parca.selectorLabels.server" . | nindent 4 }} \ No newline at end of file + {{- include "parca.selectorLabels.server" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/parca/templates/server-servicemonitor.yaml b/charts/parca/templates/server-servicemonitor.yaml index 84f8eec7d..f0604fd95 100644 --- a/charts/parca/templates/server-servicemonitor.yaml +++ b/charts/parca/templates/server-servicemonitor.yaml @@ -1,3 +1,4 @@ +{{- if .Values.server.enabled -}} {{- if .Values.server.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor @@ -26,4 +27,5 @@ spec: relabelings: {{ toYaml .Values.server.serviceMonitor.relabelings | indent 4 }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/charts/parca/values.yaml b/charts/parca/values.yaml index 224042842..63e9fbd9f 100644 --- a/charts/parca/values.yaml +++ b/charts/parca/values.yaml @@ -54,6 +54,8 @@ agent: resources: {} server: + # -- Allows disabling parca server + enabled: true image: # -- Overrides the image repository for server repository: ghcr.io/parca-dev/parca