Skip to content

Commit

Permalink
add the liveness and readiness to helm charts (#3)
Browse files Browse the repository at this point in the history
* add the liveness and readiness to helm charts

* updated README, bumped chart version

* removed trailing spaces

* removed extra spaces from README

* updated application version

Co-authored-by: alonlong <alonlong@163.com>
Co-authored-by: tushRepo <tushmailbox@gmail.com>
  • Loading branch information
3 people authored Jun 23, 2021
1 parent bdfa1d6 commit dee46d7
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 5 deletions.
4 changes: 2 additions & 2 deletions chart/pyroscope/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: pyroscope
description: A Helm chart for Pyroscope
type: application
version: 0.1.1
appVersion: "0.0.32"
version: 0.2.0
appVersion: "0.0.34"
20 changes: 18 additions & 2 deletions chart/pyroscope/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pyroscope

![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.32](https://img.shields.io/badge/AppVersion-0.0.32-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.34](https://img.shields.io/badge/AppVersion-0.0.34-informational?style=flat-square)

A Helm chart for Pyroscope

Expand Down Expand Up @@ -40,12 +40,20 @@ helm delete my-release
| fullnameOverride | string | `""` | Defaults to .Release.Name-.Chart.Name unless .Release.Name contains "pyroscope" |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.repository | string | `"pyroscope/pyroscope"` | image to use for deploying |
| image.tag | string | `"0.0.32"` | Tag for pyroscope image to use |
| image.tag | string | `"0.0.34"` | Tag for pyroscope image to use |
| imagePullSecrets | list | `[]` | Image pull secrets |
| ingress.annotations | object | `{}` | Ingress annotations (values are templated) |
| ingress.enabled | bool | `false` | Enables Ingress |
| ingress.hosts | list | `[{"host":"chart-example.local","paths":[{"path":"/","pathType":"Prefix"}]}]` | Ingress accepted hostnames |
| ingress.tls | list | `[]` | Ingress TLS configuration |
| livenessProbe.enabled | bool | `true` | Enable Pyroscope server liveness |
| livenessProbe.failureThreshold | int | `3` | Pyroscope server liveness check failure threshold |
| livenessProbe.httpGet.path | string | `"/healthz"` | Pyroscope server liveness check path |
| livenessProbe.httpGet.port | int | `4040` | Pyroscope server liveness check port |
| livenessProbe.initialDelaySeconds | int | `30` | Pyroscope server liveness check intial delay in seconds |
| livenessProbe.periodSeconds | int | `15` | Pyroscope server liveness check frequency in seconds |
| livenessProbe.successThreshold | int | `1` | Pyroscope server liveness check success threshold |
| livenessProbe.timeoutSeconds | int | `30` | Pyroscope server liveness check request timeout |
| nameOverride | string | `""` | Defaults to .Chart.Name |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| persistence.accessModes | list | `["ReadWriteOnce"]` | Persistence access modes |
Expand All @@ -55,6 +63,14 @@ helm delete my-release
| podAnnotations | object | `{}` | Pod annotations |
| podSecurityContext | object | `{}` | Pod securityContext |
| pyroscopeConfigs | object | `{"analytics-opt-out":"false","api-bind-addr":":4040","badger-log-level":"error","base-url":"","cache-dictionary-size":"1000","cache-dimension-size":"1000","cache-segment-size":"1000","cache-tree-size":"10000","log-level":"info","max-nodes-render":"2048","max-nodes-serialization":"2048","storage-path":"/var/lib/pyroscope"}` | Map of pyroscope configs to be used for ref default: https://pyroscope.io/docs/configuration#self-documented-server-config |
| readinessProbe.enabled | bool | `true` | Enable Pyroscope server readiness |
| readinessProbe.failureThreshold | int | `3` | Pyroscope server readiness check failure threshold count |
| readinessProbe.httpGet.path | string | `"/healthz"` | Pyroscope server readiness check path |
| readinessProbe.httpGet.port | int | `4040` | Pyroscope server readiness check port |
| readinessProbe.initialDelaySeconds | int | `30` | Pyroscope server readiness initial delay in seconds |
| readinessProbe.periodSeconds | int | `5` | Pyroscope server readiness check frequency in seconds |
| readinessProbe.successThreshold | int | `1` | Pyroscope server readiness check success threshold count |
| readinessProbe.timeoutSeconds | int | `30` | Pyroscope server readiness check request timeout |
| resources | object | `{}` | CPU/Memory resource requests/limits |
| securityContext | object | `{}` | Deployment securityContext |
| service.annotations | object | `{}` | Service annotations |
Expand Down
22 changes: 22 additions & 0 deletions chart/pyroscope/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,28 @@ spec:
- name: api
containerPort: {{ index .Values.pyroscopeConfigs "api-bind-addr" | int | default 4040 }}
protocol: TCP
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
httpGet:
path: {{ .Values.readinessProbe.httpGet.path }}
port: {{ .Values.readinessProbe.httpGet.port }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
httpGet:
path: {{ .Values.livenessProbe.httpGet.path }}
port: {{ .Values.livenessProbe.httpGet.port }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
40 changes: 39 additions & 1 deletion chart/pyroscope/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ image:
# -- Image pull policy
pullPolicy: IfNotPresent
# -- Tag for pyroscope image to use
tag: "0.0.32"
tag: "0.0.34"

# -- Image pull secrets
imagePullSecrets: []
Expand Down Expand Up @@ -146,6 +146,44 @@ ingress:
# hosts:
# - chart-example.local

readinessProbe:
# -- Enable Pyroscope server readiness
enabled: true
httpGet:
# -- Pyroscope server readiness check path
path: /healthz
# -- Pyroscope server readiness check port
port: 4040
# -- Pyroscope server readiness initial delay in seconds
initialDelaySeconds: 30
# -- Pyroscope server readiness check frequency in seconds
periodSeconds: 5
# -- Pyroscope server readiness check request timeout
timeoutSeconds: 30
# -- Pyroscope server readiness check failure threshold count
failureThreshold: 3
# -- Pyroscope server readiness check success threshold count
successThreshold: 1

livenessProbe:
# -- Enable Pyroscope server liveness
enabled: true
httpGet:
# -- Pyroscope server liveness check path
path: /healthz
# -- Pyroscope server liveness check port
port: 4040
# -- Pyroscope server liveness check intial delay in seconds
initialDelaySeconds: 30
# -- Pyroscope server liveness check frequency in seconds
periodSeconds: 15
# -- Pyroscope server liveness check request timeout
timeoutSeconds: 30
# -- Pyroscope server liveness check failure threshold
failureThreshold: 3
# -- Pyroscope server liveness check success threshold
successThreshold: 1

# -- CPU/Memory resource requests/limits
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down

0 comments on commit dee46d7

Please sign in to comment.