Skip to content

Commit

Permalink
feat(observability-pipeline): use pvc for cacheing latest config (#421)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?

- adds support for using pvc to persist latest config in control plane

## Short description of the changes

- add a new `persistentVolumnClaimName` in the `values.yaml` file to
allow users to mount a volume
- pass in the mount path using `-config-cache-path` flag

## How to verify that this has the expected result
  • Loading branch information
VinozzZ authored Feb 4, 2025
1 parent 835f65c commit 2901c1d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/observability-pipeline/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: observability-pipeline
description: Chart to deploy both OpenTelemetry Collector and Honeycomb Refinery
type: application
version: 0.0.10-alpha
version: 0.0.11-alpha
appVersion: 0.0.1-alpha
keywords:
- refinery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.controlPlane.image.repository }}:{{ .Values.controlPlane.image.tag }}"
imagePullPolicy: {{ .Values.controlPlane.image.pullPolicy }}
{{- if .Values.controlPlane.telemetry.enabled }}
{{- if or .Values.controlPlane.telemetry.enabled .Values.controlPlane.persistentVolumeClaimName }}
args:
{{- if .Values.controlPlane.telemetry.enabled }}
- -otel-config
- /etc/straws-control-plane/otel-config.yaml
{{- end }}
{{- if .Values.controlPlane.persistentVolumeClaimName }}
- -config-cache-path
- /app/straws-control-plane/cache
{{- end }}
{{- end }}
env:
- name: HONEYCOMB_API
value: {{ .Values.controlPlane.endpoint }}
Expand All @@ -46,12 +52,17 @@ spec:
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if or .Values.controlPlane.volumeMounts .Values.controlPlane.telemetry.enabled }}
{{- if or .Values.controlPlane.volumeMounts .Values.controlPlane.telemetry.enabled .Values.controlPlane.persistentVolumeClaimName }}
volumeMounts:
{{- if .Values.controlPlane.telemetry.enabled }}
- name: otel-config
mountPath: /etc/straws-control-plane
{{- end }}
{{- if .Values.controlPlane.persistentVolumeClaimName }}
- name: latest-config-cache
mountPath: /app/straws-control-plane/cache
readonly: false
{{- end }}
{{- with .Values.controlPlane.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand All @@ -63,7 +74,7 @@ spec:
- name: opamp
containerPort: 4320
protocol: TCP
{{- if or .Values.controlPlane.volumeMounts .Values.controlPlane.telemetry.enabled }}
{{- if or .Values.controlPlane.volumeMounts .Values.controlPlane.telemetry.enabled .Values.controlPlane.persistentVolumeClaimName }}
volumes:
{{- if .Values.controlPlane.telemetry.enabled }}
- name: otel-config
Expand All @@ -73,6 +84,10 @@ spec:
- key: otel-config
path: otel-config.yaml
{{- end }}
{{- if .Values.controlPlane.persistentVolumeClaimName }}
- name: latest-config-cache
persistentVolumeClaimName: {{ .Values.controlPlane.persistentVolumeClaimName }}
{{- end }}
{{- with .Values.controlPlane.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/observability-pipeline/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ controlPlane:
pipelineInstallationID: ""
team: ""
publicMgmtKey: ""
persistentVolumeClaimName: ""
environment:
- name: HONEYCOMB_MGMT_API_SECRET
valueFrom:
Expand Down

0 comments on commit 2901c1d

Please sign in to comment.