Skip to content

Commit

Permalink
Feature/add extra labels (#48)
Browse files Browse the repository at this point in the history
* Suport of adding extra labels to server and agents

* Move to correct place

* Add pod labels

* Documentation

* Bumped Chart + Application version
  • Loading branch information
aristotelhs authored Mar 8, 2023
1 parent 6d67679 commit ca13805
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/parca/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 4.5.0
version: 4.6.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.16.0
appVersion: v0.16.2
6 changes: 5 additions & 1 deletion charts/parca/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# parca

![Version: 4.5.0](https://img.shields.io/badge/Version-4.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.16.0](https://img.shields.io/badge/AppVersion-v0.16.0-informational?style=flat-square)
![Version: 4.6.0](https://img.shields.io/badge/Version-4.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.16.2](https://img.shields.io/badge/AppVersion-v0.16.2-informational?style=flat-square)

Open Source Infrastructure-wide continuous profiling

Expand Down Expand Up @@ -66,12 +66,14 @@ helm repo add parca https://parca-dev.github.io/helm-charts
| agent.enabled | bool | `true` | Allows disabling parca agent |
| agent.extraArgs | list | `[]` | additional arguments to pass to the agent |
| agent.extraEnv | list | `[]` | Additional container environment variables for agent |
| agent.extraLabels | object | `{}` | Additional labels for agent daemonset |
| agent.image.pullPolicy | string | `"IfNotPresent"` | Overrides pullpolicy |
| agent.image.repository | string | `"ghcr.io/parca-dev/parca-agent"` | Overrides the image repository |
| agent.image.tag | string | `"v0.13.0"` | Overrides the image tag |
| agent.logLevel | string | `"info"` | Agent log level |
| agent.nodeSelector | object | `{}` | node selector for scheduling agent pods |
| agent.podAnnotations | object | `{}` | Additional annotations for pods |
| agent.podExtraLabels | object | `{}` | Additional labels for pods |
| agent.podSecurityContext | object | `{}` | Additional pod secutiry context |
| agent.remoteStoreAddress | string | `""` | Address of parca server to send profiles. If not defined, will be generated based on deployment settings. |
| agent.remoteStoreBearerToken | string | `""` | |
Expand Down Expand Up @@ -99,13 +101,15 @@ helm repo add parca https://parca-dev.github.io/helm-charts
| server.enabled | bool | `true` | Allows disabling parca server |
| server.extraArgs | list | `[]` | additional arguments to pass to the server |
| server.extraEnv | list | `[]` | additional container environment variables for server |
| server.extraLabels | object | `{}` | additional labels for deployment |
| 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 |
| server.image.tag | string | `"v0.16.0"` | Overrides the image tag for server |
| server.logLevel | string | `"info"` | logging level of parca server |
| server.nodeSelector | object | `{}` | node selector for scheduling server pod |
| server.otlpAddress | string | `""` | OpenTelemetry collector address to send traces to |
| server.podAnnotations | object | `{}` | additional annotations for server pod |
| server.podExtraLabels | object | `{}` | additional labels for server pod |
| server.podSecurityContext | object | `{}` | additional security context for server pod |
| server.rbac | object | `{"create":true}` | clusterrole and binding for kubernetes service discovery mechanism |
| server.resources | object | `{}` | resource limits and requests for server pod |
Expand Down
10 changes: 10 additions & 0 deletions charts/parca/templates/agent-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
name: {{ include "parca.fullname" . }}-agent
labels:
{{- include "parca.labels.agent" . | nindent 4 }}
{{- if .Values.agent.extraLabels }}
{{- with .Values.agent.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
selector:
matchLabels:
Expand All @@ -18,6 +23,11 @@ spec:
labels:
parca: {{ include "parca.fullname" . }}-agent
{{- include "parca.selectorLabels.agent" . | nindent 8 }}
{{- if .Values.agent.podExtraLabels }}
{{- with .Values.agent.podExtraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
10 changes: 10 additions & 0 deletions charts/parca/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
name: {{ include "parca.fullname" . }}
labels:
{{- include "parca.labels.server" . | nindent 4 }}
{{- if .Values.server.extraLabels }}
{{- with .Values.server.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
{{- /*
{{- if not .Values.autoscaling.enabled }}
Expand All @@ -27,6 +32,11 @@ spec:
{{- end }}
labels:
{{- include "parca.selectorLabels.server" . | nindent 8 }}
{{- if .Values.server.podExtraLabels }}
{{- with .Values.server.podExtraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
8 changes: 8 additions & 0 deletions charts/parca/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ agent:
extraArgs: []
# -- Additional container environment variables for agent
extraEnv: []
# -- Additional labels for agent daemonset
extraLabels: {}
# -- Address of parca server to send profiles. If not defined, will be generated based on deployment settings.
remoteStoreAddress: ""
remoteStoreInsecure: true
remoteStoreInsecureSkipVerify: true
remoteStoreBearerToken: ""
# -- Additional labels for pods
podExtraLabels: {}
# -- Additional annotations for pods
podAnnotations: {}
# -- Additional pod secutiry context
Expand Down Expand Up @@ -84,6 +88,8 @@ server:
extraArgs: []
# -- additional container environment variables for server
extraEnv: []
# -- additional labels for deployment
extraLabels: {}
# -- 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
Expand Down Expand Up @@ -121,6 +127,8 @@ server:
- source_labels: [__meta_kubernetes_pod_name]
action: replace
target_label: kubernetes_pod_name
# -- additional labels for server pod
podExtraLabels: {}
# -- additional annotations for server pod
podAnnotations: {}
# -- additional security context for server pod
Expand Down

0 comments on commit ca13805

Please sign in to comment.