Skip to content

Commit 56f4cac

Browse files
authored
Add pdb resource (#51)
1 parent 8a60d74 commit 56f4cac

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

helm-charts/splunk-otel-collector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: splunk-otel-collector
3-
version: 0.20.1
3+
version: 0.20.2
44
description: Splunk OpenTelemetry Connector for Kubernetes
55
type: application
66
keywords:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{- if and .Values.otelCollector.enabled .Values.podDisruptionBudget }}
2+
apiVersion: policy/v1beta1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ template "splunk-otel-collector.fullname" . }}
6+
labels:
7+
app: {{ template "splunk-otel-collector.name" . }}
8+
component: otel-collector
9+
chart: {{ template "splunk-otel-collector.chart" . }}
10+
release: {{ .Release.Name }}
11+
heritage: {{ .Release.Service }}
12+
spec:
13+
selector:
14+
matchLabels:
15+
app: {{ template "splunk-otel-collector.name" . }}
16+
component: otel-collector
17+
release: {{ .Release.Name }}
18+
{{ toYaml .Values.podDisruptionBudget | trim | indent 2 }}
19+
{{- end }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{- if and (and .Values.otelK8sClusterReceiver.enabled .Values.metricsEnabled) .Values.podDisruptionBudget }}
2+
apiVersion: policy/v1beta1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ template "splunk-otel-collector.fullname" . }}-otel-k8s-cluster-receiver
6+
labels:
7+
app: {{ template "splunk-otel-collector.name" . }}
8+
component: otel-k8s-cluster-receiver
9+
chart: {{ template "splunk-otel-collector.chart" . }}
10+
release: {{ .Release.Name }}
11+
heritage: {{ .Release.Service }}
12+
spec:
13+
selector:
14+
matchLabels:
15+
app: {{ template "splunk-otel-collector.name" . }}
16+
component: otel-k8s-cluster-receiver
17+
release: {{ .Release.Name }}
18+
{{ toYaml .Values.podDisruptionBudget | trim | indent 2 }}
19+
{{- end }}

helm-charts/splunk-otel-collector/values.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ otelAgent:
8787
# The ports to be exposed by the agent to the host.
8888
# Make sure that only necessary ports are exposed, <hostIP, hostPort, protocol> combination must
8989
# be unique across all the nodes in k8s cluster. Any port can be disabled,
90-
# For exapmle to disable zipkin ports set `otelAgent.ports.zipkin: null`.
90+
# For example to disable zipkin ports set `otelAgent.ports.zipkin: null`.
9191
ports:
9292
otlp:
9393
containerPort: 55680
@@ -536,6 +536,14 @@ image:
536536
# Extra system configuration
537537
################################################################################
538538

539+
## Limits how many pods may be unavailable due to voluntary disruptions.
540+
## https://kubernetes.io/docs/tasks/run-application/configure-pdb/
541+
podDisruptionBudget: {}
542+
# Minimum number of pods (as a number or percentage) that must remain available.
543+
# minAvailable:
544+
# Maximum number of pods (as a number or percentage) that can be unavailable.
545+
# maxUnavailable:
546+
539547
serviceAccount:
540548
# Specifies whether a ServiceAccount should be created
541549
create: true

0 commit comments

Comments
 (0)