Skip to content

Commit

Permalink
parca chart release
Browse files Browse the repository at this point in the history
  • Loading branch information
rlex committed Oct 27, 2021
1 parent 77c6310 commit 5fbb25e
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 21 deletions.
4 changes: 2 additions & 2 deletions charts/parca/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ 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: 1.1.3
version: 1.2.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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.1.1"
appVersion: "v0.2.3"
31 changes: 28 additions & 3 deletions charts/parca/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
# parca

![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.2.3](https://img.shields.io/badge/AppVersion-v0.2.3-informational?style=flat-square)

A Helm chart for Kubernetes
Open Source Infrastructure-wide continuous profiling

**Homepage:** <https://parca.dev/>

## Source Code

* <https://github.com/rlex/helm-charts>

### Usage

Please consult official docs on usage.
Chart includes prometheus-style discovery rule with annotations:

If you want k8s prometheus-like scraping for pprof endpoints, all you need is to add annotations for pod:
```
parca.dev/scrape: 'true'
```

to furter adjust scope of scraping, you can use
```
parca.dev/port: 'debug'
```

## Values

Expand All @@ -22,6 +43,7 @@ A Helm chart for Kubernetes
| agent.service.port | int | `7071` | service port for agent |
| agent.service.type | string | `"ClusterIP"` | service type for agent |
| agent.serviceMonitor.enabled | bool | `false` | enables prometheus servicemonitor for agent |
| agent.serviceMonitor.jobLabel | string | `"parca-agent"` | |
| agent.socketPath | string | `"/run/containerd/containerd.sock"` | Path to host docker/containerd/crio socket |
| agent.tolerations | list | `[{"effect":"NoSchedule","operator":"Exists"},{"effect":"NoExecute","operator":"Exists"}]` | node tolerations for scheduling agent pods |
| fullnameOverride | string | `""` | Overrides helm-generated chart fullname |
Expand All @@ -34,6 +56,7 @@ A Helm chart for Kubernetes
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| nameOverride | string | `""` | overrides chart name |
| server.config | object | see values.yaml | parca server config block |
| server.corsAllowedOrigins | string | `"*"` | CORS setting |
| 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 |
Expand All @@ -44,14 +67,16 @@ A Helm chart for Kubernetes
| server.podSecurityContext | object | `{}` | additional security context for server pod |
| server.resources | object | `{}` | resource limits and requests for server pod |
| server.retentionTime | string | `"6h"` | Sets retention period for server TSDB |
| server.scrapeConfigs | list | see values.yaml | scrape configs for parca server |
| server.securityContext | object | `{}` | additional security context for server |
| server.service.port | int | `7070` | service port for server |
| server.service.type | string | `"ClusterIP"` | service type for server |
| server.serviceMonitor.enabled | bool | `false` | enables servicemonitor for server monitoring |
| server.serviceMonitor.jobLabel | string | `"parca-server"` | |
| server.tolerations | object | `{}` | tolerations for scheduling server pod |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. -- If not set and create is true, a name is generated using the fullname template |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{{- if .Values.agent.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
{{- include "parca.labels.agent" . | nindent 4 }}
{{- include "parca.labels" . | nindent 4 }}
name: {{ include "parca.serviceAccountName" . }}
rules:
- apiGroups:
Expand All @@ -18,5 +17,4 @@ rules:
resources:
- nodes
verbs:
- get
{{- end }}
- get
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.agent.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -12,5 +11,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "parca.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
namespace: {{ .Release.Namespace }}
12 changes: 3 additions & 9 deletions charts/parca/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ metadata:
{{- include "parca.labels.server" . | nindent 4 }}
data:
parca.yaml: |-
"debug_info":
"bucket":
"config":
"directory": "./tmp"
"type": "FILESYSTEM"
"cache":
"config":
"directory": "./tmp"
"type": "FILESYSTEM"
{{ toYaml .Values.server.config | indent 4 }}
scrape_configs:
{{ toYaml .Values.server.scrapeConfigs | indent 4 }}
39 changes: 39 additions & 0 deletions charts/parca/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,45 @@ server:
logLevel: info
# -- CORS setting
corsAllowedOrigins: "*"
# -- parca server config block
config:
debug_info:
bucket:
config:
directory: "./tmp"
type: FILESYSTEM
cache:
config:
directory: "./tmp"
type: FILESYSTEM
# -- scrape configs for parca server
scrapeConfigs:
- job_name: 'kubernetes-pods'
scrape_interval: 1m
scrape_timeout: 10s
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_parca_dev_scrape]
action: keep
regex: true
- source_labels: [__meta_kubernetes_pod_annotation_parca_dev_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels: [__address__, __meta_kubernetes_pod_annotation_parca_dev_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
action: replace
target_label: kubernetes_namespace
- source_labels: [__meta_kubernetes_pod_name]
action: replace
target_label: kubernetes_pod_name
# -- additional annotations for server pod
podAnnotations: {}
# -- additional security context for server pod
Expand Down

0 comments on commit 5fbb25e

Please sign in to comment.