Skip to content

Add ConfigMap support as FileSource for write_files configuration #565

@banschikovde

Description

@banschikovde

Describe the solution you'd like:

Add support for ConfigMaps as a FileSource in write_files configuration for cloud-init. Similar to the existing SecretFileSource functionality, we need the ability to reference ConfigMap data when generating files during initialization. This will allow getting file content from either Secrets or ConfigMaps depending on the use case.

Why do you want this feature:

Currently file content can only be sourced from Secrets, which is limiting for non-sensitive configuration data
ConfigMaps are the standard Kubernetes way to handle non-sensitive configuration
This will provide more flexibility in managing configuration data
Users can better separate sensitive data (in Secrets) from regular configuration (in ConfigMaps)

Anything else you would like to add:

The implementation should maintain backwards compatibility with existing SecretFileSource
Only one source type (Secret or ConfigMap) should be allowed at a time for a given file
This enhancement follows the standard Kubernetes pattern of using ConfigMaps for configuration data
Documentation will need to be updated to reflect the new ConfigMap support

Metadata

Metadata

Assignees

Labels

kind/enhancementNew feature or requestkind/good first issueGood for newcomerspriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Projects

Status

PR to be reviewed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions