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

[Elasticsearch] Fix the missing configuration environment variables propagation #1013

Merged

Conversation

aleksmaus
Copy link
Contributor

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area outputs

What this PR does / why we need it:

This PR fixes missing, some old and some recently introduced, environment variables propagation into Falco Sidekick configuration.

Before this change, not all the configuration options that were provided via the environment variables were propagated into Falco Sidekick configuration.

For example something like this:

docker run -it -p 2801:2801   -e ELASTICSEARCH_HOSTPORT=https://xxxxxxxxxxxxxxx.es.io   -e ELASTICSEARCH_INDEX=logs-falco.alerts-all   -e ELASTICSEARCH_SUFFIX=none   -e ELASTICSEARCH_CUSTOMHEADERS='{"Authorization":"APIKey xxxxxxxxxyckxLOFV2LVVsZw=="}' falcosecurity/falcosidekick

fails to set the custom headers.

@poiana poiana added kind/bug Something isn't working dco-signoff: yes labels Oct 3, 2024
@poiana poiana requested a review from fjogeleit October 3, 2024 15:56
@poiana poiana requested a review from leogr October 3, 2024 15:56
@poiana poiana added the size/M label Oct 3, 2024
@Issif Issif modified the milestones: 2., 2.30 Oct 4, 2024
| `elasticsearch.flattenfields` | `ELASTICSEARCH_FLATTENFIELDS` | `false` | Replace . by _ to avoid mapping conflicts, force to true if `createindextemplate=true` |
| `elasticsearch.createindextemplate` | `ELASTICSEARCH_CREATEINDEXTEMPLATE` | `false` | Create an index template |
| `elasticsearch.numberofshards` | `ELASTICSEARCH_NUMBEROFSHARDS` | `3` | Number of shards set by the index template |
| `elasticsearch.numberofreplicas` | `ELASTICSEARCH_REPLICAS` | `3` | Number of replicas set by the index template |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| `elasticsearch.numberofreplicas` | `ELASTICSEARCH_REPLICAS` | `3` | Number of replicas set by the index template |
| `elasticsearch.numberofreplicas` | `ELASTICSEARCH_NUMEROFREPLICAS` | `3` | Number of replicas set by the index template |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

still a typo :-) corrected.

Signed-off-by: Aleksandr Maus <[email protected]>
@aleksmaus aleksmaus force-pushed the fix/elasticseach_env_configuration branch from 6722cdd to 58ea997 Compare October 4, 2024 19:03
@aleksmaus aleksmaus requested a review from Issif October 4, 2024 19:04
@poiana poiana added the lgtm label Oct 4, 2024
@poiana
Copy link

poiana commented Oct 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aleksmaus, Issif

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
Copy link

poiana commented Oct 4, 2024

LGTM label has been added.

Git tree hash: 3801ec9f44e5d4d0fe5593e39928a481874cca98

@poiana poiana added the approved label Oct 4, 2024
@poiana poiana merged commit aaad6b3 into falcosecurity:master Oct 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants