Skip to content

Commit

Permalink
feat(server): make restart through ConfigMap hash configurable (#28)
Browse files Browse the repository at this point in the history
* feat(server): make restart through ConfigMap hash configurable

* regenerate docs

---------

Co-authored-by: Lex Rivera <[email protected]>
  • Loading branch information
morremeyer and rlex authored Mar 1, 2023
1 parent c98af7b commit c22225e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion charts/parca/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ 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: 4.2.0

version: 4.3.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
Expand Down
3 changes: 2 additions & 1 deletion charts/parca/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# parca

![Version: 4.2.0](https://img.shields.io/badge/Version-4.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.15.0](https://img.shields.io/badge/AppVersion-0.15.0-informational?style=flat-square)
![Version: 4.3.0](https://img.shields.io/badge/Version-4.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.15.0](https://img.shields.io/badge/AppVersion-0.15.0-informational?style=flat-square)

Open Source Infrastructure-wide continuous profiling

Expand Down Expand Up @@ -108,6 +108,7 @@ helm repo add parca https://parca-dev.github.io/helm-charts
| server.podAnnotations | object | `{}` | additional annotations for server pod |
| server.podSecurityContext | object | `{}` | additional security context for server pod |
| server.resources | object | `{}` | resource limits and requests for server pod |
| server.restartOnConfigChange | bool | `true` | restart the server pod when `server.config` or `server.scrapeConfigs` changes. If this is `false`, the parca server will reload the config once the mounted ConfigMap is updated, which has a delay that depends on your cluster configuration. |
| server.scrapeConfigs | list | `[{"job_name":"kubernetes-pods","kubernetes_sd_configs":[{"role":"pod"}],"relabel_configs":[{"action":"keep","regex":true,"source_labels":["__meta_kubernetes_pod_annotation_parca_dev_scrape"]},{"action":"replace","regex":"(.+)","source_labels":["__meta_kubernetes_pod_annotation_parca_dev_path"],"target_label":"__metrics_path__"},{"action":"replace","regex":"([^:]+)(?::\\d+)?;(\\d+)","replacement":"$1:$2","source_labels":["__address__","__meta_kubernetes_pod_annotation_parca_dev_port"],"target_label":"__address__"},{"action":"labelmap","regex":"__meta_kubernetes_pod_label_(.+)"},{"action":"replace","source_labels":["__meta_kubernetes_namespace"],"target_label":"kubernetes_namespace"},{"action":"replace","source_labels":["__meta_kubernetes_pod_name"],"target_label":"kubernetes_pod_name"}],"scrape_interval":"1m"}]` | scrape configs for parca server |
| server.securityContext | object | `{}` | additional security context for server |
| server.service.annotations | object | `{}` | annotations to be added for the server service |
Expand Down
4 changes: 4 additions & 0 deletions charts/parca/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ spec:
{{- include "parca.selectorLabels.server" . | nindent 6 }}
template:
metadata:
{{- if or .Values.server.podAnnotations .Values.server.restartOnConfigChange }}
annotations:
{{- if .Values.server.restartOnConfigChange }}
checksum/config: {{ include (print $.Template.BasePath "/server-configmap.yaml") . | sha256sum }}
{{- end }}
{{- with .Values.server.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
{{- include "parca.selectorLabels.server" . | nindent 8 }}
spec:
Expand Down
3 changes: 3 additions & 0 deletions charts/parca/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ server:
extraArgs: []
# -- additional container environment variables for server
extraEnv: []
# -- restart the server pod when `server.config` or `server.scrapeConfigs` changes. If this is `false`, the parca server
# will reload the config once the mounted ConfigMap is updated, which has a delay that depends on your cluster configuration.
restartOnConfigChange: true
# -- parca server config block
config:
object_storage:
Expand Down

0 comments on commit c22225e

Please sign in to comment.