-
Notifications
You must be signed in to change notification settings - Fork 486
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
Enabling collector to mount multiple configMaps #1989
Merged
jaronoff97
merged 19 commits into
open-telemetry:main
from
yuriolisa:add-more-configmaps
Sep 18, 2023
Merged
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1ce87b4
Enabling collector to mount multiple configMaps
yuriolisa 427cb4d
Fixed lints
yuriolisa dcc8381
Fixed new copies
yuriolisa cfd5443
Fixed new copies
yuriolisa 9df734f
Removed unnecessary kustomization
yuriolisa 170bae0
Removed unnecessary kustomization
yuriolisa 7a30abc
Implemented path on ConfigMapsSpec
yuriolisa c684a24
Implemented path on ConfigMapsSpec
yuriolisa cd09d71
Up2date by last release
yuriolisa 081fe44
Removed the name's append on VolumeMount
yuriolisa afbb40b
Merge branch 'main' into add-more-configmaps
yuriolisa ad40da0
Fix format
yuriolisa 5310ef8
Fix bundle
yuriolisa 5e9e33e
Added e2e tests
yuriolisa 0075b13
Added e2e tests
yuriolisa 652c069
Merge branch 'main' into add-more-configmaps
yuriolisa d323f27
Fixed comments regarding validations
yuriolisa 23c6569
Fixed comments regarding validations
yuriolisa 16140a5
Resolved conflicts
yuriolisa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: 'enhancement' | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) | ||
component: operator | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Allow the collector CRD to specify a list of configmaps to mount | ||
|
||
# One or more tracking issues related to the change | ||
issues: [1819] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just decide where to mount these in the collector binary rather than leaving that up to users. Prometheus says they mount at
/etc/prometheus/configmaps/<configmap-name>
IMO we should do something similar.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Prometheus sets a precedence for not letting this be configurable then I am ok following that. The most robust solution though would be to allow it to be configurable and fallback to a default value if no path is provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the prometheus-operator solution. I'd argue it makes things more complex for both the user and the operator code. The user, because they need to both read the documentation and then ensure they're setting the value correctly wherever they need the file name. And for the operator, because it now has to take care of generating the mount path, and the how the path is generated is now part of our public API.
As opposed to the user just setting whatever they want and the operator applying it without any additional checks. Arguably this can lead to footguns where the mount overrides something important, but I think it's the user's responsibility to make sure this doesn't happen - and this may even be a feature in some circumstances.
All that said, if we're following prometheus-operator conventions everywhere else, we should probably do it here as well for consistency if nothing else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this argument :) I think making it configurable with a default if not set seems like a good middle ground here. Does that work for you @swiatekm-sumo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making it configurable with a default comes with the worst of both worlds for us, but the best for the users, so I'm fine with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the suggestion to make the configMaps' mountPaths configurable is the solution we found better for the users. So, I have changed the PR accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user doesn't configure the mountPath or name what happens? Do we need a validating case for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, I would say both are required to mount extra configMaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they are required we should validate that requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TylerHelmuth, I have changed the requirements and added some validations to the configmaps's definition.
When you get a chance could you please have a look?