From e709aeac2e86bf31177b8acbb95767901c80cdb8 Mon Sep 17 00:00:00 2001 From: Joseph Sirianni Date: Fri, 25 Oct 2024 13:06:37 -0400 Subject: [PATCH] fix: Do not deploy jobs pod when using local eventbus (#175) * Do not deploy jobs pod and use mode all when eventbus type is unset * validate eventbus type param * bump version --- charts/bindplane/Chart.yaml | 2 +- charts/bindplane/README.md | 2 +- .../bindplane/templates/bindplane-jobs.yaml | 2 +- charts/bindplane/templates/bindplane.yaml | 2 +- charts/bindplane/values.schema.json | 42 ++++++++++++------- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/charts/bindplane/Chart.yaml b/charts/bindplane/Chart.yaml index dad34ca..5cbd424 100644 --- a/charts/bindplane/Chart.yaml +++ b/charts/bindplane/Chart.yaml @@ -3,7 +3,7 @@ name: bindplane description: BindPlane OP is an observability pipeline. type: application # The chart's version -version: 1.20.3 +version: 1.20.4 # The BindPlane OP tagged release. If the user does not # set the `image.tag` values option, this version is used. appVersion: 1.77.0 diff --git a/charts/bindplane/README.md b/charts/bindplane/README.md index d0e5d42..6423370 100644 --- a/charts/bindplane/README.md +++ b/charts/bindplane/README.md @@ -1,6 +1,6 @@ # bindplane -![Version: 1.20.3](https://img.shields.io/badge/Version-1.20.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.77.0](https://img.shields.io/badge/AppVersion-1.77.0-informational?style=flat-square) +![Version: 1.20.4](https://img.shields.io/badge/Version-1.20.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.77.0](https://img.shields.io/badge/AppVersion-1.77.0-informational?style=flat-square) BindPlane OP is an observability pipeline. diff --git a/charts/bindplane/templates/bindplane-jobs.yaml b/charts/bindplane/templates/bindplane-jobs.yaml index a280a10..66e5ae8 100644 --- a/charts/bindplane/templates/bindplane-jobs.yaml +++ b/charts/bindplane/templates/bindplane-jobs.yaml @@ -1,4 +1,4 @@ -{{- if eq (include "bindplane.deployment_type" .) "Deployment" }} +{{- if ne .Values.eventbus.type "" }} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/bindplane/templates/bindplane.yaml b/charts/bindplane/templates/bindplane.yaml index 7286e7d..5d1b77d 100644 --- a/charts/bindplane/templates/bindplane.yaml +++ b/charts/bindplane/templates/bindplane.yaml @@ -130,7 +130,7 @@ spec: - name: KUBERNETES_CONTAINER_NAME value: "server" - name: BINDPLANE_MODE - {{- if eq (include "bindplane.deployment_type" .) "StatefulSet" }} + {{- if eq .Values.eventbus.type "" }} value: all {{- else }} value: node diff --git a/charts/bindplane/values.schema.json b/charts/bindplane/values.schema.json index 6e0cc48..0af34e1 100644 --- a/charts/bindplane/values.schema.json +++ b/charts/bindplane/values.schema.json @@ -1,19 +1,29 @@ { - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "nats": { - "type": "object", - "properties": { - "deploymentType": { - "type": "string", - "enum": ["StatefulSet", "Deployment"], - "description": "The type of NATS deployment, either StatefulSet or Deployment." - } - }, - "required": ["deploymentType"], - "additionalProperties": true - } + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "nats": { + "type": "object", + "properties": { + "deploymentType": { + "type": "string", + "enum": ["StatefulSet", "Deployment"], + "description": "The type of NATS deployment, either StatefulSet or Deployment." + } + }, + "required": ["deploymentType"], + "additionalProperties": true + }, + "eventbus": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["", "nats", "pubsub", "kafka"], + "description": "The type of event bus used. Must be one of '', 'nats', 'pubsub', or 'kafka'." + } + }, + "additionalProperties": true } } - +}