From 7f36a74130da0fca46b9ad86f8acf9e1419e70b5 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Fri, 12 Apr 2024 10:27:35 +0100 Subject: [PATCH 1/2] Allow specifying sidecars for the pods in our Helm chart. --- .../templates/app-service-deployment.yaml | 3 +++ .../automation-worker-service-deployment.yaml | 3 +++ .../templates/minio-service-deployment.yaml | 3 +++ .../templates/proxy-service-deployment.yaml | 4 +++- .../templates/redis-service-deployment.yaml | 3 +++ .../templates/worker-service-deployment.yaml | 3 +++ charts/budibase/values.yaml | 24 +++++++++++++++++++ 7 files changed, 42 insertions(+), 1 deletion(-) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index c7c4481122..2fd8506e30 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -235,6 +235,9 @@ spec: args: {{- toYaml .Values.services.apps.args | nindent 10 }} {{ end }} + {{- if .Values.services.apps.extraContainers }} + {{- toYaml .Values.services.apps.extraContainers | nindent 6 }} + {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/templates/automation-worker-service-deployment.yaml b/charts/budibase/templates/automation-worker-service-deployment.yaml index 36c3a8ffbf..53d5fcc860 100644 --- a/charts/budibase/templates/automation-worker-service-deployment.yaml +++ b/charts/budibase/templates/automation-worker-service-deployment.yaml @@ -235,6 +235,9 @@ spec: args: {{- toYaml .Values.services.automationWorkers.args | nindent 10 }} {{ end }} + {{- if .Values.services.automationWorkers.extraContainers }} + {{- toYaml .Values.services.automationWorkers.extraContainers | nindent 6 }} + {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/templates/minio-service-deployment.yaml b/charts/budibase/templates/minio-service-deployment.yaml index 28e8eb9991..ade1d37cd2 100644 --- a/charts/budibase/templates/minio-service-deployment.yaml +++ b/charts/budibase/templates/minio-service-deployment.yaml @@ -54,6 +54,9 @@ spec: volumeMounts: - mountPath: /data name: minio-data + {{- if .Values.services.objectStore.extraContainers }} + {{- toYaml .Values.services.objectStore.extraContainers | nindent 6 }} + {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/templates/proxy-service-deployment.yaml b/charts/budibase/templates/proxy-service-deployment.yaml index 233028cafe..462c6a0749 100644 --- a/charts/budibase/templates/proxy-service-deployment.yaml +++ b/charts/budibase/templates/proxy-service-deployment.yaml @@ -82,7 +82,9 @@ spec: resources: {{- toYaml . | nindent 10 }} {{ end }} - volumeMounts: + {{- if .Values.services.proxy.extraContainers }} + {{- toYaml .Values.services.proxy.extraContainers | nindent 6 }} + {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/templates/redis-service-deployment.yaml b/charts/budibase/templates/redis-service-deployment.yaml index bca40d2237..1a003d3814 100644 --- a/charts/budibase/templates/redis-service-deployment.yaml +++ b/charts/budibase/templates/redis-service-deployment.yaml @@ -34,6 +34,9 @@ spec: volumeMounts: - mountPath: /data name: redis-data + {{- if .Values.services.redis.extraContainers }} + {{- toYaml .Values.services.redis.extraContainers | nindent 6 }} + {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/templates/worker-service-deployment.yaml b/charts/budibase/templates/worker-service-deployment.yaml index 2f97508ae3..cc27bf429e 100644 --- a/charts/budibase/templates/worker-service-deployment.yaml +++ b/charts/budibase/templates/worker-service-deployment.yaml @@ -221,6 +221,9 @@ spec: args: {{- toYaml .Values.services.worker.args | nindent 10 }} {{ end }} + {{- if .Values.services.worker.extraContainers }} + {{- toYaml .Values.services.worker.extraContainers | nindent 6 }} + {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 19b6c22d6c..d368c0ff38 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -206,6 +206,10 @@ services: # for autoscaling to work, you will need to have metrics-server # configured, and resources set for the proxy pods. targetCPUUtilizationPercentage: 80 + # -- Additional containers to be added to the proxy pod. + extraContainers: [] + # - name: my-sidecar + # image: myimage:latest apps: # @ignore (you shouldn't need to change this) @@ -274,6 +278,10 @@ services: # autoscaling to work, you will need to have metrics-server configured, # and resources set for the apps pods. targetCPUUtilizationPercentage: 80 + # -- Additional containers to be added to the apps pod. + extraContainers: [] + # - name: my-sidecar + # image: myimage:latest automationWorkers: # -- Whether or not to enable the automation worker service. If you disable this, @@ -346,6 +354,10 @@ services: # Note that for autoscaling to work, you will need to have metrics-server # configured, and resources set for the automation worker pods. targetCPUUtilizationPercentage: 80 + # -- Additional containers to be added to the automationWorkers pod. + extraContainers: [] + # - name: my-sidecar + # image: myimage:latest worker: # @ignore (you shouldn't need to change this) @@ -414,6 +426,10 @@ services: # for autoscaling to work, you will need to have metrics-server # configured, and resources set for the worker pods. targetCPUUtilizationPercentage: 80 + # -- Additional containers to be added to the worker pod. + extraContainers: [] + # - name: my-sidecar + # image: myimage:latest couchdb: # -- Whether or not to spin up a CouchDB instance in your cluster. True by @@ -463,6 +479,10 @@ services: # # for more information on how to set these. resources: {} + # -- Additional containers to be added to the redis pod. + extraContainers: [] + # - name: my-sidecar + # image: myimage:latest objectStore: # -- Set to false if using another object store, such as S3. You will need @@ -505,6 +525,10 @@ services: publicKeyId: "" # -- Base64 encoded private key for the above public key. privateKey64: "" + # -- Additional containers to be added to the objectStore pod. + extraContainers: [] + # - name: my-sidecar + # image: myimage:latest # Override values in couchDB subchart. We're only specifying the values we're changing. # If you want to see all of the available values, see: From d7bfb7a70b2ed00fc8d1291e44060e045cbe1076 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Fri, 12 Apr 2024 10:31:38 +0100 Subject: [PATCH 2/2] Regenerate README. --- charts/budibase/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/budibase/README.md b/charts/budibase/README.md index dea7d1dbae..b803da18a4 100644 --- a/charts/budibase/README.md +++ b/charts/budibase/README.md @@ -150,6 +150,8 @@ $ helm install --create-namespace --namespace budibase budibase . -f values.yaml | services.apps.autoscaling.maxReplicas | int | `10` | | | services.apps.autoscaling.minReplicas | int | `1` | | | services.apps.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for the apps service. Note that for autoscaling to work, you will need to have metrics-server configured, and resources set for the apps pods. | +| services.apps.extraContainers | list | `[]` | Additional containers to be added to the apps pod. | +| services.apps.extraEnv | list | `[]` | Extra environment variables to set for apps pods. Takes a list of name=value pairs. | | services.apps.httpLogging | int | `1` | Whether or not to log HTTP requests to the apps service. | | services.apps.livenessProbe | object | HTTP health checks. | Liveness probe configuration for apps pods. You shouldn't need to change this, but if you want to you can find more information here: | | services.apps.logLevel | string | `"info"` | The log level for the apps service. | @@ -162,6 +164,8 @@ $ helm install --create-namespace --namespace budibase budibase . -f values.yaml | services.automationWorkers.autoscaling.minReplicas | int | `1` | | | services.automationWorkers.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for the automation worker service. Note that for autoscaling to work, you will need to have metrics-server configured, and resources set for the automation worker pods. | | services.automationWorkers.enabled | bool | `true` | Whether or not to enable the automation worker service. If you disable this, automations will be processed by the apps service. | +| services.automationWorkers.extraContainers | list | `[]` | Additional containers to be added to the automationWorkers pod. | +| services.automationWorkers.extraEnv | list | `[]` | Extra environment variables to set for automation worker pods. Takes a list of name=value pairs. | | services.automationWorkers.livenessProbe | object | HTTP health checks. | Liveness probe configuration for automation worker pods. You shouldn't need to change this, but if you want to you can find more information here: | | services.automationWorkers.logLevel | string | `"info"` | The log level for the automation worker service. | | services.automationWorkers.readinessProbe | object | HTTP health checks. | Readiness probe configuration for automation worker pods. You shouldn't need to change this, but if you want to you can find more information here: | @@ -180,6 +184,7 @@ $ helm install --create-namespace --namespace budibase budibase . -f values.yaml | services.objectStore.cloudfront.cdn | string | `""` | Set the url of a distribution to enable cloudfront. | | services.objectStore.cloudfront.privateKey64 | string | `""` | Base64 encoded private key for the above public key. | | services.objectStore.cloudfront.publicKeyId | string | `""` | ID of public key stored in cloudfront. | +| services.objectStore.extraContainers | list | `[]` | Additional containers to be added to the objectStore pod. | | services.objectStore.minio | bool | `true` | Set to false if using another object store, such as S3. You will need to set `services.objectStore.url` to point to your bucket if you do this. | | services.objectStore.region | string | `""` | AWS_REGION if using S3 | | services.objectStore.resources | object | `{}` | The resources to use for Minio pods. See for more information on how to set these. | @@ -191,12 +196,14 @@ $ helm install --create-namespace --namespace budibase budibase . -f values.yaml | services.proxy.autoscaling.maxReplicas | int | `10` | | | services.proxy.autoscaling.minReplicas | int | `1` | | | services.proxy.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for the proxy service. Note that for autoscaling to work, you will need to have metrics-server configured, and resources set for the proxy pods. | +| services.proxy.extraContainers | list | `[]` | | | services.proxy.livenessProbe | object | HTTP health checks. | Liveness probe configuration for proxy pods. You shouldn't need to change this, but if you want to you can find more information here: | | services.proxy.readinessProbe | object | HTTP health checks. | Readiness probe configuration for proxy pods. You shouldn't need to change this, but if you want to you can find more information here: | | services.proxy.replicaCount | int | `1` | The number of proxy replicas to run. | | services.proxy.resources | object | `{}` | The resources to use for proxy pods. See for more information on how to set these. | | services.proxy.startupProbe | object | HTTP health checks. | Startup probe configuration for proxy pods. You shouldn't need to change this, but if you want to you can find more information here: | | services.redis.enabled | bool | `true` | Whether or not to deploy a Redis pod into your cluster. | +| services.redis.extraContainers | list | `[]` | Additional containers to be added to the redis pod. | | services.redis.password | string | `"budibase"` | The password to use when connecting to Redis. It's recommended that you change this from the default if you're running Redis in-cluster. | | services.redis.port | int | `6379` | Port to expose Redis on. | | services.redis.resources | object | `{}` | The resources to use for Redis pods. See for more information on how to set these. | @@ -207,6 +214,8 @@ $ helm install --create-namespace --namespace budibase budibase . -f values.yaml | services.worker.autoscaling.maxReplicas | int | `10` | | | services.worker.autoscaling.minReplicas | int | `1` | | | services.worker.autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for the worker service. Note that for autoscaling to work, you will need to have metrics-server configured, and resources set for the worker pods. | +| services.worker.extraContainers | list | `[]` | Additional containers to be added to the worker pod. | +| services.worker.extraEnv | list | `[]` | Extra environment variables to set for worker pods. Takes a list of name=value pairs. | | services.worker.httpLogging | int | `1` | Whether or not to log HTTP requests to the worker service. | | services.worker.livenessProbe | object | HTTP health checks. | Liveness probe configuration for worker pods. You shouldn't need to change this, but if you want to you can find more information here: | | services.worker.logLevel | string | `"info"` | The log level for the worker service. | @@ -225,4 +234,4 @@ $ helm uninstall --namespace budibase budibase ``` ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)