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

Add support for Secret or ConfigMap based environment variables in ContainerTemplate #10623

Merged

Conversation

scholzj
Copy link
Member

@scholzj scholzj commented Sep 22, 2024

Type of change

  • Enhancement / new feature

Description

This PR implements the Strimzi Proposal #85 and adds the possibily to configure Secret or ConfigMap based environment variables in any container through the container template section.

It also deprecates the rest of the externalConfiguration section in Connect and MM2 that allowed the same, but only in the Connect and MM2 resources.

Checklist

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Update CHANGELOG.md

@scholzj scholzj added this to the 0.44.0 milestone Sep 22, 2024
@scholzj scholzj changed the title Add support for Secret or ConfigMap based environment variables in CotnainerTemplate Add support for Secret or ConfigMap based environment variables in ContainerTemplate Sep 22, 2024
@scholzj
Copy link
Member Author

scholzj commented Sep 22, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@ppatierno ppatierno left a comment

Choose a reason for hiding this comment

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

LGTM.

@scholzj scholzj force-pushed the support-for-secret-and-cm-based-env-vars branch from c5cbfb2 to df74a2d Compare September 23, 2024 09:17
Copy link
Contributor

@PaulRMellor PaulRMellor left a comment

Choose a reason for hiding this comment

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

Looks good. Few minor suggestions.
Assumed that we weren't including config in the MM2 example intentionally

Signed-off-by: Jakub Scholz <[email protected]>
@scholzj scholzj merged commit da54e33 into strimzi:main Sep 23, 2024
13 checks passed
@scholzj scholzj deleted the support-for-secret-and-cm-based-env-vars branch September 23, 2024 15:42
Copy link
Contributor

@katheris katheris left a comment

Choose a reason for hiding this comment

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

Wording nit, but otherwise LGTM

@@ -49,6 +52,15 @@ public void setValue(String value) {
this.value = value;
}

@Description("Reference to secret or config map property to which will be the environment variable is set.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I see Paul reviewed this before, but it still isn't quite what he proposed and didn't make sense to me, so re-proposing what he suggested.

Suggested change
@Description("Reference to secret or config map property to which will be the environment variable is set.")
@Description("Reference to the secret or config map property to which the environment variable is set.")

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in #10628

@katheris
Copy link
Contributor

@scholzj I was too slow with my review!

@scholzj
Copy link
Member Author

scholzj commented Sep 23, 2024

@katheris I will open a separate Pr to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 0.44.0
Development

Successfully merging this pull request may close these issues.

4 participants