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: support environment in ExtensionServiceConfig #8273

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

frezbo
Copy link
Member

@frezbo frezbo commented Feb 6, 2024

Support setting extension services environment variables in ExtensionServiceConfig document.

Fixes: #8271

@frezbo frezbo force-pushed the feat/ext-config-env-support branch from 5b1bbec to 34e4f2f Compare February 7, 2024 16:44
@frezbo frezbo marked this pull request as ready for review February 7, 2024 16:44
@frezbo frezbo force-pushed the feat/ext-config-env-support branch 4 times, most recently from e71db82 to 78b4138 Compare February 8, 2024 04:32
@frezbo
Copy link
Member Author

frezbo commented Feb 8, 2024

/promote integration-extensions

hack/release.toml Outdated Show resolved Hide resolved
@frezbo frezbo force-pushed the feat/ext-config-env-support branch 6 times, most recently from f0a933c to b8e2c18 Compare February 14, 2024 17:52
@frezbo frezbo changed the title feat: support environment in ExtensionServicesConfig feat: support environment in ExtensionServiceConfig Feb 14, 2024
@frezbo
Copy link
Member Author

frezbo commented Feb 14, 2024

/promote integration-extensions

// ConfigFiles implements config.ExtensionServiceConfig interface.
func (e *ServiceConfigV1Alpha1) ConfigFiles() []config.ExtensionServiceConfigFile {
return xslices.Map(e.ServiceConfigFiles, func(c ConfigFile) config.ExtensionServiceConfigFile {
return &ConfigFile{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a nit, but looks like we could either do return &c here, or we could define methods Content() and MountPath() on non-pointer ConfigFile so we can avoid this copying

we still need .Map() to convert to the interface type though

Support setting extension services environment variables in
`ExtensionServiceConfig` document.

Refactor `ExtensionServicesConfig` -> `ExtensionServiceConfig` and move extensions config under `runtime` pkg.

Fixes: siderolabs#8271

Signed-off-by: Noel Georgi <[email protected]>
frezbo added a commit to frezbo/extensions that referenced this pull request Feb 15, 2024
Use `ExtensionServiceConfig` document for extensions using
`.machine.files` or `environmentFile`.

Ref: siderolabs/talos#8273

Signed-off-by: Noel Georgi <[email protected]>
@frezbo
Copy link
Member Author

frezbo commented Feb 15, 2024

/m

@talos-bot talos-bot merged commit 15e8bca into siderolabs:main Feb 15, 2024
18 checks passed
@frezbo frezbo deleted the feat/ext-config-env-support branch February 15, 2024 15:11
frezbo added a commit to frezbo/extensions that referenced this pull request Feb 15, 2024
Use `ExtensionServiceConfig` document for extensions using
`.machine.files` or `environmentFile`.

Ref: siderolabs/talos#8273

Signed-off-by: Noel Georgi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support extra env vars as part of ExtensionServicesConfig
4 participants