Skip to content

Commit

Permalink
Fix podDisruptionBudget default values (#121)
Browse files Browse the repository at this point in the history
* Update values.yaml

By default, you can only have one or the other. If both are set then we get the following error: 

EXIT STATUS
  1
 
COMBINED OUTPUT:
  Error: UPGRADE FAILED: release opentelemetry-collector failed, and has been rolled back due to atomic being set: failed to create resource: PodDisruptionBudget.policy "opentelemetry-collector" is invalid: spec: Invalid value: policy.PodDisruptionBudgetSpec{MinAvailable:(*intstr.IntOrString)(0xc045b8be40), Selector:(*v1.LabelSelector)(0xc045b8be60), MaxUnavailable:(*intstr.IntOrString)(0xc045b8be20)}: minAvailable and maxUnavailable cannot be both set
  • Loading branch information
mahparaashley authored Feb 7, 2022
1 parent ffd0d36 commit 7877ae5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.9.0
version: 0.9.1
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
4 changes: 4 additions & 0 deletions charts/opentelemetry-collector/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ metadata:
labels:
{{- include "opentelemetry-collector.labels" . | nindent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/opentelemetry-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ serviceMonitor:
# PodDisruptionBudget is used only if standaloneCollector enabled
podDisruptionBudget:
enabled: false
minAvailable: 2
maxUnavailable: 1
# minAvailable: 2
# maxUnavailable: 1

# autoscaling is used only if standaloneCollector enabled
autoscaling:
Expand Down

0 comments on commit 7877ae5

Please sign in to comment.