From ea65bd095cb876b29a747954fdaef28370d87a22 Mon Sep 17 00:00:00 2001 From: Spencer Gilbert Date: Tue, 21 Sep 2021 11:39:44 -0400 Subject: [PATCH] feat(vector): Add optional PodDisruptionBudget resource for Vector (#57) Signed-off-by: Spencer Gilbert --- charts/vector/Chart.yaml | 2 +- charts/vector/README.md | 5 ++++- charts/vector/templates/pdb.yaml | 18 ++++++++++++++++++ charts/vector/values.yaml | 8 ++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 charts/vector/templates/pdb.yaml diff --git a/charts/vector/Chart.yaml b/charts/vector/Chart.yaml index 0df8f6f..9c34b25 100644 --- a/charts/vector/Chart.yaml +++ b/charts/vector/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: vector -version: "0.1.0-alpha.3" +version: "0.1.0-alpha.4" kubeVersion: ">=1.15.0-0" description: A lightweight, ultra-fast tool for building observability pipelines type: application diff --git a/charts/vector/README.md b/charts/vector/README.md index 0d024ea..4dcfeb8 100644 --- a/charts/vector/README.md +++ b/charts/vector/README.md @@ -1,6 +1,6 @@ # Vector -![Version: 0.1.0-alpha.3](https://img.shields.io/badge/Version-0.1.0--alpha.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.16.1-distroless-libc](https://img.shields.io/badge/AppVersion-0.16.1--distroless--libc-informational?style=flat-square) +![Version: 0.1.0-alpha.4](https://img.shields.io/badge/Version-0.1.0--alpha.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.16.1-distroless-libc](https://img.shields.io/badge/AppVersion-0.16.1--distroless--libc-informational?style=flat-square) [Vector](https://vector.dev/) is a high-performance, end-to-end observability data pipeline that puts you in control of your observability data. Collect, transform, and route all your logs, metrics, and traces to any vendors you want today and any other vendors you may want tomorrow. Vector enables dramatic cost reduction, novel data enrichment, and data security where you need it, not where is most convenient for your vendors. @@ -112,6 +112,9 @@ helm install --name \ | persistence.selectors | object | `{}` | Specifies the selectors for PersistentVolumeClaims | | persistence.size | string | `"10Gi"` | Specifies the size of PersistentVolumeClaims | | podAnnotations | object | `{}` | Set annotations on Vector Pods | +| podDisruptionBudget.enabled | bool | `false` | Enable a PodDisruptionBudget for Vector | +| podDisruptionBudget.maxUnavailable | int | `1` | The number of Pods that can be unavailable after an eviction | +| podDisruptionBudget.minAvailable | int | `1` | The number of Pods that must still be available after an eviction | | podLabels | object | `{}` | Set labels on Vector Pods | | podManagementPolicy | string | `"OrderedReady"` | Specify the podManagementPolicy for the Aggregator role | | podMonitor.enabled | bool | `false` | If true, create a PodMonitor for Vector | diff --git a/charts/vector/templates/pdb.yaml b/charts/vector/templates/pdb.yaml new file mode 100644 index 0000000..2a55935 --- /dev/null +++ b/charts/vector/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if .Values.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "vector.fullname" . }} + labels: + {{- include "vector.labels" . | nindent 4 }} +spec: +{{- with .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} +{{- end }} +{{- with .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} +{{- end }} + selector: + matchLabels: + {{- include "vector.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/vector/values.yaml b/charts/vector/values.yaml index 863c6e9..38a909b 100644 --- a/charts/vector/values.yaml +++ b/charts/vector/values.yaml @@ -66,6 +66,14 @@ autoscaling: # type: AverageValue # averageValue: 95 +podDisruptionBudget: + # podDisruptionBudget.enabled -- Enable a PodDisruptionBudget for Vector + enabled: false + # podDisruptionBudget.minAvailable -- The number of Pods that must still be available after an eviction + minAvailable: 1 + # podDisruptionBudget.maxUnavailable -- The number of Pods that can be unavailable after an eviction + maxUnavailable: 1 + rbac: # rbac.create -- If true, create and use RBAC resources create: true