diff --git a/charts/bindplane/Chart.yaml b/charts/bindplane/Chart.yaml index 69fba95..a1bab63 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.18.0 +version: 1.19.0 # The BindPlane OP tagged release. If the user does not # set the `image.tag` values option, this version is used. appVersion: 1.73.0 diff --git a/charts/bindplane/README.md b/charts/bindplane/README.md index 4dc8f9a..7b3edf2 100644 --- a/charts/bindplane/README.md +++ b/charts/bindplane/README.md @@ -1,6 +1,6 @@ # bindplane -![Version: 1.18.0](https://img.shields.io/badge/Version-1.18.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.73.0](https://img.shields.io/badge/AppVersion-1.73.0-informational?style=flat-square) +![Version: 1.19.0](https://img.shields.io/badge/Version-1.19.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.73.0](https://img.shields.io/badge/AppVersion-1.73.0-informational?style=flat-square) BindPlane OP is an observability pipeline. @@ -108,6 +108,7 @@ BindPlane OP is an observability pipeline. | jobs.resources.requests.cpu | string | `"1000m"` | CPU request. | | jobs.resources.requests.memory | string | `"1000Mi"` | Memory request. | | multiAccount | bool | `false` | Whether or not to enable multi account (tenant). | +| nats.deploymentType | string | `"StatefulSet"` | Deployment Type for NATs. Valid options include `StatefulSet` and `Deployment`, case sensitive. StatefulSet is recommended, and does not consume a volume mount. If your cluster is restricted to using Deployments, you can use that option instead. | | nats.resources | object | `{"limits":{"memory":"1000Mi"},"requests":{"cpu":"1000m","memory":"1000Mi"}}` | NATs server resources request block, when event bus type is `nats`. | | nats.resources.limits.memory | string | `"1000Mi"` | Memory limit for the NATs server pods, when event bus type is `nats`. | | nats.resources.requests.cpu | string | `"1000m"` | CPU request for the NATs server pods, when event bus type is `nats`. | diff --git a/charts/bindplane/templates/bindplane-nats.yaml b/charts/bindplane/templates/bindplane-nats.yaml index 78581f1..31b31f9 100644 --- a/charts/bindplane/templates/bindplane-nats.yaml +++ b/charts/bindplane/templates/bindplane-nats.yaml @@ -1,6 +1,6 @@ {{- if eq .Values.eventbus.type "nats" }} apiVersion: apps/v1 -kind: StatefulSet +kind: {{ .Values.nats.deploymentType }} metadata: name: {{ include "bindplane.fullname" . }}-nats namespace: {{ .Release.Namespace }} @@ -12,8 +12,10 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: 3 + {{ if eq .Values.nats.deploymentType "StatefulSet" }} serviceName: {{ include "bindplane.fullname" . }}-nats-cluster-headless podManagementPolicy: Parallel + {{ end }} selector: matchLabels: app.kubernetes.io/name: {{ include "bindplane.name" . }} @@ -166,7 +168,12 @@ spec: - name: BINDPLANE_NATS_SERVER_CLUSTER_PORT value: "6222" - name: BINDPLANE_NATS_SERVER_CLUSTER_ROUTES + {{ if eq .Values.nats.deploymentType "StatefulSet" }} value: nats://{{ include "bindplane.fullname" . }}-nats-0.{{ include "bindplane.fullname" . }}-nats-cluster-headless.{{ .Release.Namespace }}.svc.cluster.local:6222,nats://{{ include "bindplane.fullname" . }}-nats-1.{{ include "bindplane.fullname" . }}-nats-cluster-headless.{{ .Release.Namespace }}.svc.cluster.local:6222,nats://{{ include "bindplane.fullname" . }}-nats-2.{{ include "bindplane.fullname" . }}-nats-cluster-headless.{{ .Release.Namespace }}.svc.cluster.local:6222 + {{ end }} + {{ if eq .Values.nats.deploymentType "Deployment" }} + value: nats://{{ include "bindplane.fullname" . }}-nats-cluster-headless.{{ .Release.Namespace }}.svc.cluster.local:6222 + {{ end }} - name: BINDPLANE_NATS_CLIENT_NAME valueFrom: fieldRef: diff --git a/charts/bindplane/values.schema.json b/charts/bindplane/values.schema.json new file mode 100644 index 0000000..6e0cc48 --- /dev/null +++ b/charts/bindplane/values.schema.json @@ -0,0 +1,19 @@ +{ + "$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 + } + } + } + diff --git a/charts/bindplane/values.yaml b/charts/bindplane/values.yaml index d85b0b0..37d8d0a 100644 --- a/charts/bindplane/values.yaml +++ b/charts/bindplane/values.yaml @@ -330,6 +330,10 @@ resources: # cpu: 1000m nats: + # -- Deployment Type for NATs. Valid options include `StatefulSet` and `Deployment`, case sensitive. + # StatefulSet is recommended, and does not consume a volume mount. If your cluster is restricted to + # using Deployments, you can use that option instead. + deploymentType: StatefulSet # -- NATs server resources request block, when event bus type is `nats`. resources: requests: