@flowfuse/driver-kubernetes 2.22.2-c4cd2cc-202510160855.0 → 2.22.2-d74c830-202510171251.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/kubernetes.js +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,6 +44,10 @@ driver:
|
|
|
44
44
|
- `projectSelector` a list of labels that should be used to select which nodes Project Pods
|
|
45
45
|
should run on
|
|
46
46
|
- `projectLabels` a list of custom labels that should be applied to all resources created for Projects (Pods, Services, Ingresses, PVCs)
|
|
47
|
+
- `projectProbes` optional configuration for liveness, readiness and startup probes for project containers
|
|
48
|
+
- `projectProbes.livenessProbe` custom liveness probe configuration (default not set)
|
|
49
|
+
- `projectProbes.readinessProbe` custom readiness probe configuration (default not set)
|
|
50
|
+
- `projectProbes.startupProbe` custom startup probe configuration (default not set)
|
|
47
51
|
- `cloudProvider` normally not set, but can be `aws` This triggers the adding of
|
|
48
52
|
AWS EKS specific annotation for ALB Ingress. or `openshift` to allow running on OpenShift (Enterprise license only)
|
|
49
53
|
- `privateCA` name of ConfigMap holding PEM CA Cert Bundle (file name `certs.pem`) Optional
|
|
@@ -61,6 +65,7 @@ AWS EKS specific annotation for ALB Ingress. or `openshift` to allow running on
|
|
|
61
65
|
- `storage.storageClassEFSTag` Used instead of `storage.storageClass` when needing to shard across multiple EFS file systems (default not set)
|
|
62
66
|
- `storage.size` Size of the volume to request (default not set)
|
|
63
67
|
- `podSecurityContext` Settings linked to the [security context of the pod](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
|
|
68
|
+
- `containerSecurityContext` Settings linked to the [security context of the container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
|
|
64
69
|
- `service.type` Type of service to create for the editor (allowed `ClusterIP` or `NodePort`, default `ClusterIP`)
|
|
65
70
|
|
|
66
71
|
Expects to pick up K8s credentials from the environment
|
package/kubernetes.js
CHANGED
|
@@ -194,6 +194,14 @@ const createDeployment = async (project, options) => {
|
|
|
194
194
|
this._app.log.info('[k8s] OpenShift, removing PodSecurityContext')
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
if (this._app.config.driver.options?.containerSecurityContext) {
|
|
198
|
+
localPod.spec.containers[0].securityContext = this._app.config.driver.options.containerSecurityContext
|
|
199
|
+
this._app.log.info(`[k8s] Using custom ContainerSecurityContext ${JSON.stringify(this._app.config.driver.options.containerSecurityContext)}`)
|
|
200
|
+
} else if (this._app.license.active() && this._cloudProvider === 'openshift') {
|
|
201
|
+
localPod.spec.containers[0].securityContext = {}
|
|
202
|
+
this._app.log.info('[k8s] OpenShift, removing ContainerSecurityContext')
|
|
203
|
+
}
|
|
204
|
+
|
|
197
205
|
if (stack.memory && stack.cpu) {
|
|
198
206
|
localPod.spec.containers[0].resources.requests.memory = `${stack.memory}Mi`
|
|
199
207
|
// increase limit to give npm more room to run in
|
|
@@ -213,6 +221,16 @@ const createDeployment = async (project, options) => {
|
|
|
213
221
|
}
|
|
214
222
|
}
|
|
215
223
|
|
|
224
|
+
if (this._app.config.driver.options?.projectProbes?.livenessProbe) {
|
|
225
|
+
localPod.spec.containers[0].livenessProbe = this._app.config.driver.options.projectProbes.livenessProbe
|
|
226
|
+
}
|
|
227
|
+
if (this._app.config.driver.options?.projectProbes?.readinessProbe) {
|
|
228
|
+
localPod.spec.containers[0].readinessProbe = this._app.config.driver.options.projectProbes.readinessProbe
|
|
229
|
+
}
|
|
230
|
+
if (this._app.config.driver.options?.projectProbes?.startupProbe) {
|
|
231
|
+
localPod.spec.containers[0].startupProbe = this._app.config.driver.options.projectProbes.startupProbe
|
|
232
|
+
}
|
|
233
|
+
|
|
216
234
|
const ha = await project.getSetting('ha')
|
|
217
235
|
if (ha?.replicas > 1) {
|
|
218
236
|
localDeployment.spec.replicas = ha.replicas
|