feat(env): Introduce raw ENV secret templating and remove env_blob input#14
Merged
Conversation
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.
This pull request introduces a major overhaul to how environment files are managed and generated in MetalDeploy, focusing on enhanced flexibility, security, and maintainability. The most significant change is the removal of the
env_blobinput in favor of a more powerfulENVsecret, which now acts as a raw template for environment files, preserving formatting and comments while allowing for intelligent merging of variables. Additionally, the security of generated files has been improved, and documentation has been updated to reflect these changes.Environment Variable Handling and Templating:
ENVsecret to serve as a base template for generated.envfiles. This preserves comments, blank lines, and formatting, and supports seamless merging of new or overridden variables. [1] [2]parse_all_in_one_secretfunction for better parsing control.Security Improvements:
0o600permissions (read/write for owner only), improving the protection of secrets. [1] [2] [3]Removal of Deprecated Functionality:
env_blobinput and its related documentation and logic have been removed fromaction.ymlandREADME.md, consolidating all bulk secret injection into theENVsecret. [1] [2] [3] [4] [5] [6] [7]Documentation Updates:
README.mdanddocs/env-generation.mdto explain the new environment variable management approach, the removal ofenv_blob, and the improved security model. [1] [2]Test Coverage:
env_manager.py, reflecting the refactored and expanded logic around environment file handling. [1] [2]These changes make environment management more robust, secure, and user-friendly, while simplifying configuration for end users.