feat(opensearch): build opensearch-fortlogs#1715
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a custom OpenSearch Docker image (“opensearch-fortlogs”) intended for Fortlogs, based on the official OpenSearch image but replacing bundled opensearch-security-analytics and opensearch-alerting plugins with patched builds to work around current operator limitations.
Changes:
- Added
opensearch/build/Dockerfileto remove bundled plugins and install patched plugin ZIPs. - Added build documentation in
opensearch/build/README.mddescribing rationale and included upstream PRs. - Updated
.github/workflows/docker-build.yamlto build and Trivy-scan the newopensearch-fortlogsimage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| opensearch/build/README.md | Documents the custom image purpose, base image, and upstream patch tracking. |
| opensearch/build/Dockerfile | Defines the custom OpenSearch image that swaps official plugins for patched ZIPs. |
| .github/workflows/docker-build.yaml | Extends the build + vulnerability scan workflow matrix to include the new image. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | Repo | PR | Title | | ||
| |------|----|-------| | ||
| | opensearch-project/alerting | [#2163](https://github.com/opensearch-project/alerting/pull/2163) | fix: stop DestinationMigrationCoordinator cycling on unrelated cluster events | | ||
| | opensearch-project/alerting | [#2158](https://github.com/opensearch-project/alerting/pull/2158) | Fix: Skip alias-type fields in doc-level monitor query index mapping | | ||
| | opensearch-project/alerting | [#2154](https://github.com/opensearch-project/alerting/pull/2154) | fix: correct inverted condition in DocLevelMonitorQueries causing query index churn | | ||
| | opensearch-project/alerting | [#2145](https://github.com/opensearch-project/alerting/pull/2145) | Fix/workflow validation ~10 delegation monitor limit | | ||
| | opensearch-project/alerting | [#2150](https://github.com/opensearch-project/alerting/pull/2150) | Fix/doc level monitor sample documents source fields | | ||
| | opensearch-project/security-analytics | [#1726](https://github.com/opensearch-project/security-analytics/pull/1726) | fix: set deleteQueryIndexInEveryRun=false for chained_findings monitor | | ||
| | ~~opensearch-project/security-analytics~~ | [~~#1722~~](https://github.com/opensearch-project/security-analytics/pull/1722) | ~~Fix mutable script params for detector trigger actions~~ | | ||
|
|
| Images are build and push to ghcr.io. Pushed images are automatically mirrored to Keppel Container Image Registry. | ||
|
|
| @@ -0,0 +1,16 @@ | |||
| FROM opensearchproject/opensearch:3.6.0 | |||
| RUN /usr/share/opensearch/bin/opensearch-plugin install --batch https://github.com/thecodingshrimp/opensearch-plugins-alerting/releases/download/v2-custom/opensearch-alerting-3.6.0.0-v2-SNAPSHOT.zip | ||
| RUN /usr/share/opensearch/bin/opensearch-plugin install --batch https://github.com/thecodingshrimp/opensearch-plugin-security-analytics/releases/download/v2-custom/opensearch-security-analytics-3.6.0.0-v2-SNAPSHOT.zip |
| # Don't change the order! | ||
| RUN /usr/share/opensearch/bin/opensearch-plugin remove opensearch-security-analytics | ||
| RUN /usr/share/opensearch/bin/opensearch-plugin remove opensearch-alerting | ||
|
|
||
| # Don't change the order! | ||
| # Will change the plugins repository to one of SAP repos ASAP. | ||
| RUN /usr/share/opensearch/bin/opensearch-plugin install --batch https://github.com/thecodingshrimp/opensearch-plugins-alerting/releases/download/v2-custom/opensearch-alerting-3.6.0.0-v2-SNAPSHOT.zip | ||
| RUN /usr/share/opensearch/bin/opensearch-plugin install --batch https://github.com/thecodingshrimp/opensearch-plugin-security-analytics/releases/download/v2-custom/opensearch-security-analytics-3.6.0.0-v2-SNAPSHOT.zip |
| - Context: opensearch/build | ||
| Dockerfiles: opensearch/build/Dockerfile | ||
| Imagename: opensearch-fortlogs | ||
| Platform: linux/amd64 |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
…ases (#1731) Replace thecodingshrimp placeholder plugin URLs with the official SAP-cloud-infrastructure org releases for opensearch-alerting and opensearch-security-analytics at version 3.6.0.0-sci-v2. Refs: CCLOUDSRC-1017 Version: 3.6.0.0-sci-v2 Signed-off-by: thecodingshrimp <leonard.stutzer@sap.com>
Pull Request Details
We need to build our own custom OpenSearch image for Fortlogs solution. It's based on official OpenSearch image. Two official plugins are removed and replaced with custom ones (that include some critical fixes).
It's a workaround for limitation of opensearch k8s operator (opensearch-project/opensearch-k8s-operator#1423).