diff --git a/helm/flowforge/README.md b/helm/flowforge/README.md index 95340be9..871c68a8 100644 --- a/helm/flowforge/README.md +++ b/helm/flowforge/README.md @@ -43,6 +43,7 @@ If using an external PostgreSQL Database you will need to create the database an - `forge.branding` Object holding branding inserts (default not set) - `forge.projectDeploymentTolerations` tolerations settings for Project instances. Default is `[]`. - `forge.clusterRole.name` custom name for the ClusterRole (default `create-pod`) + - `forge.resources` allows to configure [resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for the core application container note: `forge.projectSelector` and `forge.managementSelector` defaults mean that you must have at least 2 nodes in your cluster and they need to be labeled before installing. @@ -75,6 +76,7 @@ To use STMP to send email - `forge.broker.url` URL to access the broker from inside the cluster (default `mqtt://flowforge-broker.[namespace]:1883`) - `forge.broker.public_url` URL to access the broker from outside the cluster (default `ws://mqtt.[forge.domain]`, uses `wss://` if `forge.https` is `true`) - `forge.broker.affinity` allows to configure [affinity or anti-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) for the broker pod + - `forge.broker.resources` allows to configure [resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for the broker container ### Telemetry @@ -122,6 +124,7 @@ Enables FlowForge Telemetry - `forge.fileStore.context.type` Choice of backends for Persistent Context `sequelize` - `forge.fileStore.context.options` Options to pass to Persistent Context Driver (See [file-server](https://github.com/flowforge/flowforge-file-server) for details) - `forge.fileStore.context.quota` Sets the maximum number of bytes that a project can store in Persistent Context (default `1048576`) +- `forge.fileStore.resources` allows to configure [resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for the file-server container ### Private Certificate Authority diff --git a/helm/flowforge/templates/broker.yaml b/helm/flowforge/templates/broker.yaml index 349889aa..3591be45 100644 --- a/helm/flowforge/templates/broker.yaml +++ b/helm/flowforge/templates/broker.yaml @@ -88,6 +88,9 @@ spec: # httpGet: # path: /ping.html # port: 1884 + {{- if .Values.forge.broker.resources }} + resources: {{- toYaml .Values.forge.broker.resources | nindent 12 }} + {{- end }} {{- if .Values.forge.registrySecrets }} imagePullSecrets: {{- range .Values.forge.registrySecrets }} diff --git a/helm/flowforge/templates/deployment.yaml b/helm/flowforge/templates/deployment.yaml index 6da28bd3..deecfa71 100644 --- a/helm/flowforge/templates/deployment.yaml +++ b/helm/flowforge/templates/deployment.yaml @@ -77,6 +77,9 @@ spec: securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true + {{- if .Values.forge.resources }} + resources: {{- toYaml .Values.forge.resources | nindent 12 }} + {{- end }} {{- if .Values.forge.registrySecrets }} imagePullSecrets: {{- range .Values.forge.registrySecrets }} diff --git a/helm/flowforge/templates/file-storage.yml b/helm/flowforge/templates/file-storage.yml index da233a7a..2445921b 100644 --- a/helm/flowforge/templates/file-storage.yml +++ b/helm/flowforge/templates/file-storage.yml @@ -83,6 +83,9 @@ spec: securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true + {{- if .Values.forge.fileStore.resources }} + resources: {{- toYaml .Values.forge.fileStore.resources | nindent 12 }} + {{- end }} {{- if .Values.forge.registrySecrets }} imagePullSecrets: {{- range .Values.forge.registrySecrets }} diff --git a/helm/flowforge/values.schema.json b/helm/flowforge/values.schema.json index acf57f19..71618642 100644 --- a/helm/flowforge/values.schema.json +++ b/helm/flowforge/values.schema.json @@ -218,6 +218,33 @@ }, "affinity": { "type": "object" + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": ["number","string"] + }, + "memory": { + "type": ["number","string"] + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": ["number","string"] + }, + "memory": { + "type": ["number","string"] + } + } + } + } } }, "required": [ @@ -293,6 +320,33 @@ }, "options": { "type": "object" + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": ["number","string"] + }, + "memory": { + "type": ["number","string"] + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": ["number","string"] + }, + "memory": { + "type": ["number","string"] + } + } + } + } } }, "required": [ @@ -383,7 +437,35 @@ "description": "Name of cluster role" } } + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": ["number","string"] + }, + "memory": { + "type": ["number","string"] + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": ["number","string"] + }, + "memory": { + "type": ["number","string"] + } + } + } + } } + }, "required": [ "domain",