-
Notifications
You must be signed in to change notification settings - Fork 616
Add ability to add environment variables to the collector container. … #4187
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,15 @@ type InstrumentationConfigSpec struct { | |
// +listType=atomic | ||
// +optional | ||
Files []corev1.VolumeProjection `json:"files,omitempty"` | ||
|
||
// EnvironmentVariables allows the user to add environment variables to the | ||
// collector container. | ||
// --- | ||
// +kubebuilder:validation:MinItems=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this CEL rule do for an optional field? Is it, like, if you put this field in, it can't be blank? (Have you tested with clusters that have and don't have any custom env vars?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly. If it's optional you can of course omit it, but if you do include it then there must be at least one item in the array. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to add a
|
||
// +kubebuilder:validation:items:XValidation:rule=`self.name != 'K8S_POD_NAMESPACE' && self.name != 'K8S_POD_NAME' && self.name != 'PGPASSWORD'`,message="Cannot overwrite environment variables set by operator" | ||
// +listType=atomic | ||
// +optional | ||
EnvironmentVariables []corev1.EnvVar `json:"environmentVariables,omitempty"` | ||
benjaminjb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// InstrumentationLogsSpec defines the configuration for collecting logs via | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.