Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add event to modify a service configuration before creation #1129

Merged
merged 1 commit into from
Feb 19, 2023

Conversation

derklaro
Copy link
Member

Motivation

There is currently no event that allows to modify a service configuration on the node (via a module) to change the configuration when required. This can for example be setting process parameters or environment variables.

Modification

Add an event (CloudServiceConfigurationPrePrepareEvent) that holds the service configuration and the builder that is used to modify the service configuration in the cloud service factory. The event is called before the final modifications to the configuration are made (ensuring that the service id is only taken once, adding the templates, deployments, ... of the group components etc.). This ensures that no changes are made to the configuration which could potentially break the whole internal service handling.

Result

The configuration of a service can be modified from a (head) node module.

Other context

Resolves #1074

@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release in: node An issue/pull request releated to the node module code t: improvement The pull request improves existing code labels Feb 19, 2023
@derklaro derklaro added this to the 4.0.0-RC8 milestone Feb 19, 2023
@derklaro derklaro self-assigned this Feb 19, 2023
@0utplay 0utplay merged commit cd38c48 into nightly Feb 19, 2023
@0utplay 0utplay deleted the service-configuration-modify-event branch February 19, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: node An issue/pull request releated to the node module code t: improvement The pull request improves existing code v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CloudServiceNodeSelectEvent - Allow modification of the serviceConfiguration
2 participants