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

Allow key-value Environment variable passthrough. #424

Merged
merged 7 commits into from
Jul 12, 2022
Merged

Conversation

jdmaguire
Copy link
Contributor

@jdmaguire jdmaguire commented Jul 10, 2022

Motivation

.spec.secretsMap exists to pass some configuration to the sinks/sources/functions. Using this for plain, simple configuration is ambiguous/unintuitive and is more complicated since it requires multiple K8s resources (i.e. the Function CR and a k8s Secret).

I'm not deeply familiar with this project. Feel free to suggest alternatives or dismiss it as you see fit.

Modifications

Introduces .spec.env that gets combined with .spec.secretsMap to form the environment variables for the statefulset/pods deployed by this.

Verifying this change

I verified this change by manually creating the CRs, kubectl exec'ing in and verifying that things work w/o .spec.env as before and with .spec.env. I should add more tests but I wasn't familiar with this codebase so I wanted to write the code and get the PR up first.

Documentation

Check the box below.

Need to update docs?

  • [] doc-required

  • no-need-doc

  • doc

@jdmaguire jdmaguire requested review from nlu90, freeznet and a team as code owners July 10, 2022 22:12
@github-actions github-actions bot added the doc-required This pr needs a document label Jul 10, 2022
Copy link
Contributor

@tpiperatgod tpiperatgod left a comment

Choose a reason for hiding this comment

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

lgtm

@freeznet freeznet added type/feature Indicates new functionality m/2022-07 labels Jul 11, 2022
@freeznet freeznet added this to the 2022-07 v0.4.0 milestone Jul 11, 2022
Copy link
Member

@freeznet freeznet left a comment

Choose a reason for hiding this comment

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

@jdmaguire thanks for the PR, please check my comments, thanks.

api/v1alpha1/function_types.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added doc This pr contains a document and removed doc-required This pr needs a document labels Jul 11, 2022
@freeznet freeznet merged commit 0fd6618 into master Jul 12, 2022
@freeznet freeznet deleted the env-variables branch July 12, 2022 03:23
@jdmaguire jdmaguire changed the title Allow key-value Environment variable passthrouugh. Allow key-value Environment variable passthrough. Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc This pr contains a document doc-added m/2022-07 type/feature Indicates new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants