Support overriding instance serviceAccount during creation
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 146
Description
### Description
Whether creating instance via UI or by API, there's no way to control certain instance configurations. for example the API call:
[https://app.flowforge.com/api/static/index.html#/Instances/post_api_v1_projects_](url)
```
{
"name": "string",
"applicationId": "string",
"projectType": "string",
"stack": "string",
"flowBlueprintId": "string",
"template": "string",
"sourceProject": {
"id": "string",
"options": {}
}
}
```
One of those configurations is the instance `serviceAccount` definition, which today is a fixed parameter:
[https://github.com/FlowFuse/driver-k8s/blob/main/kubernetes.js#L236C5-L236C70](url):
`localPod.spec.serviceAccount = process.env.EDITOR_SERVICE_ACCOUNT`
This is an issue since using the same `serviceAccount` for all of instances means sharing same permissions for different use cases, without the option to separate it.
In addition, the `serviceAccount` is usually integrated with the cloud-provider IAM identity for cloud-related permissions.
This missing configuration creates security and operational risks that can be easily avoided by suppling an option to override this environment variable (or any other environment variable supplied when creating an instance) and will allow a better control.
### Which customers would this be available to
Everyone - CE/Starter/Team/Enterprise
### Have you provided an initial effort estimate for this issue?
I am not a FlowFuse team member
Contributor guide
Assessment
This issue has not been assessed yet.