-
Notifications
You must be signed in to change notification settings - Fork 14
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
chore: proposal for exposing Sidecar configuration #467
Open
sumo-drosiek
wants to merge
1
commit into
main
Choose a base branch
from
drosiek-proposal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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,70 @@ | ||
# Support for sidecar configuration | ||
|
||
## Why? | ||
|
||
For now only Sidecar image can be specified during configuration of Tailing Sidecar Operator. | ||
This comes with one, but problematic requirement. In order to use custom Sidecar provider or custom configuration, | ||
custom image has to be built and provided. | ||
|
||
Example issues which could be resolved by exposing configuration: | ||
|
||
- [Increase buffer size for fluent bit - lines are too long, skipping file](https://github.com/SumoLogic/tailing-sidecar/issues/226) | ||
- [Allow tailing directory instead of specific file](https://github.com/SumoLogic/tailing-sidecar/issues/276) | ||
|
||
## Implementation | ||
|
||
### Configuration options | ||
|
||
In order to resolve this issue and following the planned architecture ([Expose fluent-bit configurations](https://github.com/SumoLogic/tailing-sidecar/issues/30)) | ||
We would like to expose the following properties of Sidecar containers: | ||
|
||
- `image` - this is already exposed | ||
- `commands` - this is necessary if someone would like to modify arguments of the Sidecar provider | ||
- `configuration` - we would like to expose configuration as Config Map name, so everyone could override it | ||
|
||
There is one technical issue. We cannot mount configMap from different namespace than the application we are going to get logs from. | ||
Possible solution is to allow Operator to create configmaps in other namespaces than it is installed. | ||
It would require customer to create one configmap in Operator Namespace and Operator would take care of rest. | ||
|
||
This should consists of the following suboptions: | ||
|
||
- `configMapName` - name of Config Map where the configuration is | ||
- `mountPath` - path to the directory where the configuration should be mounted | ||
|
||
We may consider different options of providing configuration (Volumes, Secrets) | ||
|
||
- `resources` - every Sidecar provider can require different resources to work correctly | ||
|
||
### Providing Configuation | ||
|
||
In order to provide default override values for operator I propose to add to Operator support for configuartion file. | ||
In helm Chart it would be manged by configMap, and it would make it easier to handle complex configuartion structures | ||
like `commands` and `resoures`. | ||
|
||
### Extending TalingSidecarConfig Custom Resource Definition | ||
|
||
I believe it should be possible to specify conifiguration per TailingSidecarConfig, but I would leave it for future. | ||
|
||
### Steps | ||
|
||
The following steps are required to implement this functionality: | ||
|
||
- [ ] Support configuration via config file | ||
|
||
- [ ] in Operator | ||
- [ ] in helm chart | ||
|
||
- [ ] Add support for `configuration` | ||
|
||
- [ ] in Operator | ||
- [ ] in helm chart | ||
|
||
- [ ] Add support for `commands` | ||
|
||
- [ ] in Operator | ||
- [ ] in helm chart | ||
|
||
- [ ] Add support for `resources` | ||
|
||
- [ ] in Operator | ||
- [ ] in helm chart |
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.
Example TailingSidecarConfig with options to configure sidecar, example structure with
sidecar
key added: