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

Support helm chart for Logstash Elastic Stack resource #7143

Merged
merged 18 commits into from
Oct 16, 2023

Conversation

azro352
Copy link
Contributor

@azro352 azro352 commented Aug 31, 2023

Hi

My contribution to the eck project : the logstash helm chart

Anyone feel free to review and comment, the goal is to put as examples the files of https://github.com/elastic/cloud-on-k8s/tree/main/config/recipes/logstash

In these examples there is not only a logstash, but also some elastic, beats, ... can you confirm me that I only need to put the Logstash part in the corresponding example file for the helm chart ?

Resolves #7128

Thanks

@botelastic botelastic bot added the triage label Aug 31, 2023
@azro352 azro352 force-pushed the helm-logstash-eck branch from 4e745cc to 7dc34ef Compare August 31, 2023 21:17
@thbkrkr thbkrkr added >enhancement Enhancement of existing functionality :helm-charts labels Sep 1, 2023
@botelastic botelastic bot removed the triage label Sep 1, 2023
@azro352 azro352 marked this pull request as ready for review September 1, 2023 17:51
@azro352
Copy link
Contributor Author

azro352 commented Sep 1, 2023

I've write the chart for each section of spec, I've write the values for the tests

Tell me if you want some things more :)

@azro352
Copy link
Contributor Author

azro352 commented Sep 11, 2023

Hi @thbkrkr , Do I have something to do for my PR to be reviewed ? Or just you don't have time for now ?

@thbkrkr
Copy link
Contributor

thbkrkr commented Sep 12, 2023

Sorry, it's a question of time and priority. We will review it as soon as possible.

Update eck-stack values to include logstash chart, disabled by default.
Include logstash tests.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Copy link
Contributor

@naemono naemono left a comment

Choose a reason for hiding this comment

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

Looks really good initially. Thanks much for the contribution. There are a couple of things I've initially noticed, and I've pushed a commit doing the following

  1. Adding example logstash tests (run them with make helm-test)
  2. Adding logstash to the eck-stack chart values, and Chart.yaml.

azro352 and others added 3 commits September 19, 2023 20:14
@azro352
Copy link
Contributor Author

azro352 commented Sep 19, 2023

Test passed

Ensuring dependencies are updated for eck-logstash chart.
Running 'helm lint' on eck-logstash chart.
==> Linting .

1 chart(s) linted, 0 chart(s) failed

### Chart [ eck-logstash ] .

 PASS  test logstash    templates/tests/logstash_test.yaml

Charts:      1 passed, 1 total
Test Suites: 1 passed, 1 total
Tests:       11 passed, 11 total
Snapshot:    0 passed, 0 total
Time:        4.26977523s

@azro352 azro352 requested a review from naemono September 19, 2023 19:17
@azro352
Copy link
Contributor Author

azro352 commented Sep 19, 2023

Is that a feature you want to have github actions that tests for example the helm charts ?

@naemono
Copy link
Contributor

naemono commented Sep 20, 2023

Is that a feature you want to have github actions that tests for example the helm charts ?

No thank you. There are some buildkite steps that do this that I'll trigger soon after the review. Thanks again for the contributions.

@naemono
Copy link
Contributor

naemono commented Oct 3, 2023

I've been testing this a bit more, and found these issue:

diff --git a/deploy/eck-stack/charts/eck-logstash/templates/logstash.yaml b/deploy/eck-stack/charts/eck-logstash/templates/logstash.yaml
index ce720911a..eeb0d6a25 100644
--- a/deploy/eck-stack/charts/eck-logstash/templates/logstash.yaml
+++ b/deploy/eck-stack/charts/eck-logstash/templates/logstash.yaml
@@ -1,5 +1,5 @@
 ---
-apiVersion: logstash.k8s.elastic.co/v1
+apiVersion: logstash.k8s.elastic.co/v1alpha1
 kind: Logstash
 metadata:
   name: {{ include "logstash.fullname" . }}
@@ -44,13 +44,8 @@ spec:
     {{- toYaml . | nindent 4 }}
   {{- end }}

-  pipelines:
-    {{ toYaml .Values.pipelines | nindent 4 }}
-  volumeClaimTemplates:
-    {{ toYaml .Values.volumeClaimTemplates | nindent 4 }}
-  elasticsearchRefs:
-    {{ toYaml .Values.elasticsearchRefs | nindent 4 }}
-  services:
-    {{ toYaml .Values.services | nindent 4 }}
-  secureSettings:
-    {{ toYaml .Values.secureSettings | nindent 4 }}
+  pipelines: {{ toYaml .Values.pipelines | nindent 4 }}
+  volumeClaimTemplates: {{ toYaml .Values.volumeClaimTemplates | nindent 4 }}
+  elasticsearchRefs: {{ toYaml .Values.elasticsearchRefs | nindent 4 }}
+  services: {{ toYaml .Values.services | nindent 4 }}
+  secureSettings: {{ toYaml .Values.secureSettings | nindent 4 }}

The moving of the toYaml and adding a - is cosmetic, but the v1 => v1alpha1 is not.

@azro352
Copy link
Contributor Author

azro352 commented Oct 4, 2023

I'm not sure to understand what are the 2 contents being compared ?

@RoseSecurity
Copy link

@naemono anyway we can have integrated soon? Looking to utilize this in our infrastructure soon

@naemono
Copy link
Contributor

naemono commented Oct 4, 2023

@azro352 I'll update the PR. What I was trying to indicate was that Logstash has no "v1" version, it's only in alpha so it's version is "v1alpha1".

@RoseSecurity We're intending to have this merged and contained within our next release, which is in about a month.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Update Helm stack readme to include logstash.
Add logstash example.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Add some notes to the example.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@naemono naemono requested review from pebrc, thbkrkr and barkbay October 13, 2023 12:55
Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

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

Looks good. I leave the final 👍 to @naemono. The pipelinesRef is the only major thing to fix.

deploy/eck-stack/charts/eck-logstash/values.yaml Outdated Show resolved Hide resolved
deploy/eck-stack/charts/eck-logstash/values.yaml Outdated Show resolved Hide resolved
azro352 and others added 4 commits October 15, 2023 12:20
Co-authored-by: Peter Brachwitz <peter.brachwitz@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Copy link
Contributor

@naemono naemono left a comment

Choose a reason for hiding this comment

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

This LGTM. Everything is functional from my testing, and the docs are in place for this feature. Will merge after CI passes.

@naemono naemono enabled auto-merge (squash) October 16, 2023 13:11
@naemono
Copy link
Contributor

naemono commented Oct 16, 2023

@elasticmachine run elasticsearch-ci/docs

@naemono naemono merged commit 4fca9b8 into elastic:main Oct 16, 2023
@naemono
Copy link
Contributor

naemono commented Oct 16, 2023

💚 All backports created successfully

Status Branch Result
2.10

Questions ?

Please refer to the Backport tool documentation

naemono pushed a commit to naemono/cloud-on-k8s that referenced this pull request Oct 16, 2023
* Add logstash helm chart with examples and documentation
* Update eck-stack chart to include logstash chart.
* Update eck-stack values to include logstash chart, disabled by default.
* Include logstash tests.
---------
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Co-authored-by: Michael Montgomery <mmontg1@gmail.com>
Co-authored-by: Peter Brachwitz <peter.brachwitz@gmail.com>
(cherry picked from commit 4fca9b8)
naemono added a commit that referenced this pull request Oct 16, 2023
* Add logstash helm chart with examples and documentation
* Update eck-stack chart to include logstash chart.
* Update eck-stack values to include logstash chart, disabled by default.
* Include logstash tests.
---------
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Co-authored-by: Michael Montgomery <mmontg1@gmail.com>
Co-authored-by: Peter Brachwitz <peter.brachwitz@gmail.com>
(cherry picked from commit 4fca9b8)

Co-authored-by: azro352 <35503478+azro352@users.noreply.github.com>
@rhr323 rhr323 changed the title Add logstash helm chart Support for Logstash Elastic stack resource via Helm Oct 25, 2023
@thbkrkr thbkrkr changed the title Support for Logstash Elastic stack resource via Helm Support helm chart for Logstash Elastic Stack resource Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Enhancement of existing functionality :helm-charts :logstash v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create logstash helm chart and include it in the eck-stack chart
5 participants