@flowfuse/driver-kubernetes 2.13.0 → 2.13.1-2ddcb3e-202501261508.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 +3 -1
- package/package.json +1 -1
- package/templates.js +8 -0
package/README.md
CHANGED
|
@@ -30,6 +30,10 @@ driver:
|
|
|
30
30
|
enabled: true
|
|
31
31
|
storageClass: nfs-storage
|
|
32
32
|
size: 5Gi
|
|
33
|
+
podSecurityContext:
|
|
34
|
+
runAsUser: 1000
|
|
35
|
+
runAsGroup: 1000
|
|
36
|
+
fsGroup: 1000
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
- `registry` is the Docker Registry to load Stack Containers from
|
|
@@ -52,6 +56,7 @@ AWS EKS specific annotation for ALB Ingress. or `openshift` to allow running on
|
|
|
52
56
|
- `storage.storageClass` Name of StorageClass to use to allocate the volume (default not set)
|
|
53
57
|
- `storage.storageClassEFSTag` Used instead of `storage.storageClass` when needing to shard across multiple EFS file systems (default not set)
|
|
54
58
|
- `storage.size` Size of the volume to request (default not set)
|
|
59
|
+
- `podSecurityContext` Settings linked to the [security context of the pod](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
|
|
55
60
|
|
|
56
61
|
Expects to pick up K8s credentials from the environment
|
|
57
62
|
|
package/kubernetes.js
CHANGED
|
@@ -181,7 +181,9 @@ const createDeployment = async (project, options) => {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
if (this._app.
|
|
184
|
+
if (this._app.config.driver.options?.podSecurityContext) {
|
|
185
|
+
localPod.spec.securityContext = this._app.config.driver.options.podSecurityContext
|
|
186
|
+
} else if (this._app.license.active() && this._cloudProvider === 'openshift') {
|
|
185
187
|
localPod.spec.securityContext = {}
|
|
186
188
|
}
|
|
187
189
|
|
package/package.json
CHANGED
package/templates.js
CHANGED
|
@@ -30,6 +30,14 @@ const deploymentTemplate = {
|
|
|
30
30
|
runAsGroup: 1000,
|
|
31
31
|
fsGroup: 1000
|
|
32
32
|
},
|
|
33
|
+
initContainers: [
|
|
34
|
+
{
|
|
35
|
+
name: 'npm-install',
|
|
36
|
+
image: 'node:alpine',
|
|
37
|
+
command: [ 'sh', '-c', 'npm install --prefix /data' ],
|
|
38
|
+
resources: {}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
33
41
|
containers: [
|
|
34
42
|
{
|
|
35
43
|
resources: {
|