Refactor profiles to decouple them from stack resources#1140
Merged
jsoriano merged 10 commits intoelastic:mainfrom Apr 4, 2023
Merged
Refactor profiles to decouple them from stack resources#1140jsoriano merged 10 commits intoelastic:mainfrom
jsoriano merged 10 commits intoelastic:mainfrom
Conversation
* New `elastic-package profile use` command to select profile to use. * Configuration files are not rewritten on upgrade. * Stack and test runner files are managed by their own providers. * Stack and test runner files are only written when the services are started, and only if they are different. * Stack files are templates now. Same files are used for multiple versions. Runtime configuration can be passed now as data to templates instead of requiring environment variables. * Support for multiple stack providers.
Collaborator
Collaborator
🌐 Coverage report
|
mrodm
reviewed
Feb 13, 2023
Contributor
mrodm
left a comment
There was a problem hiding this comment.
Great refactor! go-resource lib is quite helpful for this use case 👍
Comment on lines
+31
to
+39
| {{ if not (semverLessThan $version "8.7.0") }} | ||
| xpack.fleet.enableExperimental: ["experimentalDataStreamSettings"] # Enable experimental toggles in Fleet UI | ||
| {{ end }} | ||
|
|
||
| xpack.encryptedSavedObjects.encryptionKey: "12345678901234567890123456789012" | ||
|
|
||
| {{ if not (semverLessThan $version "8.1.0") }} | ||
| xpack.cloudSecurityPosture.enabled: true | ||
| {{ end }} |
Contributor
There was a problem hiding this comment.
Nice! Having these templates is going to be easier to add new features depending on the version, thanks!!
Member
Author
|
Testing with integrations in elastic/integrations#5252. |
Member
Author
|
/test |
mrodm
approved these changes
Mar 23, 2023
Contributor
mrodm
left a comment
There was a problem hiding this comment.
LGTM!
Conflicts will be high likely because of updating of the package-registry version used by default in Elastic stack to v1.19.0.
Collaborator
💚 Build Succeeded
cc @jsoriano |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce several refactors to decouple profiles from stack resources, with the target of allowing the implementation of multiple stack providers and to try to establish better foundations for isolated and persistent profiles.
Note to reviewers: Sorry for the big change, but once files are moved and templatized it is difficult to keep this small. Let me know if you want a walk-through over zoom.
Changes here:
elastic-package profile usecommand to select profile to use.Related issues: