Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support extra labels for bindplane and prometheus pods #102

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/bindplane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: bindplane
description: BindPlane OP is an open source observability pipeline.
type: application
# The chart's version
version: 1.3.2
version: 1.4.0
# The BindPlane OP tagged release. If the user does not
# set the `image.tag` values option, this version is used.
appVersion: 1.49.0
Expand Down
4 changes: 3 additions & 1 deletion charts/bindplane/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bindplane

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

BindPlane OP is an open source observability pipeline.

Expand Down Expand Up @@ -91,6 +91,7 @@ BindPlane OP is an open source observability pipeline.
| eventbus.pubsub.projectid | string | `""` | |
| eventbus.pubsub.topic | string | `""` | |
| eventbus.type | string | `""` | |
| extraPodLabels | object | `{}` | Optional arbitrary labels to add to the BindPlane pod(s). |
| extraVolumeMounts | list | `[]` | Optional arbitrary volume mounts to add to the BindPlane pod(s). |
| extraVolumes | list | `[]` | Optional arbitrary volumes to add to the BindPlane pod(s). |
| health.livenessProbe | object | `{"httpGet":{"path":"/health","port":"http"}}` | Full configuration for livenessProbe. Supports all options documented here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/. |
Expand All @@ -110,6 +111,7 @@ BindPlane OP is an open source observability pipeline.
| prometheus.auth.type | string | `"none"` | Prometheus authentication. Supported options include `none` and `basic`. |
| prometheus.auth.username | string | `""` | Prometheus basic authentication username. |
| prometheus.enableSideCar | bool | `false` | When enabled, the Prometheus measurements backend will be deployed as a sidecar container. This option is only valid when BindPlane is running as a single node statefulset. |
| prometheus.extraPodLabels | object | `{}` | Optional arbitrary labels to add to the Prometheus pod. This option is only used when Prometheus is running as a StatefulSet managed by the chart (The default mode). |
| prometheus.host | string | `""` | The Prometheus hostname or IP address used for querying and writing metrics. Defaults to the service name of the Prometheus StatefulSet deployed by this chart. |
| prometheus.image.name | string | `"ghcr.io/observiq/bindplane-prometheus"` | Image name to be used. Defaults to `ghcr.io/observiq/bindplane-prometheus`. NOTE: The image tag is derived from the BindPlane server tag. |
| prometheus.port | int | `9090` | The Prometheus TCP port used for querying and writing metrics. |
Expand Down
3 changes: 3 additions & 0 deletions charts/bindplane/templates/bindplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spec:
app.kubernetes.io/stack: bindplane
app.kubernetes.io/component: server
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if len .Values.extraPodLabels }}
{{- toYaml .Values.extraPodLabels | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "bindplane.fullname" . }}
{{- with .Values.podSecurityContext }}
Expand Down
3 changes: 3 additions & 0 deletions charts/bindplane/templates/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spec:
app.kubernetes.io/stack: bindplane
app.kubernetes.io/component: prometheus
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if len .Values.prometheus.extraPodLabels }}
{{- toYaml .Values.prometheus.extraPodLabels | nindent 8 }}
{{- end }}
spec:
securityContext:
fsGroup: 65534
Expand Down
5 changes: 5 additions & 0 deletions charts/bindplane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ prometheus:
volumeSize: 10Gi
# -- The Kubernetes storage class to use for the volumeClaimTemplate. If unset, the volume claim will use the cluster's default storage class.
storageClass: ""
# -- Optional arbitrary labels to add to the Prometheus pod. This option is only used when Prometheus is running as a StatefulSet managed by the chart (The default mode).
extraPodLabels: {}


eventbus:
Expand Down Expand Up @@ -419,3 +421,6 @@ extraVolumes: []

# -- Optional arbitrary volume mounts to add to the BindPlane pod(s).
extraVolumeMounts: []

# -- Optional arbitrary labels to add to the BindPlane pod(s).
extraPodLabels: {}
15 changes: 15 additions & 0 deletions test/cases/labels/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Required options
config:
username: bpuser
password: bppass
secret_key: 12D8FB6E-1532-4A4C-97AF-95A430BE5E6E
sessions_secret: 4484766F-5016-4077-B8E0-0DE1D637854B

extraPodLabels:
extraKey: extraValue
extraKey2: extraValue2

prometheus:
extraPodLabels:
extraKeyProm: extraValueProm
extraKeyProm2: extraValueProm2
Loading