Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Support for ConfigMap volumes#1114

Merged
RayRoestenburg merged 3 commits into
lightbend:mainfrom
leozilla:configmap-volumes
Dec 14, 2021
Merged

Support for ConfigMap volumes#1114
RayRoestenburg merged 3 commits into
lightbend:mainfrom
leozilla:configmap-volumes

Conversation

@leozilla

@leozilla leozilla commented Nov 6, 2021

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Adds support for using k8s ConfigMap for k8s Volumes. Atm only Secret and Pvc are possible.

Why are the changes needed?

See: zulip thread: Why is logging conf stored in a secret instead of ConfigMap

Does this PR introduce any user-facing change?

Yes, it adds a new config feature.

How was this patch tested?

Only tested via unit tests.

Documentation

I did not adjust the documentation yet cos I first want to get some feedback on the PR if this feature makes sense in the way I am proposing it.

Open questions

  1. I did not test the writing of the CloudflowConfig yet and I am pretty sure this will not work at the moment cos exportWriter most likey does not treat the ConfigMapVolumeKeyToPath correctly. I did only see very few tests for writing the CloudflowConfig, thats why I am wondering if its even necessary?

@RayRoestenburg

Copy link
Copy Markdown
Contributor

Thanks for the PR @leozilla , looks like it is going into the right direction! Please see the other export writers, and yes, likely you need to do something extra. It would be great if you could add a test for writing out a config which has config map volumes as well.

@leozilla leozilla marked this pull request as ready for review November 14, 2021 17:58
configMap.getString("name") shouldBe name
configMap.getBoolean("optional") shouldBe optional

if (items.nonEmpty) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This assertion is a bit ugly, I have not found a nicer way to write it.

@RayRoestenburg RayRoestenburg merged commit a870266 into lightbend:main Dec 14, 2021
@RayRoestenburg

Copy link
Copy Markdown
Contributor

Thanks @leozilla!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants